Changing the speaking style
Many voices can speak in a variety of styles ranging from conversational (informal) to formal.
- Style refers to the manner in which voice reads the text like lively, neutral, forceful, and apologetic. For example, use forceful style for formal statements, use apologetic to build emptathy with the caller, use lively to celebrate a successful interaction, and use neutral as the base style (it's usually the default).
- The audio variations of different styles is usually subtle. You can use punctuation and SSML attributes to amplify their effect. Generally, it's easier to detect differences in longer sentences.
- The set of available styles depends on the voice used. (If you request a style that a voice doesn't support, there is no effect.)
Syntax
The syntax for specifying the style is: <esc>\style=$style\<text>
, where $style is a string representing a style name. For a list of styles supported by each voice, see Vocalizer languages and voices. To get details for any given voice, see the NuanceLingwareDocumentation that downloads with that voice.
At any time, you can specify <esc>\style=default\
to return to the default style.
Example: basic syntax
Input: <esc>\style=neutral\Hello, I am Ava.
Reads: "Hello, I am Ava" in neutral style.
Example: changing the style
Input: <esc>\style=neutral\Hello, I am Ava. <esc>\style=lively\Hope you're having a nice day!
Reads: "Hello, I am Ava." in neutral style. "Hope you're having a nice day!" in lively style.
Example: amplifying the effect with punctuation
Punctuation adds subtle differences. For example, using ! with forceful style or using ? with apologetic.
<esc>\style=lively\I'm extremely happy after successful interactions, so I prefer to speak in a joyful style.
If your replace the dot with "!", you will hear the difference:
<esc>\style=forceful\Though, I can have a more formal style in certain circumstances!
Example: amplifying the effect with SSML
You can use SSML attributes to amplify the effect of a style.
Basic style: <esc>\style=apologetic\Sometimes somebody will bring something that you really like.
Amplified: <esc>\style=apologetic\Sometimes somebody will bring something that you <prosody rate="-35.00%">really </prosody>like.
Example: changing styles and languages
For voices that support multiple languages and multiple styles (-mls), you can mix both. This example speaks the first sentence as conversational English, the second as conversational Spanish, and the third as formal Spanish:
<esc>\style=conversational\ This is conversational text in English. <ESC>\lang=SPM\ This is conversational text in Spanish. <esc>\style=formal\ Thank you for listening.
See Using multilingual voices.
Scope
Vocalizer resets the style to default after each speak request.
Input: <esc>\style=lively\Hello, I am Ava.
Reads: "Hello, I am Ava" in lively style.
Input: Hello, I am Ava.
Reads: Hello, "I am Ava "in default style.
Vocalizer resets the style to default if it encounters change of voice. For example, assuming that Ava and Nathan both support the lively style,
Input: <esc>\style=lively\Hello, I am Ava. <esc>\voice=nathan\Hello, I am Nathan.
Reads: "Hello, I am Ava" in the lively style of Ava-mls. "Hello I am Nathan" in default style of Nathan.