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.
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.
The supported voices and languages can be found here.
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) 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 attributeThe strength attribute has the following values. Default is medium.
level attributeThe level attribute has the following values. Default is moderate.
alphabet attributeThe alphabet attribute has the following values.
volume attributeThe 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 attributeThe 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 attributeThe 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 attributeThe interpret-as attribute has the following values.
Here is an example of how to use some of the SSML tags within the Say verb.
No other verbs can be nested within <Say>. However, <Say> can be nested within <Gather>.
‘Hello World’ will be read once in a male voice.
‘Hello World’ will be read once using the Amazon Polly “Joanna” 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.
‘Hello World’ will be read once using the Google Cloud text-to-speech en-US-Standard-A voice.
‘Hello’ will be repeated 5 times in Canadian French.
<Say> verbs and place a <Pause> verb in between them.*Twilio and TwiML are trademarks of Twilio, Inc. SignalWire, Inc. and its products are not affiliated with or endorsed by Twilio, Inc.