Name

Embedded Speech Commands

Synopsis

The earlier examples used embedded speech commands like “[[ emph - ]],” which de-emphasizes the pronunciation of the word following the command. These embedded commands give the scripter more control over how the voice sounds when it reads text, such as the volume and emphasis of syllables. The commands are delimited by two pairs of opening and closing brackets (“[[ ]]”). Most of the commands have parameters. For instance, the emphasis command (“emph”) has a plus (+) or minus (-) parameter that either gives greater or less emphasis to the word following the command. The following web site contains more information on embedded speech commands: http://developer.apple.com/techpubs/mac/Sound/Sound-200.html.

[[ char LTRL ]]

If you use the LTRL parameter, then the speech synthesizer will read every letter, number, and space separately rather than the words themselves. It reads the words normally if you use NORM as the parameter.

[[ cmnt here is a comment ]]

Use this syntax to enter comments in the speech code. The speech synthesizer will not read the comments text.

[[ emph - ]]

This command de-emphasizes or emphasizes (e.g., [[ emph + ]]) the word that follows the command.

[[ inpt PHON ]]

This command determines whether the speech synthesizer speaks the text in normal text mode or phoneme mode. Phonemic mode spells words as they sound, as in “Maykael” rather than “Michael.” If you use [[ inpt PHON ]] then the speech synthesizer will use phonemic mode. The ...

Get AppleScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.