"voice" Element
Description
Sets the voice to be used.
Syntax
<voice
xml:lang = "locale"
gender = "male" | "female" | "neutral"
age = "integer"
variant = "integer"
name = "name">
child elements
</voice>Attributes
| Attribute | Description |
| xml:lang | Language of the voice. Optional field. |
| gender | Gender of the voice. Optional field. |
| age | Age of the voice. Optional field. |
| variant | Other vocal characteristics. Optional field. |
| name | Name of the voice. Optional field. |
Parent
<audio>, <emphasis>, <p>, <prosody>, <s>, <speak>, <voice>
Children
<audio>, <break>, <emphasis>, <mark>, <p>, <phoneme>, <prosody>, <say-as>, <sub>, <s>, <voice>, #TEXT, #CDATA-SECTION
Limitations/Restrictions
The platform supports only the xml:lang, name, and gender attributes. The age and variant attributes are not supported and are ignored.
The priority of application is: name > xml:lang > gender.
Within a single SSML document/synthesis request, it is not possible to switch between voices of the TTS1 type and voices of the TTS2 family.
Although each attribute individually is optional, it is an error if no attributes are specified when the voice element is used.
Example
<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
xml:lang="en-US">
<voice name="Rebecca"> I am a woman </voice>
<voice name="Jason"> My name is Jason </voice>
</speak>