Reference Solutions Tutorials Visual Designer
    • REST API
      • Overview
        • API Endpoint
        • Authentication
        • Requests
        • Responses
        • Paging
      • Voice
        • Available Phone Numbers
        • Calls
          • Call List Resource URI
          • Making a Call
          • Modifying Live Calls
          • Examples
          • List Filter
          • Paging Information
        • Clients
          • Create a Client
          • Delete a Client
          • Change Client’s Password
          • Get a List of Available Clients
        • Conference Management
          • Supported Operations
          • Conference List Resource URI
        • Conference Participants Management
          • Participants List Resource URI
        • Incoming Phone Numbers
          • IncomingPhoneNumber Instance Resource
          • IncomingPhoneNumbers List Resource
          • Local IncomingPhoneNumber Factory Resource
          • Toll-Free IncomingPhoneNumber Factory Resource
          • Mobile IncomingPhoneNumber Factory Resource
          • Attach a phone number to an application
          • Delete a phone number
          • List of Phone Numbers
          • Incoming Phone Number Regex Support
        • Recordings
        • SIP Refer Support
      • SMS
        • Available Phone Numbers
        • Clients
          • Create a Client
          • Delete a Client
          • Change Client’s Password
          • Get a List of Available Clients
        • Incoming Phone Numbers
          • IncomingPhoneNumber Instance Resource
          • IncomingPhoneNumbers List Resource
          • Local IncomingPhoneNumber Factory Resource
          • Toll-Free IncomingPhoneNumber Factory Resource
          • Mobile IncomingPhoneNumber Factory Resource
          • Attach a phone number to an application
          • Delete a phone number
          • List of Phone Numbers
          • Incoming Phone Number Regex Support
        • Messages
          • Send SMS
          • Get SMS List
          • Get single SMS Information
          • SMS Attributes
        • Email
      • Accounts
      • Applications
      • Notifications
      • Usage Records
    • RCML
      • Overview
        • How wlparam:replace[textMode="sps",parmText="application_name",text="Restcomm",defaultText="$INFER_FROM_DOMAIN"
        • RCML Verbs
      • Dial
        • Client
        • Conference
        • Number
        • SIP
      • Email
      • Gather
      • Say
      • Play
      • SMS
      • Hangup
      • Pause
      • Redirect
      • Record
      • Reject
    • Solution APIs
      • Two-Factor Authentication (2FA)
docs 1.0
  • docs
    • 1.0
  • docs
  • Enterprise:RCML
  • Enterprise:Say

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.

Nesting

The <Say> verb cannot have any other verbs or nouns nested. Only text.

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

Google

google

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.

Voice Not Specified

When no voice is specified, a default voice(gender) value will be set to man for most of the TTS engines. Acapela’s default is woman. This is part of the configuration and can change based on the TTS engine.

TTS Engine Failure

It is possible that TTS engine is specified but fails due to configuration issues, incorrect API key, 3rd party service got down etc. In such cases the call will be terminated.

Products

Programmable Voice

Programmable SMS

Use Cases

Two-Factor Authentication (2FA)

Phone Number Masking

Voicemail to Email Application

Learn

Terms And Conditions

Contact us

Telestax