Introducing Duet Autopilot.
Learn more
Glossary

SSML

SSML, or Speech Synthesis Markup Language, is an XML-based markup language that lets developers control how a text-to-speech engine pronounces, paces, and inflects the audio it generates. Instead of passing raw text to a TTS system and hoping the default voice sounds right, SSML gives you tags to specify pauses, emphasis, phonetic pronunciation, prosody, voice selection, and audio insertion.

SSML was standardized by the W3C in 2004 and adopted by most major TTS providers, including Amazon Polly, Google Cloud Text-to-Speech, Microsoft Azure, and — with vendor-specific extensions — modern neural TTS engines like ElevenLabs and OpenAI. It sits between the natural-language output of an AI voice agent and the acoustic model that actually renders speech.

Why SSML exists

Even the best neural TTS models make predictable pronunciation and pacing mistakes. Product names get mispronounced ("Nike" as "nyke" or "SQL" as "S-Q-L" when the developer wanted "sequel"). Long numbers get read one digit at a time when the customer wanted grouping ("2005" as "two-zero-zero-five" instead of "two thousand five"). Emergency messages sound casual when they should sound urgent. A well-placed SSML tag fixes each of these in a single line of markup, without retraining the model.

Core SSML tags

A handful of tags cover 90% of practical usage.

<speak> is the root element that wraps every SSML document. Any content outside this tag is treated as plain text.

<break> inserts a pause of a specified duration or strength. The strength attribute takes values like "weak," "medium," or "strong," while the time attribute accepts explicit values like "500ms" or "1s." Well-placed breaks make an AI voice agent sound less rushed and give callers time to process information.

<emphasis> increases the loudness or pitch of a word or phrase. Values are typically "strong," "moderate," or "reduced." This is how you make "your order was not cancelled" carry the meaning the sentence needs.

<prosody> controls pitch, rate, and volume across a span of text. You can slow down a phone number readback, quiet a long-winded disclaimer, or raise the pitch on a question. This is the most powerful tag in SSML and also the easiest to misuse — over-adjusted prosody sounds robotic.

<phoneme> forces a specific pronunciation using phonetic notation (typically IPA or X-SAMPA). This is how you make sure "Nguyen" is pronounced correctly or that your company's product name comes out consistently.

<say-as> tells the TTS how to interpret a string. Common interpret-as values include "digits" (read each digit separately), "cardinal" (read as a number), "date," "time," "telephone," and "characters." This tag alone eliminates most of the "why is the AI reading it wrong" bugs in production voice systems.

<sub> substitutes an alias for spoken output. Text remains in written logs but the TTS reads the alias instead — useful for acronyms and abbreviations.

<audio> inserts a pre-recorded audio file into the synthesized output. This is how voice AI teams mix in-brand jingles, disclosures, or complex phrases that must sound exactly the same every time.

SSML support across providers

Every major TTS provider supports the core tags, but the details diverge. Amazon Polly and Google Cloud TTS support the full W3C spec plus proprietary extensions like Polly's <amazon:effect> and Google's <mark>. Microsoft Azure supports SSML but adds a rich set of <mstts:express-as> tags for style ("cheerful," "empathetic," "customerservice") that go beyond the standard. Modern neural providers like ElevenLabs support a smaller SSML subset and instead expose fine-grained control through voice settings and prompt tuning.

Cross-provider portability is limited in practice. A voice AI team that wants to switch providers should expect to refactor SSML output rather than reuse it wholesale.

When SSML helps and when it hurts

SSML shines for anything read verbatim: phone numbers, order IDs, dates, currency amounts, product names, addresses, and disclosures. It also helps when you need controlled pacing — a break tag before an important instruction gives the caller a moment to focus. In these cases, adding SSML measurably improves comprehension and reduces callers asking the agent to repeat itself.

SSML hurts when it's over-applied. Aggressive prosody adjustments on natural conversational output make neural voices sound artificial, undoing the quality gains that motivated the switch to neural TTS in the first place. Modern models generate natural prosody from context; heavy SSML markup can override that natural signal with something worse.

A pragmatic rule for voice AI teams: use SSML deterministically for structured data (numbers, IDs, dates) and let the neural model handle prose. When MOS testing reveals a specific pronunciation or pacing issue, add a targeted SSML fix. Avoid globally wrapping conversational responses in prosody tags.

Deliver the concierge experiences your customers deserve

Get a demo