SSML for Amazon Connect: tags, voices and common errors
Amazon Connect speaks your prompts with Amazon Polly. SSML lets you control pauses, pace and how numbers, dates and names are read out. Amazon Connect supports a smaller set of tags than Polly, and what works also depends on the voice and engine set in your Set voice block. Pick that voice and engine at the top of the builder, and the checks show exactly what will and won't work.
Tags Amazon Connect supports
speak, break (up to 10 seconds), lang, mark, p, phoneme, prosody, s, say-as, sub, w and amazon:effect name="whispered". Amazon Connect ignores other Polly tags, such as emphasis, amazon:auto-breaths or amazon:domain. For the newscaster style, choose Newscaster as the speaking style in the Set voice block instead.
Voices and engines
- Standard voices support every tag, including whisper.
- Neural voices sound more natural. They don't support whisper, and support
prosodyandsay-asonly partly. The Conversational and Newscaster styles work with neural Joanna, Matthew, Lupe and Amy. - Generative voices are the most human-like. They support
mark,phonemeandprosodyonly partly, and Amazon Polly bills them separately. - If the voice doesn't support the engine you choose, the Set voice block takes its Error branch. For example, Ruth has no standard engine, and standard is the default when no engine is set.
The five mistakes that break prompts
- Unescaped characters. When Interpret as SSML is on, write
&for & and'for an apostrophe, or the prompt can be skipped. Use Escape them in the checks to fix this in one click. - Missing
<speak>. Invalid SSML sends the contact down the Play prompt's Error branch. - Too long. A prompt can be at most 6,000 characters including tags, and 3,000 billed characters. Split longer text into several prompts.
- Expecting
<lang>to change the voice. It changes pronunciation only. For a native accent, add a Set voice block with a voice in that language. - Unquoted contact attributes inside tags. Write
alias="$.Attributes.name", in quotes.
Reading out numbers, dates and references
Use say-as: telephone for phone numbers, characters for references and postcodes, digits for PINs, and date with a format such as dmy. Long references are easier to follow in groups of four with a short pause between them. The Say it right helper does this for you. Put brand names and acronyms in the pronunciation list once, and apply them to every prompt.
From the builder to your flow
Copy Set voice + Play prompt JSON gives you two flow-language actions: UpdateContactTextToSpeechVoice and MessageParticipant with an SSML parameter. Check them with the Flow JSON Validator before importing. To hear the real voice, run the Polly CLI command shown. The browser preview is only a rough approximation.