Speak element converts text to speech (TTS) and plays it to the caller. The text to read is the element’s content; voice, language, and loop count are set as attributes. Speak runs to completion before Vobiz moves to the next element, and posts no parameters of its own to any URL.
Attributes
Nesting rules
Speak takes plain text as its content. To use SSML markup, set voice to a Polly.<Name> voice. Speak holds text or SSML, and other verbs sit alongside it. You can nest Speak inside Gather (to prompt for input) and PreAnswer (to speak before answering).
Examples
Speak a basic message
Choose a voice and language
Use a Polly voice
Repeat a message in a loop
Setloop to repeat an announcement. Use loop="0" to repeat up to 500 times (for example, a waiting-room message) until another event moves the call forward.
Edge cases and tips
- Escape special XML characters. Ampersands and angle brackets in the spoken text must be escaped as
&,<, and>. Unescaped characters cause an XML parsing error and the call fails. - A voice may not exist for every language. Not every language has both a
WOMANand aMANvoice (see the table below). If you request an unavailable combination, Vobiz falls back to the available voice for that language. SpeakvsPlay. UseSpeakfor dynamic, per-call text (account balances, names, confirmation read-backs). UsePlayfor prerecorded audio when you need consistent quality, music, or branding.- Pronunciation control. For numbers, dates, currency, and pauses, use SSML to control how text is read aloud.
- Text length. Each
Speakholds up to 3,000 characters of text. - Keep prompts short. Callers lose attention after 15-20 seconds. Split long content into shorter
Speakelements or break it up with menu prompts.
Supported voices and languages
F and M show the voice’s gender.
- One voice per language. Where a language has one voice,
WOMANandMANboth play it. The table shows the voice each value plays. - English (Canada).
en-CAuses the English (US) voices. - Regional codes. A regional code outside this table, such as
nl-BE,de-AT,it-CH,es-AR,en-NZ,en-ZA, orfr-BE, uses a voice for its base language. This applies toda,nl,en,fr,de,it,pl,pt,ru,es, andsv.