Text-to-Speech Tags
Passing an ordinary text string to IVoiceText::Speak usually results in a comprehensible rendition of the phrase. However, pronunciation can be enhanced by embedding control tags in the text string. These tags control such factors as emphasis, speech, and pauses between words, resulting in speech that is more lifelike and understandable.
Control tags must have the following syntax:
- All tags must begin and end with a backward slash (“\”), for example, \pau\.
- Backslashes are not allowed within a control tag. If a string contains an odd number of backslashes, the result is unpredictable.
- To add a backslash to the string itself, without having it interpreted as part of a tag, use two consecutive backward slashes (“\\”).
- Tags are case insensitive. For example, \pau\ is equivalent to \PAU\.
- White space is not ignored. Therefore, \pau\ is not equivalent to \pa u\.
- Tags such as Pro that change the operation of the text-to-speech (TTS) engine are persistent from one call to the next. To apply them to a single phrase, the original state must be restored at the end of the phrase.
The engine used by the Auto PC supports the following subset of the Speech API TTS control tags. In the following entries, the tag is indicated by bold type and its options are italicized.
Note Support for control tags is engine-dependent. Different engines may support different sets of tags.