🎯 On-Device Voice AI for Enterprises
Get dedicated support to ensure your specific needs are met.
Talk to Sales

TLDR: SSML (Speech Synthesis Markup Language) is the W3C standard for controlling how text-to-speech engines render speech. It uses XML tags to specify pauses, pronunciation, pitch, speaking rate, emphasis, and number/date formatting. The core tags (<break>, <prosody>, <say-as>, <phoneme>, <sub>, <emphasis>) are supported by Google Cloud TTS, Amazon Polly, and Azure Speech Service, though each provider adds proprietary extensions and restricts certain tags on newer neural voice models. This guide covers every production-relevant SSML tag with code examples, documents where the three major providers diverge, and explains alternative pronunciation control methods used by engines that do not implement SSML.

What Is SSML?

Speech Synthesis Markup Language (SSML) is an XML-based W3C standard that gives developers explicit control over how a TTS engine converts text into spoken audio. Without SSML, cloud TTS engines rely on non-deterministic inference to guess pauses, number formatting, and syllable stress. SSML overrides these defaults with structured tags, guaranteeing consistent, predictable audio output.

A minimal SSML document wraps text in a <speak> root element:

In this example, <say-as> forces the engine to read "5" as "five" (not "fifth" or "five-point-zero"), and <break> inserts a 300-millisecond pause. Without these tags, the engine would infer both behaviors from context, sometimes incorrectly.

How Does SSML Work in Text-to-Speech?

When a TTS engine receives SSML input, it parses the XML before synthesis begins. The engine extracts the plain text, then applies the markup instructions during three stages of the TTS pipeline:

  1. Text normalization: The <say-as> and <sub> tags override the engine's default rules for expanding abbreviations, numbers, dates, and other non-standard text. For example, <say-as interpret-as="date" format="mdy">01/02/2026</say-as> forces "January second, twenty twenty-six" rather than "one slash two slash twenty twenty-six."

  2. Phonemization: The <phoneme> tag provides an explicit phonetic transcription using IPA (International Phonetic Alphabet) or a provider-specific alphabet like X-SAMPA. This overrides the engine's grapheme-to-phoneme (G2P) model for words it mispronounces, such as proper nouns, medical terms, or foreign-language words embedded in an English sentence.

  3. Prosody generation: The <prosody> and <emphasis> tags modify pitch, rate, and volume at the utterance or word level. The <break> tag inserts silence of a specified duration. These controls shape the rhythm and expressiveness of the output.

TTS engines process these instructions and generate an audio waveform (typically PCM, MP3, or Opus). SSML is not rendered in the output audio; it is consumed entirely during synthesis.

SSML Tag Reference: Examples for Production

The following tags form the production-relevant subset of SSML 1.1. Each tag is described with its attributes and a code example.

<speak>: Every SSML document must be wrapped in the root element, <speak>. Some providers require xmlns attributes; others accept bare <speak> tags.

<break>: <break> inserts a pause. Accepts time (e.g., "250ms", "1s") or strength ("none", "x-weak", "weak", "medium", "strong", "x-strong"). If neither is specified, the engine inserts a default medium-strength pause.

<say-as>: Controls how the engine interprets a text construct. The interpret-as attribute is required. Common values:

  • cardinal / ordinal: reads "5" as "five" vs. "fifth"
  • characters / spell-out: reads each character individually ("A-B-C")
  • date: reads as a date, with a format attribute ("mdy", "dmy", "ymd")
  • time: reads as a time expression
  • telephone: reads digit sequences as phone numbers
  • currency: reads "$42.50" as "forty-two dollars and fifty cents"
  • unit: reads "5kg" as "five kilograms"

<phoneme>: Provides a phonetic pronunciation, overriding the engine's G2P model. The alphabet attribute specifies the phonetic system ("ipa" for International Phonetic Alphabet, "x-sampa" for X-SAMPA). Amazon Polly also accepts "x-amazon-pinyin" for Mandarin. The ph attribute contains the phonetic transcription. This tag is critical for proper nouns, medical/legal terminology, and brand names.

<sub>: Replaces the contained text with the alias for pronunciation. Unlike <phoneme>, <sub> provides a plain-text replacement rather than a phonetic transcription. Useful for acronyms and abbreviations.

<prosody>: Modifies pitch, rate, and volume. Accepts absolute values, relative adjustments, or named presets. Attributes: rate ("x-slow", "slow", "medium", "fast", "x-fast", or a percentage like "80%"), pitch ("x-low" through "x-high", or "+2st" / "-3st" for semitone adjustments), volume ("silent" through "x-loud", or "+6dB").

<emphasis>: Adds or reduces emphasis on a word or phrase. Accepts a level attribute: "strong", "moderate", "reduced", or "none". The acoustic effect varies by engine (pitch change, duration stretch, or volume boost).

<p> and <s>: Mark paragraph and sentence boundaries. These tags help the engine apply appropriate prosodic phrasing (longer pauses between paragraphs, rising/falling intonation at sentence boundaries). They are optional in most cases but recommended when SSML content contains other tags that modify prosody, as wrapping content in <s> tags prevents unintended phrasing artifacts.

SSML Compatibility: AWS Polly vs. Google Cloud TTS vs. Azure vs. ElevenLabs

All three major cloud TTS providers support the core SSML tags (<break>, <say-as>, <phoneme>, <sub>, <prosody>), but each restricts specific tags on newer neural and generative voice models. Azure has the broadest SSML support; Google restricts <emphasis> and <prosody pitch> on Studio/Chirp voices; Amazon Polly restricts <emphasis> on neural voices.

SSML tag support by TTS provider (Azure Speech Services, Google Cloud TTS, Amazon Polly, and ElevenLabs) across break, say-as, phoneme, sub, prosody, emphasis, and paragraph/sentence tags.
SSML TagAzure Speech ServicesGoogle Cloud TTSAmazon PollyElevenLabs
<speak>RequiredRequiredRequiredN/A
<break>All voicesAll voicesAll voicesFlash v2, Turbo v2 only
<say-as>All voicesAll voicesAll voicesNot supported
<phoneme>All voicesStandard + NeuralAll voicesFlash v2, Turbo v2, Eng v1
<sub>All voicesAll voicesAll voicesNot supported
<prosody>All voicesPartial (no pitch on Studio)Standard + NeuralNot supported
<emphasis>All voicesNot on StudioStandard onlyNot supported
<p> / <s>All voicesAll voicesAll voicesNot supported
Custom extensionsmstts: namespaceNoneamazon: namespaceIPA inline on v3

Support verified against provider documentation, July 2026.

SSML Examples: Common Patterns for Production Applications

1. Reading confirmation codes and order numbers

IVR systems and order confirmation flows need alphanumeric codes read character by character, with pauses between groups for comprehension.

2. Currency and prices

Financial applications need consistent currency formatting, including handling zero cents and multi-currency contexts.

Domain-specific terms that the G2P model consistently mispronounces can be corrected with <phoneme> or <sub>. For terms that appear repeatedly, define them once in a custom lexicon (supported by Amazon Polly and Azure) rather than repeating <phoneme> tags throughout the document.

4. Controlling pacing in long-form narration

For audiobook or announcement applications, <prosody rate> and paragraph-level <break> tags control pacing without editing the source text.

🎯 On-Device Voice AI for Enterprises
Get dedicated support to ensure your specific needs are met.
Talk to Sales

Alternatives to SSML for Pronunciation Control

Not every TTS engine implements SSML. Orca Streaming Text-to-Speech, designed for on-device or streaming deployment, uses lighter-weight approaches to pronunciation control. These alternatives avoid the XML parsing overhead and can be embedded directly in the input text stream, which matters for streaming TTS pipelines where tokens arrive one at a time from an LLM.

1. Inline phoneme syntax

Some engines accept pronunciation overrides as inline markup within plain text rather than XML. For example, Orca Streaming Text-to-Speech uses curly-brace notation with ARPAbet phonemes for English, {Picovoice|P IH K OW V OY S}, and IPA for other languages to embed the pronunciation directly in the text string. This approach integrates with streaming input, where the engine processes LLM tokens as they arrive without needing a complete XML document.

2. Custom pronunciation dictionaries

Amazon Polly and Azure Speech Service support custom lexicons (PLS format), which define pronunciation rules that apply to all synthesis requests without repeating <phoneme> tags. Google Cloud TTS does not support custom lexicons. For applications with a large number of domain-specific terms (medical, legal, financial), lexicons reduce SSML verbosity and centralize pronunciation management.

When SSML is not needed

Modern neural TTS engines handle most text normalization and prosody decisions without SSML. SSML adds value in specific scenarios: correcting mispronounced proper nouns or technical terms, enforcing exact pause timing in IVR flows, controlling number/date/currency formatting in localized applications, and adjusting pitch or rate for accessibility compliance. If the TTS engine pronounces the content correctly without markup, adding SSML increases complexity with no benefit.

Build Production Voice Applications

Orca Streaming Text-to-Speech runs on-device across all platforms with custom pronunciation support via inline ARPAbet phonemes. Enterprise customers work with the Picovoice team for custom voice models with emotional and stylistic controls.

Talk to Sales

FAQ

+
What is SSML in text-to-speech?

SSML (Speech Synthesis Markup Language) is a W3C XML standard that controls how text-to-speech engines render speech. It provides tags for inserting pauses (

), specifying pronunciation (), adjusting pitch and rate (), and formatting numbers, dates, and currencies (). All major cloud TTS providers (Google Cloud TTS, Amazon Polly, Azure Speech Service) support a subset of SSML 1.1.

+
Do all text-to-speech engines support SSML?

No. SSML support varies by engine and by voice model within the same engine. Cloud APIs from Google, Amazon, and Microsoft support core SSML tags, though newer neural and generative voice models restrict certain tags like

and . ElevenLabs supports only and , and only on specific models. On-device TTS engines like Piper TTS and Orca do not use SSML; they use alternative approaches such as inline phoneme notation or rely on their G2P models.

+
How do I fix mispronounced words in TTS without SSML?

Three common approaches exist. First, use the

tag if the engine supports SSML, replacing the problematic text with a phonetically spelled alias. Second, use engine-specific inline notation; Orca accepts directly in the text. Third, define a custom pronunciation lexicon (supported by Amazon Polly and Azure) that applies corrections globally without modifying the input text.

+
What is the difference between <phoneme> and <sub> in SSML?

provides a phonetic transcription using IPA or X-SAMPA, giving precise control over every sound in a word. provides a plain-text replacement that the engine then processes through its own G2P model. is more precise but harder to author; is simpler but depends on the engine's pronunciation of the replacement text.

+
Does SSML affect TTS latency?

SSML parsing overhead depends on the implementation. Complex SSML documents with many tags can increase preprocessing time slightly. Generally, it is negligible relative to model inference time. For streaming TTS pipelines that process LLM tokens in real time, engines that accept inline pronunciation notation rather than SSML avoid the need to buffer and parse a complete XML document.