The Speak Element

The Speak element is used to read out text as speech to the caller. It is very useful for dynamic text that cannot be pre-recorded.

Note: If you are using special characters like é, you need to encode these characters using the Numerical reference.

Attributes

The attributes supported by the Speak element are listed below. The default behavior of each attribute can be modified using the allowed values.

Attribute Name Description Allowed Values Default Value
voice The tone to be used for reading out the text. WOMAN, MAN WOMAN
language Language used to read out the text. See Supported voices and languages below. en-US
loop Specifies number of times to speak out the text. If value set to 0, speaks indefinitely integer >= 0 (0 indicates a continuous loop) 1

Supported Voices And Languages

Language Value WOMAN Voice MAN Voice
Danishda-DKyesyes
Dutchnl-NLyesyes
English - Australianen-AUyesyes
English - Britishen-GByesyes
English - USAen-USyesyes
Frenchfr-FRyesyes
French - Canadianfr-CAyesno
Germande-DEyesyes
Italianit-ITyesyes
Polishpl-PLyesyes
Portuguesept-PTnoyes
Portuguese - Brazilianpt-BRyesyes
Russianru-RUyesno
Spanishes-ESyesyes
Spanish - USAes-USyesyes
Swedishsv-SEyesno

Play a Message

When a call is directed to the following XML document, the caller will hear “Go Green, Go Plivo.” spoken once.

<Response>
    <Speak>Go Green, Go Plivo.</Speak>
</Response>

Play in a Loop

This XML example tells Plivo to say “Wow” thrice in a row.

<Response>
    <Speak loop="3">Wow</Speak>
</Response>