Say
The <Say> verb reads the supplied text back to the caller. It is useful for text that is difficult to pre-record. The gender and language in which the text will be read is customizable.
Verb attributes
The attribute language allows you to specify the dialect (language and locale) of voice. See below for all language specifications.
The attribute loop specifies the number of times a text is to be repeated. If loop is set to 0, the text will be continuously repeated until the call is terminated.
The attribute voice supports: man, woman, alice, Amazon Polly voices by prefixing them with Polly., Amazon Polly Neural voices by prefixing them with Polly. and ending them with -Neural, Google Cloud voices by prefixing them with gcloud.. Polly Neural and Google Wavenet voices are charged a premium price compared to Polly Standard and Google Standard voices. alice is deprecated and provided for backward compatibility. See below for language specifications on each of these voices.
Supported voices and languages
The supported voices and languages can be found here.
Nouns
The noun of a cXML verb is nested within the verb upon which the verb acts. <Say> has the following noun:
Speech synthesis markup language (SSML)
Speech Synthesis Markup Language (SSML) is an XML-based markup language that provides a standard way to mark up text for synthesized speech.
SSML is usually wrapped within <speak> tags. But, when using SSML with the <Say> verb, you can ignore those <speak> tags. The rest of the SSML tags will be placed inside the <Say> verb.
Below are the supported SSML tags. When using an Amazon Polly voice, please refer to Amazon Polly SSML Documentation instead.
strength attribute
The strength attribute has the following values. Default is medium.
level attribute
The level attribute has the following values. Default is moderate.
alphabet attribute
The alphabet attribute has the following values.
volume attribute
The volume attribute has the following values. Set the volume with one of the values below. Then, you can specify a percentage to increase or decrease the volume of the speech. See here for more information.
pitch attribute
The pitch attribute has the following values. Set the pitch with one of the values below. Then, you can specify a percentage to increase or decrease the pitch of the speech. See here for more information.
rate attribute
The rate attribute has the following values. Set the rate with one of the values below. Then, you can specify a percentage to increase or decrease the speed of the speech. See here for more information.
interpret-as attribute
The interpret-as attribute has the following values.
Example
Here is an example of how to use some of the SSML tags within the Say verb.
Nesting
No other verbs can be nested within <Say>. However, <Say> can be nested within <Gather>.
Examples
A simple message to be read
‘Hello World’ will be read once in a male voice.
A simple message to be read using Amazon Polly voice
‘Hello World’ will be read once using the Amazon Polly “Joanna” voice.
A simple message to be read using Amazon Polly Neural voice
‘Hello World’ will be read once using the Amazon Polly “Joanna” Neural voice. Amazon Polly Neural voices are charged a premium price compared to Amazon Polly Standard voices.
A simple message to be read using Google Cloud text-to-speech voice
‘Hello World’ will be read once using the Google Cloud text-to-speech en-US-Standard-A voice.
Repetition of a message in a foreign language
‘Hello’ will be repeated 5 times in Canadian French.
Notes on usage
- There is a 4,096 Unicode character limit on the text
- Numbers are spoken, or read, based on context. For example, ‘234’ is read as “two hundred thirty-four”, whereas ‘2 3 4’ is read as “two three four”.
- Short pauses in spoken text are accomplished by inserting punctuations, i.e. commas and periods, in the written text. For longer pauses, place text in a separate
<Say>verbs and place a<Pause>verb in between them. - Dates, times, money amounts, and abbreviations may not follow intuitive pronunciations. Test these situations to ensure they are pronounced to your liking.