> Append .md to any page URL for clean Markdown. Index: https://docs.speechify.ai/llms.txt.
>
> Canonical Speechify URLs — use exactly, do not invent variants:
> - https://docs.speechify.ai — this site (API reference, SDKs, quickstarts)
> - https://speechify.ai — marketing + product site
> - https://platform.speechify.ai — customer dashboard, signup, API keys, billing
> - https://api.speechify.ai — API base URL
> - https://github.com/SpeechifyInc — GitHub org. `github.com/speechify` does not exist.
> - https://status.speechify.ai — status + incidents
> - https://speechify.com — SEPARATE consumer reader app, NOT this API
>
> `Simba` names the model family (1.6 multilingual, 3.0 streaming), not the brand. `SimbaVoice` / `simbavoice.ai` are retired.

# Speech Synthesis Markup Language (SSML)

> Use SSML with SpeechifyAI Build TTS to control pitch, rate, volume, pauses, emphasis, and emotion. Learn supported tags and how to escape characters.

SSML is an XML-based markup language for controlling pitch, rate, pauses, emphasis, and emotion in synthesized speech. Wrap your content in a `<speak>` tag:

```xml
<speak>Your content to be synthesized here</speak>
```

## Escaping Characters

Transforming text into SSML requires escaping certain characters to ensure correct interpretation:

| Character | Escaped Form |
| --------- | ------------ |
| `&`       | `&amp;`      |
| `>`       | `&gt;`       |
| `<`       | `&lt;`       |
| `"`       | `&quot;`     |
| `'`       | `&apos;`     |

```xml title="Example"
<!-- Original: Some "text" with 5 < 6 & 4 > 8 in it -->
<speak>Some &quot;text&quot; with 5 &lt; 6 &amp; 4 &gt; 8 in it</speak>
```

```ts title="Escape Function"
const escapeSSMLChars = (text: string) =>
  text
    .replaceAll("&", "&amp;")
    .replaceAll("<", "&lt;")
    .replaceAll(">", "&gt;")
    .replaceAll('"', "&quot;")
    .replaceAll("'", "&apos;");
```

## Supported SSML Tags

#### prosody

The `prosody` tag controls the expressiveness of synthesized speech by manipulating pitch, rate, and volume.

```xml
<speak>
    This is a normal speech pattern.
    <prosody pitch="high" rate="fast" volume="+20%">
        I'm speaking with a higher pitch, faster than usual, and louder!
    </prosody>
    Back to normal speech pattern.
</speak>
```

**Parameters**

Adjusts the pitch of speech delivery.

**Values:**

* `x-low`, `low`, `medium` (default), `high`, `x-high`
* Percentage adjustments: `-83%` to `+100%` (e.g., `+20%`, `-30%`)

Alters speech speed.

**Values:**

* `x-slow`, `slow`, `medium` (default), `fast`, `x-fast`
* Percentage adjustments: `-50%` to `+9900%` (e.g., `+20%`, `-30%`)

Controls speech loudness.

**Values:**

* `silent`, `x-soft`, `medium` (default), `loud`, `x-loud`
* Decibel adjustments: Number with `dB` suffix (e.g., `-6dB`)
* Percentage adjustments (e.g., `+20%`, `-30%`)

#### break

The `break` tag controls pausing between words, following [W3 specifications](https://www.w3.org/TR/speech-synthesis11/#S3.2.3).

```xml
<speak>
    Sometimes it can be useful to add a longer pause at the end of the sentence.
    <break strength="medium" />
    Or <break time="100ms" /> sometimes in the <break time="1s" /> middle.
</speak>
```

**Parameters**

Specifies pause strength.

**Values:**

* `none`: 0ms
* `x-weak`: 250ms
* `weak`: 500ms
* `medium`: 750ms
* `strong`: 1000ms
* `x-strong`: 1250ms

Specifies pause duration (0-10 seconds).

**Values:**

* Milliseconds: `ms` suffix (e.g., `100ms`)
* Seconds: `s` suffix (e.g., `1s`)

#### emphasis

The `emphasis` tag adds or removes emphasis from text, modifying speech similarly to `prosody` but without setting individual attributes.

```xml
<speak>
    I already told you I <emphasis level="strong">really like</emphasis> that person.
</speak>
```

**Parameters**

Specifies emphasis level.

**Values:**

* `reduced`
* `moderate`
* `strong`

#### sub

The `sub` tag replaces pronunciation for contained text, following [W3 specifications](https://www.w3.org/TR/speech-synthesis11/#S3.1.11).

```xml
<speak>
    For detailed information, please read the <sub alias="Frequently Asked Questions">FAQ</sub> section.
</speak>
```

**Parameters**

Specifies text to be spoken instead of enclosed text.

#### speechify:style

The `speechify:style` tag controls emotion of the voice. See [Emotion Control](/build/guides/text-to-speech/emotion-control) for the full list of 13 supported emotions and best practices.

```xml
<speak>
    <speechify:style emotion="cheerful">Great news! Your order shipped!</speechify:style>
</speak>
```

**Parameters**

Sets the voice emotion. Values: `angry`, `cheerful`, `sad`, `terrified`, `relaxed`, `fearful`, `surprised`, `calm`, `assertive`, `energetic`, `warm`, `direct`, `bright`.

## Examples

#### Basic SSML

```xml
<speak>Welcome to SpeechifyAI Build.</speak>
```

#### Prosody Control

```xml
<speak>
  <prosody rate="slow" pitch="low">
    This text will be spoken slowly with a low pitch.
  </prosody>
  <prosody rate="fast" pitch="high">
    While this text will be spoken quickly with a high pitch.
  </prosody>
</speak>
```

#### Pauses & Emphasis

```xml
<speak>
  Let me tell you something important.
  <break time="750ms" />
  This is <emphasis level="strong">critical</emphasis> information.
</speak>
```

#### Emotional Styling

```xml
<speak>
  <speechify:style emotion="cheerful">
    I'm so excited to tell you about our new features!
  </speechify:style>
  <break time="500ms" />
  <speechify:style emotion="calm">
    Now, let me explain how they work.
  </speechify:style>
</speak>
```