Plain text is a blunt instrument for speech. When you hand a text-to-speech engine a paragraph, it has to guess where to pause, which word carries the stress, how fast to move, and how to pronounce the brand names you spent months inventing. Sometimes it guesses well. Often it does not, and the result is a narration that sounds bored, rushed, or just wrong. SSML — Speech Synthesis Markup Language — is the fix. It is a small, W3C-standardized set of XML tags you wrap around your text to tell the engine exactly how to say it: where to pause, what to stress, how fast to speak, and how each tricky word should be pronounced.
This guide walks through the SSML tags that actually matter for text-to-speech work in practice: prosody, break, emphasis, phoneme, say-as, sub, and lang, plus the markup pitfalls that break synthesis. You will find copy-ready examples, a table comparing which engines support which tags, and a troubleshooting checklist drawn from real failure modes. Whether you are building voice prompts for an IVR or narrating an audiobook, the same tags and rules apply.
TL;DR: SSML is an XML markup layer that controls how text-to-speech engines speak your text. The five core tags are for rate, pitch and volume, for pauses, for word stress, for exact IPA pronunciation, and for dates and numbers. Tag support varies by voice generation, so test your markup on the engine you ship with.
Definition: SSML (Speech Synthesis Markup Language) is a W3C-standardized XML vocabulary for controlling synthesized speech. Wrapped in a root element, its tags adjust pronunciation, prosody, pauses, and speaking style, letting developers and content creators direct a text-to-speech engine the way a screenplay directs an actor.
What Are Text-to-Speech SSML Tags?
SSML tags are inline XML annotations that a speech synthesis engine reads alongside your text. The engine speaks the text and treats the tags as stage directions. The markup itself is never spoken. A minimal document looks like this:
<speak>
Thanks for calling Acme Stores. <break time="600ms"/>
Your order number is <say-as interpret-as="characters">AB12</say-as>.
</speak>
Every SSML document must be wrapped in the root element, and every TTS API call that uses SSML must be told the input is SSML rather than plain text — in Amazon Polly you pass , in Google Cloud TTS you send the markup in the field, and in Azure AI Speech you pass it to the synthesis call as SSML text. Skip that flag and the engine will read your angle brackets out loud, which is exactly as bad as it sounds.
The tags fall into three families. Pacing tags (, , ) control pauses and rhythm. Expression tags (, ) control speed, pitch, volume, and stress. Pronunciation tags (, , , , ) control what the engine says when text is ambiguous.
One important habit: keep your markup valid XML. An unclosed tag, a stray , or an unescaped will kill the whole synthesis request. This is the single most common beginner failure, and it is also the easiest to prevent with a linter or even a quick paste into an XML validator.
Which SSML Tags Do TTS Engines Support?
The core W3C tags work across the major cloud engines, but support is not identical — and it is not even identical between voice generations from the same provider. Amazon Polly's standard voices support , whispering effects, and pitch control through ; on Polly's neural, long-form, and generative voices, emphasis is unavailable and pitch control is partial. Google Cloud TTS offers broad support across its standard and neural voices, including prosody and mark tags. Azure AI Speech supports the core set too, and its neural voices additionally accept SSML extensions like speaking styles and roles. The practical takeaway: a markup document that works perfectly on one engine can throw an error on another, and even switching from a standard to a neural voice inside the same provider can reject tags like .
| SSML tag | What it controls | Amazon Polly | Google Cloud TTS | Azure AI Speech |
|---|---|---|---|---|
| Pauses, fixed time or strength | Full support, max 10s | Full support | Full support | |
| , | Paragraph / sentence pauses | Full support | Full support | Full support |
| Rate, pitch, volume | Partial on neural/gen | Full support | Full support | |
| Word stress levels | Standard voices only | Full support | Full support | |
| IPA pronunciation | Full; partial on generative | Full support | Full support | |
| Dates, numbers, units | Partial on neural | Full support | Full support | |
| Alias substitution | Full support | Full support | Full support | |
| Foreign phrase pronunciation | Full support | Supported | Limited | |
| Embedded audio playback | Not supported | Supported | Not supported | |
| Voice switching | Not supported | Limited | Supported |
As of 2026, this picture shifts with each provider's release notes, so treat the table as a starting point and verify against the current documentation. The safe rule is simple: test your exact markup against the exact voice you will ship with, before launch day.
Definition: Prosody is the pattern of rhythm, stress, and intonation in speech — the music underneath the words. In SSML, the tag lets you set the speaking rate, pitch, and volume of a passage, which is how you make a narration sound energetic, somber, or authoritative without changing the text.
How Do You Use prosody to Control Speed and Pitch?
The tag is the workhorse of expressive synthesis. It wraps a passage of text and accepts three attributes: , , and . Each can be set with relative values (, , ) or absolute ones (, , ). Relative values are usually the better choice because they scale from the voice's natural baseline rather than imposing a fixed one.
<speak>
<prosody rate="85%" pitch="+5%">
Slow down. This is the important part.
</prosody>
<prosody rate="115%" volume="loud">
And this is the exciting part!
</prosody>
</speak>
The effect is substantial. Dropping the rate to 85–90% is a standard trick for audiobook narration, where listeners need room to absorb the text; pushing it to 110–120% suits upbeat ads and energetic reels voiceovers. Raising the pitch slightly adds energy, lowering it adds gravity — a newscaster feel, which some engines expose as dedicated styles, can often be approximated by combining a modest pitch drop with a steadier rate. For a full breakdown of what prosody can and cannot do on each voice generation, see our prosody deep dive.
Two cautions. First, pitch control is only partially supported on some neural voices, so verify behavior per voice. Second, extreme values sound robotic — rates below about 70% or above 130% typically break the illusion of a human speaker.
How Do break and emphasis Shape Pacing and Stress?
Pauses are punctuation you can hear. The tag inserts silence where punctuation cannot reach — a dramatic beat before a reveal, a breath between sections, a moment of space after a question. It accepts either a fixed duration (, up to 10 seconds on most engines) or a strength keyword (, , , , ) that lets the engine pick a voice-appropriate pause length:
<speak>
The answer is <break time="900ms"/> yes.
<p>First, gather your materials.</p>
<p>Next, <emphasis level="strong">double-check</emphasis> the wiring.</p>
</speak>
The and tags wrap paragraphs and sentences and add natural pauses at their boundaries — cleaner than scattering tags through long text, and they give auto-breathing features something to work with. Use them for structure; use for effect.
The tag adds stress with levels , , , and . In practice, is the one you will reach for most. Two caveats: support is uneven (Polly neural voices reject it — have a prosody fallback ready), and overusing it makes speech sound aggressive. Emphasize one word per sentence at most.
A useful habit from production work: write your durations and levels once, then listen to the result at 1x speed with headphones. Pauses that look fine on paper often feel twice as long to a listener, and what reads as gentle stress can sound like shouting through a voice model. Tuning is a listening discipline, not a markup discipline.
How Do say-as, sub, and phoneme Fix Pronunciation?
This is where SSML earns its reputation for precision. The tag tells the engine how to interpret a token, so dates, numbers, phone numbers, units, and currencies come out correctly instead of however the engine happens to guess:
<speak>
Your appointment is on <say-as interpret-as="date" format="mdy">10/24/2026</say-as>.
The price dropped <say-as interpret-as="fraction">0.5</say-as> to
<say-as interpret-as="currency">$29.99</say-as>.
Call us at <say-as interpret-as="telephone">1-800-555-0199</say-as>.
</speak>
The values — , , , , , , , , , , , among others — cover the cases where a token has multiple valid readings. could be a zip code or twelve thousand three hundred forty-five; removes the ambiguity. Different engines support slightly different values, so check yours when you rely on an uncommon one.
The tag is the quick-fix tool: it substitutes an alias for a written form, so the engine reads the alias instead of the original text. Perfect for brand names, acronyms, and anything the engine butchers:
<speak>
When I was last in <sub alias="Australia">au</sub> I went searching for <sub alias="gold">Au</sub>.
Our <sub alias="post-gres">PostgreSQL</sub> database is fast.
</speak>
The tag goes one level deeper: it gives the exact pronunciation in IPA (International Phonetic Alphabet) notation, which is the most precise control available:
Definition: A phoneme is the smallest unit of sound that distinguishes one word from another in a language — swap one phoneme and "bit" becomes "bat." In SSML, the tag uses IPA symbols to pin a word's pronunciation exactly, which is essential for brand names, loanwords, and proper nouns that engines otherwise misread.
<speak>
The tomb of <phoneme alphabet="ipa" ph="ˈkruːəmɒr">Cromar</phoneme> is open.
</speak>
Use when an approximate alias is good enough, and when exactness matters. Because IPA notation can be fiddly to write by hand, a pronunciation dictionary applied automatically is the scalable way to manage tricky words across a large project.
How Do You Troubleshoot SSML Errors?
When SSML fails, it usually fails loudly: the synthesis call errors out or the whole request is rejected. Here is a practical debugging workflow that covers the most common causes:
- Validate the XML first. Run your markup through an XML validator. Unclosed tags, unescaped (write ), and stray characters are the top cause of failures. If the markup is not well-formed XML, nothing else matters.
- Confirm the root element. Everything must sit inside and . Some engines also require an XML namespace declaration on the root; check the provider's docs.
- Check the SSML flag. The API must know the input is SSML — Polly's , Google's input field, Azure's SSML request. Without it, tags get read aloud as text.
- Remove one unsupported tag at a time. If you switched engines or voices and synthesis started failing, bisect your markup. on a Polly neural voice and on Azure are classic culprits.
- Watch engine-specific limits. Polly caps at 10 seconds and rejects prosody rate changes beyond a range on some voices. Exceeding a limit fails the whole request, not just that tag.
- Test escapes in substitutions. The attribute in and in also contain text that must be XML-safe. A quote character inside an alias value is an easy way to break the document.
- Listen, don't just read. Markup that passes validation can still sound wrong — emphasis that reads as shouting, pauses that feel endless, prosody values outside the human-sounding band. Render and listen at 1x speed as the final check.
Frequently Asked Questions
What is SSML in text to speech?
SSML (Speech Synthesis Markup Language) is a W3C XML standard that gives you fine-grained control over synthesized speech. You wrap text in tags like , , , , and to direct pace, pitch, pauses, stress, and pronunciation. It works with most major TTS engines, including Amazon Polly, Google Cloud TTS, Azure AI Speech, and modern AI voice platforms.
Which SSML tags are supported by Amazon Polly?
Amazon Polly supports , , , , , , , , , , and (partially). Support varies by engine: works on standard voices but not neural, long-form, or generative voices, and pitch control through is limited on newer engines. , , and are not supported.
How do you add pauses in SSML?
Use for a fixed pause (up to 10 seconds on most engines), or to let the engine choose a natural pause length. For document structure, wrap paragraphs in and sentences in — the engine inserts natural pauses at the boundaries. Reserve with explicit times for dramatic effect or rhythm control.
How do you pronounce a brand name correctly in TTS?
The fastest fix is , which swaps in a phonetic spelling. For exact control, use with the word's IPA transcription. For projects with many tricky words, a pronunciation dictionary or lexicon applied automatically is more scalable than marking up each occurrence by hand.
Does Google Cloud Text-to-Speech support SSML?
Yes. Google Cloud Text-to-Speech accepts SSML input through its field and supports the core W3C tags including , , , , , , , , and . Neural voices generally support the full tag set, making Google one of the more consistent engines for markup-heavy documents.
Why is my SSML not working?
The most common causes are invalid XML (unclosed tags, unescaped ampersands), missing the SSML input flag on the API call, and tags unsupported by the engine or voice you are using. Bisect your markup by removing tags one at a time to isolate the failing one, and test your exact SSML against the exact voice you ship with — support varies between standard, neural, and generative voices.
What is the prosody tag used for?
The tag controls the rate, pitch, and volume of synthesized speech for the text it wraps. Common uses include slowing narration to 85–90% for audiobooks, speeding up to 110–120% for energetic ads, lowering pitch for a newscaster feel, and adjusting volume for whispers or announcements. Keep values moderate — extremes quickly sound robotic rather than human.