TTSPlayString

Sends an instruction to the text-to-speech utility. The microphone is turned off while the command executes. The user can stop output by pressing the ESC key or turning on the microphone.

Syntax

TTSPlayString ["text" [, "switches"]]

Argument Description
text The text string to be read back by using the text-to-speech utility. If no text is included, or an empty string ("") is sent, the command reads the contents of the Clipboard.
switches A series of values specifying the speed and volume of text-to-speech output.

Switches are optional and may override text-to-speech preferences set by the user. Switches can be used in any order.

  /s A number between 0 and 255 indicating the playback speed. The default value is 127.
  /l A number between 0 and 255 indicating the playback volume relative to the current volume control setting. The default value, 255, reads text at a volume equal to this volume setting.

Example 1

This instruction reads the specified text at a moderate speed and at a volume equal to the current output volume.

TTSPlayString "Click the microphone button to start", "/s80 /l255"

Example 2

This instruction reads a word-processor document by copying it to the Clipboard and sending a TTSPlayString command. Playback is at a slow speed.

HeardWord "copy", "all", "to", "clipboard"
TTSPlayString "," "/s90"