<voice>

<voice>

The <voice> tag allows the application to change the voice of the TTS speaker from the input text.

Attributes

Name
Data type
Description

gender

String

Accepts the following values: “male”, “female”, or “neutral”.

age

Integer

An integer value representing the age.

variant

This attribute is not supported.

name

String

xml:lang

String

Notes

Default values are dependent on the voice selected at TTS daemon startup time. For more information, see TTS Engine Characteristics. NOTE: If using the <voice> tag with the <audio> tag, please keep in mind that the <voice> tag will need to be embedded within the <audio> tag for it to work properly.

Example

<?xml version="1.0" encoding="utf-8"?>
<vxml version="2.0">
  <form>
    <block>
      <prompt>
        <voice name="crystal">
          Hi, I'm Crystal.
        </voice>
        <voice name="mike">
          Hi, I'm Mike.
        </voice>
      </prompt>
    </block>
  </form>
</vxml>

The output of the above script would be:

Computer: (in Crystal's voice) Hi, I'm Crystal. Computer: (in Mike's voice) Hi, I'm Mike.

Child Tags

<audio>, <break>, <emphasis>, <enumerate>, <mark>, <paragraph>, <phoneme>, <prosody>, <say-as>, <sentence>, <speak>, <sub>, <value>, <voice>

Parent Tags

<audio>, <emphasis>, <enumerate>, <foreach>, <paragraph>, <prompt>, <prosody>, <sentence>, <speak>, <voice>

Last updated