> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kugelaudio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Speed

> Pitch-preserving rate control — globally via the speed parameter, per span via <prosody rate> tags.

The `speed` request parameter adjusts playback rate using pitch-preserving
time-stretching (WSOLA), so the voice stays natural at any rate. It applies
uniformly to **all audio in the request** — except inside
[`<prosody rate>` spans](#per-span-speed-with-prosody-rate), which override it.

| `speed` | Effect           | Typical use                                 |
| ------- | ---------------- | ------------------------------------------- |
| `0.8`   | 20% slower       | Dictation, phone numbers, legal disclaimers |
| `1.0`   | Normal (default) | General purpose                             |
| `1.2`   | 20% faster       | Notifications, fast-paced UI feedback       |

Values outside `0.8`–`1.2` are rejected (`400` on REST or a validation
error frame on WebSocket). Choose a value inside the range.

```python theme={null}
audio = client.tts.generate(
    text="This entire sentence is read 20% faster.",
    voice_id=1071,
    speed=1.2,
)
```

<Tip>
  **Dashboard**: The playground in the KugelAudio dashboard includes a
  **Slow / Normal / Fast** speed toggle next to the model selector. Changes
  are reflected live in the SDK code snippet shown below the generator.
</Tip>

## Per-span speed with `<prosody rate>`

To change speed for **part of a request**, wrap that text in an
SSML-style `<prosody rate="...">` tag:

```python theme={null}
audio = client.tts.generate(
    text=(
        'Unsere Rückrufnummer lautet '
        '<prosody rate="slow">0800 5834552.</prosody> '
        'Wir freuen uns auf Ihren Anruf.'
    ),
    voice_id=1071,
)
```

The text inside the span is synthesized at the span's rate; everything
outside keeps the request's global `speed`.

| `rate`          | Effect                                  |
| --------------- | --------------------------------------- |
| `"slow"`        | 0.8× (20% slower)                       |
| `"medium"`      | 1.0× (normal)                           |
| `"fast"`        | 1.2× (20% faster)                       |
| `"0.8"`–`"1.2"` | Any numeric rate in the supported range |

Rules:

* **Inside a span, `rate` overrides the global `speed`**; outside, `speed`
  applies. Numeric span rates outside `0.8`–`1.2` are clamped to the nearest
  endpoint; unlike span rates, an out-of-range global `speed` is rejected.
* Spans can cover anything from a few words to multiple sentences, and
  [`<break>`](/prompting/breaks) tags keep working inside them.
* Spans cannot be nested, and `rate` is the only supported attribute
  (`pitch` / `volume` are rejected).
* **Malformed tags fail loudly** — an unclosed `<prosody>`, an unknown rate,
  or a stray `</prosody>` returns a `400` (REST) or an error frame
  (WebSocket) instead of being silently ignored.
* On the [streaming endpoints](/streaming/overview), a span must open and
  close within a single message.

<Tip>
  For phone numbers and codes, combining a slow span with digit spacing
  (`<prosody rate="slow">0 30 12 34 56 78</prosody>`) or
  [`<spell group="2">`](/prompting/spell#grouping) reads most naturally.
</Tip>
