Specifying Voice Help in a Resource File

You can add text for long voice Help text strings or customize short voice Help in the resource file where you specify the speech commands. Voice Help reads the voice Help strings only for the speech commands that are enabled in the application when the user says What can I say? or Help.

The following code example shows how to specify long and short voice Help.

<speech command identifier> "<speech command>[\tLong Help text string] [\tShort Help .wav file name]"

If you do not specify a string to read, long voice Help is disabled. If you do not specify a WAV file name, short voice Help looks for a WAV file with the same name as the command.

Short voice Help starts with the phrase, “The speech commands are . . .” When you record short voice Help, be sure that it makes sense with this phrase.

    To enable long voice Help for a speech command

The following code example shows how to specify long voice Help. Because the short voice Help WAV file is not specified, short voice Help defaults to the WAV file Directions.wav in the Windows directory.

IDS_SPEECH_DIRECTIONS "Directions \tTo go to Directions, say Directions"

    To enable short voice Help for speech commands

  1. Create a prerecorded speech template for each speech command by recording an 11-kHz, 8-bit mono WAV file that states, at a minimum, the speech command.
  2. Specify the file name when declaring the speech command only if the WAV file name is different from the speech command. If the WAV file name is exactly the same as the speech command, short voice Help is automatically enabled.
  3. Install the prerecorded speech template WAV files in the Windows directory during installation of your application.

Note You must record and install a WAV file to enable short voice Help.

The following code example shows how to specify a file name for short voice Help. For this example, short voice Help uses the file Dir.wav, rather than the default file Directions.wav.

IDS_SPEECH_DIRECTIONS "Directions \tTo go to Directions, say Directions \tDir"