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

Nesting

The <Say> verb cannot have any other verbs or nouns nested. Only text can be part of the <say> verb.

Examples

Below is an example of using the <say> verb.
1
<Response>
2
<Say>Hello World</Say>
3
</Response>
Copied!
Clearest English voice to use
1
<Response>
2
<Say language="google.en-US-Wavenet-A" voice="man">Hello World</Say>
3
</Response>
Copied!
You can set the language, voice and loop parameters of the verb as follows.
1
<Response>
2
<Say voice="woman" language="fr" loop="3">Bonjour le monde</Say>
3
</Response>
Copied!

Dictation

By default the 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.
1
<Response>
2
<Say>
3
<speak>
4
<say-as interpret-as="ordinal">12345</say-as>
5
</speak>
6
</Say>
7
</Response>
Copied!

Configuring TTS Provider and Language

The supported voices depend on the Text-to-Speech (TTS) Service provider being used.
RestComm supports the following list of TTS Provider:
​
TTS Provider
Voices
Default Voice
Languages
Default Language
​voicerss (default)
female only
female
en
​google​
male,female
male
en-US-Wavenet-A
​awspolly​
male,female
male
en-US
​acapela​
man,woman
woman
en
Teleapi default TTS Provider is VoiceRSS
To use a specific provider specify it in the language attribute, as shown below.
1
language="acapela.en"
2
language="google.en-US-Wavenet-A"
Copied!
​