Say
Say
The <Say> verb is used to synthesize text to speech and play it back to the remote party.
Say Attributes
Name | Description | Allowed Values | Default Value |
---|---|---|---|
voice |
The gender of the voice |
provider-dependent |
female |
language |
The text language. May contain TTS provider. |
provider-dependent |
voicerss.en |
loop |
How many times to play the synthesized text. Zero will loop indefinitely. |
non-negative integer |
1 |
Examples
Below is an example of using the <Say> verb.
<Response> <Say>Hello World</Say> </Response>
You can set the language, voice and loop parameters of the <Say> verb as follows.
<Response> <Say voice="woman" language="fr" loop="3">Bonjour le monde</Say> </Response>
Dictation
By default the <Say> verb will make assumptions about how to pronounce numbers, dates, times, amounts of money and other abbreviations. For example, the number '12345' will be spoken as "twelve thousand three hundred forty-five." Whereas '1 2 3 4 5' will be spoken as "one two three four five."
To control dictation of synthesized text, users can inject Speech Synthesis Markup Language (SSML) into their text.
<Response> <Say> <speak> <say-as interpret-as="ordinal">12345</say-as> </speak> </Say> </Response>
For more information about text to speech and SSML support check out the Text-to-Speech and SSML Support Guide.
Configuring TTS Provider and Language
The supported voices depend on the Text-to-Speech (TTS) Service provider.
CPaaS supports the following list of TTS Provider:
TTS Provider | Voices | Default Voice | Languages | Default Language |
---|---|---|---|---|
female only |
female |
en |
||
male,female |
male |
en-US-Wavenet-A |
||
male,female |
male |
en-US |
||
man,woman |
woman |
en |
Please make sure to always specify the desired language and engine within your application. |
If a user wishes to use a specific provider he can do so by specifying it in the language parameter of the <Say> tag as shown below.
language="acapela.en" language="google.en-US-Wavenet-A"
Disk cache for Say verb
Please refer to Cache Strategy document for details about Disk Cache and Say verb execution.