# What is SSML, and how does it control a text to speech voice?

SSML is the W3C markup that tells a text to speech voice how to read a script: pauses, speed, pitch, emphasis, and audio. Common tags, IVR use, and examples.

Published 2026-11-24. Paxa Labs.

SSML, the Speech Synthesis Markup Language, is a [W3C standard](https://www.w3.org/TR/speech-synthesis11/) for telling a text to speech voice how to read a script. It wraps the script in XML tags. A tag can add a pause, slow down a sentence, stress a word, switch to another voice, or play a recording between two lines.

Plain text leaves those choices to the engine. SSML fixes them in the script, which is why phone menus, voice assistants, and announcement systems are often written in it. Cloud speech services such as Azure AI Speech read SSML too, each with its own subset and its own extensions.

## What does SSML stand for, and who publishes it?

SSML stands for Speech Synthesis Markup Language. The World Wide Web Consortium (W3C), the standards body behind XML, published [version 1.0](https://www.w3.org/TR/2004/REC-speech-synthesis-20040907/) as a Recommendation in 2004 and [version 1.1](https://www.w3.org/TR/speech-synthesis11/) in 2010. Version 1.1 is the current one.

The standard describes itself as an XML-based markup language for assisting the generation of synthetic speech in web and other applications. An SSML document is plain text that a person can read and edit, with the instructions for the voice written as tags around the words.

## What does an SSML document look like?

Here is a short phone greeting written in SSML:

SSML:

```xml
<speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">
  Thank you for calling.
  <break time="500ms"/>
  <prosody rate="90%">For billing, press 1. For technical support, press 2.</prosody>
  <mark name="menu_end"/>
</speak>
```

The `speak` element holds the whole document and names its language in `xml:lang`. Inside it, `break` adds 500ms of silence after the greeting, and `prosody` reads the menu at 90% of the normal rate. `mark` names the point where the menu ends. When the voice reaches it, the application is told.

## What are the most common SSML tags?

These are the SSML 1.1 elements most scripts use:

| Tag | What it does |
| --- | --- |
| `speak` | The root of every document. It names the language and the SSML version. |
| `voice` | Switches to another voice for the text inside it. |
| `break` | Adds a pause, by length (`time`) or by strength (`strength`). |
| `prosody` | Changes the rate, pitch, pitch range, and volume of the text inside it. |
| `emphasis` | Stresses the words inside it. |
| `say-as` | Says what kind of text it holds, such as a date, a number, or a telephone number, which changes how it is read. |
| `phoneme` | Gives the exact pronunciation of a word in a phonetic alphabet. |
| `sub` | Speaks an alias in place of the written text, such as World Wide Web Consortium for W3C. |
| `audio` | Plays a recorded file, and speaks the text inside it when the file cannot play. |
| `mark` | Places a named marker, and the application is told when speech reaches it. |
| `p`, `s` | Mark paragraphs and sentences. |
| `lang` | Marks text in another language. |
| `lexicon` | Loads a pronunciation dictionary for the document. |

Values follow one pattern across the standard. A time is written in seconds or milliseconds, such as `2s` or `500ms`. A rate can be a word such as `slow` or a percentage of the normal rate. A volume can be a word, a change in decibels, or `silent`.

## Why do IVR systems and call centers use SSML?

A phone prompt is heard once, by a caller with a keypad in hand. The pause after each option gives them time to choose. A slower sentence helps with an account number or an address, and a stressed word picks out the option that matters.

SSML and the languages behind phone menus come from the same W3C work. VoiceXML, the W3C language for voice applications such as IVR menus, [models its prompts on SSML](https://www.w3.org/TR/voicexml20/), and a VoiceXML platform must process SSML as the standard defines. Prompts written for those platforms are SSML documents. They move to another voice engine with their markup intact when the new engine reads SSML.

Marks matter on a phone line too. A mark before the menu tells the IVR when the options start, which is when it can begin accepting keypresses. [The call center use case](https://paxalabs.com/use-cases/call-centers) shows where generated speech fits on a support line.

## What are Azure's mstts extensions?

Microsoft's Azure AI Speech reads SSML [based on version 1.0](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-synthesis-markup-structure) and adds elements of its own in the `mstts` namespace. A document declares that namespace on `speak`, as `xmlns:mstts="http://www.w3.org/2001/mstts"`, and writes the elements with the `mstts:` prefix.

- `mstts:express-as` [sets a speaking style](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-synthesis-markup-voice), such as `cheerful`, `calm`, or `customerservice`, and its `styledegree` sets how strong the style is.
- `mstts:silence` adds silence before or after the text, or between sentences.
- `mstts:backgroundaudio` lays one recording under the whole document, looping it and fading it in and out.
- `bookmark` places a named marker, as `mark` does in the standard.

These elements sit outside the W3C standard. A document that uses them is written for Azure, and it reads as intended elsewhere only on an engine that supports the same extensions.

## How do you use SSML with Paxa?

Paxa TTS Flash v2 reads a subset of SSML 1.1 with Azure's `mstts` extensions. Send the document to `POST /v1/tts` in an `ssml` field in place of `text`, with a `voice` for any text outside a `<voice>` element. The response is the audio, with the time of every mark and a report of anything that did not read as written.

POST /v1/tts:

```json
{
  "model": "paxa-tts-flash-v2",
  "voice": "khanomkrok",
  "ssml": "<speak version=\"1.1\" xmlns=\"http://www.w3.org/2001/10/synthesis\" xml:lang=\"en-US\"> Thank you for calling. <break time=\"500ms\"/> <prosody rate=\"90%\">For billing, press 1. For technical support, press 2.</prosody> <mark name=\"menu_end\"/> </speak>"
}
```

A [voice agent](https://paxalabs.com/use-cases/voice-agents) on `WS /v1/tts/live` sends the same document as an `ssml` frame between the text of its replies. It speaks on the same connection, after any text already buffered.

| Markup | On Paxa |
| --- | --- |
| `voice`, `break`, `prosody`, `emphasis`, `p`, `s`, `sub` | Read as the standard describes them. A `voice` name is a Paxa voice id. |
| `mark`, `bookmark` | Read, and each comes back with its time in the audio. |
| `mstts:express-as` | Read, with each of the 34 Azure styles played as a delivery direction. |
| `mstts:silence`, `audio`, `mstts:backgroundaudio` | Read, with the fallback text of a clip that cannot play. |
| `say-as`, `phoneme`, `lexicon`, `lang`, `w`, `token`, `lookup` | Dropped. The text inside reads as written, and the report lists each one. |

Every Paxa TTS Flash v2 voice speaks English, Thai, and Mandarin and changes language without a `lang` tag. Write a date, an amount, or a code in the words it should be read in, or give it a `sub` alias.

The text a document compiles to bills at the speech rate, 10 credits per 1,000 characters, including the tags it writes for styles, prosody, and short pauses. The markup, audio clips, background audio, and the silence between stretches of speech bill nothing. [The SSML page](https://paxalabs.com/ssml) sets out who it is for, and [the SSML guide in the docs](https://paxalabs.com/docs/ssml) lists every element, attribute, and limit.

## How do you move SSML prompts from Azure to Paxa?

Most prompts need three changes:

- Send the document as `ssml` in a JSON body to `POST /v1/tts`, with `"model": "paxa-tts-flash-v2"` and a Paxa API key.
- Replace each `voice` name with a voice id from [the voices page](https://paxalabs.com/voices). Azure voice names do not map to Paxa voices.
- Where a prompt uses `say-as` or `phoneme`, write the date, amount, or code as it should be spoken, or give it a `sub` alias.

[Migrate from Azure](https://paxalabs.com/docs/ssml#azure) in the docs lists every other difference, and [the launch post](https://paxalabs.com/blog/ssml-for-paxa-tts) sends the same prompt over HTTP and on a live socket.

## Common questions

### Is SSML the same as XML?

SSML is written in XML. Every SSML document is an XML document whose root element is `speak`, and it has to be well formed, with every tag closed and every attribute value in quotes. The characters `&`, `<`, and `>` in the text are written as `&amp;`, `&lt;`, and `&gt;`.

### Do you need SSML for text to speech?

Plain text is enough for most scripts. A modern voice pauses at punctuation and lifts the end of a question without any markup. SSML earns its place where the timing has to be exact, as in a phone menu, or where the prompts already exist in it. [What is text to speech?](https://paxalabs.com/guides/what-is-text-to-speech) covers the plain-text case.

### Does SSML work the same on every engine?

Each engine reads its own part of the standard and may add extensions. Azure AI Speech states that the elements it supports can differ from the W3C standard. Test a document on the engine that will speak it, and check that engine's list of supported tags.

### What is the difference between SSML and bracket tags?

SSML is a standard written in XML around the text. Bracket tags are words in square brackets inside plain text, such as `[cheerful]` or `[pause 500ms]`, which Paxa TTS Flash v2 reads as [directions](https://paxalabs.com/emotions) and [pauses](https://paxalabs.com/pauses). Both work on Paxa, and an SSML document can carry bracket tags in its text.

### Can SSML play audio files?

Yes. The `audio` element plays a recording from a URL, such as a chime or a recorded name, and speaks the text inside it if the file cannot play. Azure's `mstts:backgroundaudio` adds one recording under the whole document. Both read on Paxa, and clips bill nothing.

### How much does SSML cost on Paxa?

The markup itself does not bill. The text a document compiles to, with the tags written for its styles and prosody, bills at 10 credits per 1,000 characters, the same rate as plain text. [The pricing page](https://paxalabs.com/pricing) lists every plan.

## Next steps

- Read [the SSML page](https://paxalabs.com/ssml) for what Paxa reads and the teams it serves.
- Open [the SSML guide](https://paxalabs.com/docs/ssml) in the docs for every element, attribute, and limit.
- Listen to [the voices](https://paxalabs.com/voices) and choose the ids for your `voice` names.
- See how [Text-to-Speech](https://paxalabs.com/text-to-speech) serves a [call center](https://paxalabs.com/use-cases/call-centers) and a [voice agent](https://paxalabs.com/use-cases/voice-agents), and how [realtime text to speech](https://paxalabs.com/realtime-tts) streams a reply.
