Say
Say
The <Say> verb is used to synthesize text to speech and play it back to the remote party. The voices supported depend on the talk-to-speech Service provider plug-in. By default Amazon Polly is used with the following language options. For more information about text to speech and SSML support check out the Text-to-Speech and SSML Support Guide.
Say Attributes
Name | Allowed Values | Default Value |
---|---|---|
voice |
man, woman |
man |
language |
bf, bp, en, en-gb,cf, cs, dan, fi es, fr, de, el, it, nl, no, pl, pt, ru, ar, ca, sv, tr |
en |
loop |
integer > 1 |
1 |
-
voice. The
voice
attribute allows you to select the variation of the voice (male or female) used to synthesize the text to speech for playback. -
language. The
language
attribute lets you pick a specific language for speech synthesis. Restcomm currently supports the following languages 'bf' (Belgium-French), 'bp' (Brazilian-Portugues), 'en' (English), 'en-gb' (British-English), 'cf' (Canadian-French), 'cs' (Czech), 'dan' (Dannish), 'fi' (Finnish), 'es' (Spanish), 'fr' (French), 'de' (German), 'el' (Greek), 'it' (Italian), 'nl' (Netherlands-Dutch), 'no' (Norwegian), 'pl' (Polish), 'pt' (Portuguese), 'ru' (Russian), 'ar' (Saudi-Arabia Arabic), 'ca' (Spain Catalan), 'sv' (Swedish), and 'tr' (Turkish). -
loop. The
loop
attribute specifies how many times you would like the text to be repeated. Setting the attribute to '0' will result in endless repetition.
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>
When translating text to speech, the <Say> verb makes an assumptions about how to pronounce numbers, dates, times, amounts of money and other abbreviations. When announcing numbers, '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". |
Using the language parameter
With the help of the language
parameter you can specify what TTS engine you would to use for your application.
Below you can find a list of all available TTS engines.
TTS Provider |
RCML Name Reference |
Amazon Polly |
awspolly |
Acapela |
acapela |
VoiceRSS |
voicerss |
Nuance |
nuance |
TTS Engine/Language Convention
If you would like to set your TTS engine to Acapela English, you should use the following parameter:
language="acapela.en"
for Google english US Wavenet-A, the parameter should be:
language="google.en-US-Wavenet-A"
In a similar manner you can specify any other TTS engine to be used.
TTS Engine Not Specified
If no TTS engine is specified, for example <Say>Hello there</Say>
, the first one from the list below will be taken as default value, or the next available if the first one isn’t.
<speech-synthesizer active="awspolly,acapela,voicerss,nuance,google"/>
Language Not Specified
If no language is set, for example <Say>Hello there</Say>
, the value will fallback to the first TTS engine from the list and respectively the engine’s default language. Usually the TTS engine’s default language is English US. However that can vary based on the configuration settings and region defined.