InboundXML Documentation

View REST Docs

Say Element

The <Say> element reads text to the caller using a text-to-speech engine. <Say> is good to use with dynamic data, while <Play> may be a better choice for static information or prompts. The text to be read is nested within the <Say> element.

Element Attributes

The attributes below can be used to change the <Say> behavior.

Attribute Description
optional
The type of voice that will read the text to caller.
Default Value:
woman
Allowed Value:
man, woman
optional
Language used to speak the text.
Default Value:
en
Allowed Value:
en, en-gb, es, fr, it, de
optional
The amount of times the spoken text should be repeated. 0 indicates an infinite loop.
Default Value:
1
Allowed Value:
integer greater than or equal to 0

Languages

The language attribute allows you pick a voice with a specific language's accent and pronunciations. TelAPI currently supports English with an American accent (en), English with a British accent (en-gb), Spanish (es), French (fr), Italian (it), and German (de). The default is English with an American accent (en).

Nesting

In addition to the default <Response> element, the <Say> element can also be nested within the <Gather> verb.

The <Say> element cannot nest any other elements within itself. It must only nest the text which will be read to the caller.

Example InboundXML Document

The InboundXML below will say "Hello" in a man's voice three times, "Hello, my name is Jane." in a womans voice one time, and then repeat "Now I will not stop talking." until the caller hangs up.

<Response>
    <Say loop='3' voice='man'>Hello.</Say>
    <Say voice='woman'>Hello, my name is Jane.</Say>
    <Say loop='0'>Now I will not stop talking.</Say>
</Response>

Helper Example

Our helper libraries simplify the task of generating InboundXML while programming. The code below will output the above InboundXML example.



Tips

  • Limit on the text that the <Say> verb can process is 4KB.
  • Commas and periods will cause pauses when the text is read back using <Say>.
  • <Say> may speak things such as abbreviations or times differently than you expect so be sure to double check for correct pronunciation.