This is an old revision of the document!
The <prosody> tag changes the sound characteristics of the text being spoken.
|pitch||(defaults to “default”) The “pitch” attribute of the <prosody> tag changes the pitch of the spoken text. You can specify a preset pitch (“high”, “medium”, “low”, or “default”). This attribute is only available with the Cepstral Theta TTS engine.|
|contour||This attribute is not supported.|
|range||This attribute is not supported.|
|rate|| (defaults to “default”) The “rate” attribute of the <prosody> tag changes the rate at which the text is spoken. You can specify a preset rate (“fast”, “medium”, “slow”, or “default”). The “rate” attribute can also be set to an integer value such as “100.0” or “50.0”. A normal voice rate should be set to
around “150.0” (for AT&T Natural Voices). These values are not in accordance with the SSML spec,
where rates are specified relative to 1. Additionally, you can also adjust the voice rate by using percentages. To increase the rate you could type “+50%” to make the voice rate 50% faster or “-50%” to make the voice rate 50% slower.
|duration||This attribute is not supported.|
|volume||(defaults to “default”) The “volume” attribute of the <prosody> tag allows the application to change the volume of the TTS voice. The volume level can be specified to a preset volume of “silent”, “soft”, “medium”, “loud”, or “default”. Also, the volume level can be set to an integer number such as “25.0” for a soft volume or “200.0” for a loud volume.|
When using a Realspeak TTS voice, the talking speed of the TTS voice does not revert back to the normal speed after the tag has been used. To revert it back to normal, you must use the tag again with the attribute of “volume” set to “100.0” and the attribute of “rate” set to “default”.
<?xml version="1.0"?> <vxml version="2.0"> <form> <block> <prompt> This sentence uses the default prosody settings. <prosody volume="25.0" rate="slow"> This sentence is slow and quiet. </prosody> <prosody volume="200.0" rate="fast"> This sentence is fast and loud. </prosody> </prompt> </block> </form> </vxml>
The output of the above script would be:
Computer: This sentence uses the default prosody settings.
Computer: (slowly and quietly) This sentence is slow and quiet.
Computer: (quickly and loudly) This sentence is fast and loud.