Description
Specifies voice characteristics for the spoken text.
Syntax
<voice
gender="male" | "female" | "neutral"
age="integer"
variant="integer"
name="name"
category="child" | "teenager" | "adult" | "elder">
child elements
</voice> |
Attributes
|
Attribute |
Description |
|
gender |
Preferred gender of the voice to speak the text. |
|
age |
Preferred age of the voice to speak the text. |
|
variant |
A variant of the other voice characteristics to speak the text. |
|
name |
Name of the specific voice name to speak the text. |
|
category |
The latest version of the SSML specification no longer defines this attribute. See your vendor documentation to confirm which attributes are supported/recommended. Preferred age category of the voice to speak the text. |
Parents
<audio>, <choice>, <emphasis>, <enumerate>, <foreach>, <paragraph>, <p>, <prompt>, <prosody>, <sentence>, <s>, <speak>, <voice>
Children
<audio>, <break>, <emphasis>, <mark>, <paragraph>, <p>, <phoneme>, <prosody>, <say-as>, <sentence>, <s>, <sub>, <voice>, <value>, #PCDATA
Limitations/Restrictions
<enumerate> and <mark>
are not supported within <voice>.
Note: If you are using a TTS engine that does not support
<voice>, click here
for a workaround.
Example
To include speech markup tags, insert the SSML tags inside one of the
<prompt>, <audio>, <choice>,
<enumerate>, or <foreach> (within
<prompt>) elements.
<prompt> <voice gender="female">I am a woman</voice> <!-- platform specific voice name --> <voice name="Jill">My name is Jill</voice> </prompt> |
Workaround for <voice>
If you are using a TTS engine that does not support <voice>,
you can use the following workaround:
Instead of using the <voice> tag, use the TTSENGINE
property or attribute of <prompt> to specify which TTS engine
(i.e., voice) you want to use and to switch between TTS engines (voices). For
example:
<prompt> <value expr="greeting"/> This will use the default voice. </prompt> <prompt ttsengine="SPEECHIFY_TOM"> This will use a male voice, if a male voice is configured as Speechify Tom. </prompt> <prompt ttsengine="SPEECHIFY_MARA"> This will use a female voice, if a female voice is configured as Speechify Mara. </prompt>
You can switch between any of the voices you have installed, using the TTSENGINE names you have configured for each voice.