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

# Low-latency TTS for real-time voice agents

> Rime TTS latency benchmarks, the factors that affect response time, and practical ways to reduce it.

## Latency at a glance

Rime's cloud API delivers sub-200ms end-to-end latency under typical conditions. Coda reaches **sub-100ms model latency on the GPU engine** when self-hosted or on-prem, while Mist v3 has the lowest measured time to first audio.

Via the cloud API, the total time you measure also includes network round-trip: typically 25–50ms from most of the continental US when you pick the closest [regional endpoint](/docs/regional-endpoints). Contact [Rime support](mailto:support@rime.ai) to optimize further.

## Real-time performance benchmarks

<Note>
  These numbers were measured on a single Lambda H100 SXM machine with an H100 SXM5 GPU, 26 vCPUs, 221 GiB RAM, Ubuntu 24.04, and NVIDIA driver `595.58.03`.
</Note>

| Metric                      | Coda   | Mist v3 |
| :-------------------------- | :----- | :------ |
| TTFA (P50) @ 1 Concurrency  | 96 ms  | 37 ms   |
| TTFA (P90) @ 1 Concurrency  | 98 ms  | 56 ms   |
| TTFA (P50) @ 12 Concurrency | 150 ms | 37 ms   |
| TTFA (P90) @ 12 Concurrency | 181 ms | 56 ms   |
| RTF (P99)                   | 0.33   | 0.004   |

**TTFA** = Time-to-First-Audio. **RTF** = Real-Time Factor (synthesis time ÷ audio duration; values below 1.0 mean synthesis is faster than playback).

## Reduce latency

1. **Choose the model for the constraint.** Use `mistv3` for the lowest cloud time to first audio. Choose Coda when voice quality is the priority and sub-100ms engine latency meets the target.
2. **Consume the response as a stream.** Start playback from the first bytes instead of buffering the complete response.
3. **Use the nearest regional endpoint.** Route East Coast traffic to US East and West Coast traffic to US West.
4. **Request only the audio you need.** Smaller payloads cross the network faster. Telephony applications should request 8kHz audio directly.
5. **Skip normalization only for already normalized text.** [`noTextNormalization`](/docs/text-normalization) removes preprocessing, but it is safe only when the input has no digits, abbreviations, or ambiguous punctuation.

## What affects latency

### Factors that affect API response time

1. **Server processing:** Model inference, text preprocessing, and audio postprocessing all contribute to the first response byte.
2. **Payload size:** Larger audio responses take longer to transmit.
3. **Network distance:** A longer route between the application and Rime increases round-trip time.

### Stream the response

Streaming reduces time to first playback because the client can consume the first chunk before Rime finishes generating the complete response. Buffering the whole body delays playback until synthesis and transfer are complete.

<Frame caption="Response time and TTFB for a streaming PCM request">
  <img src="https://mintcdn.com/rimelabs/DVHs1HOnPvW2NRCW/images/streaming-ttfb.png?fit=max&auto=format&n=DVHs1HOnPvW2NRCW&q=85&s=b7ac37ae1cfe193b4e2a59ad77673567" alt="Chart comparing total response time with time to first byte for a streaming PCM request" width="2586" height="678" data-path="images/streaming-ttfb.png" />
</Frame>

The chart uses this request body:

```bash theme={null}
curl -X POST https://users.rime.ai/v1/rime-tts \
  -H 'Accept: audio/L16' \
  -H "Authorization: Bearer $RIME_API_KEY" \
  -H 'Content-Type: application/json' \
  --fail \
  --show-error \
  -d '{"text": "I love the book that she gave me. And I was so happy that she gave it to me.", "speaker": "cove",  "modelId": "mistv3"}'
```

To consume a streaming response in Python, iterate over the response body as it arrives instead of buffering the whole thing:

```python Python theme={null}
import os

import requests

with requests.post(
    "https://users.rime.ai/v1/rime-tts",
    headers={
        "Authorization": f"Bearer {os.environ['RIME_API_KEY']}",
        "Content-Type": "application/json",
        "Accept": "audio/mpeg",
    },
    json={
        "speaker": "astra",
        "text": "Hello from Coda.",
        "modelId": "coda",
        "lang": "en",
    },
    stream=True,
) as response:
    response.raise_for_status()
    with open("hello.mp3", "wb") as f:
        for chunk in response.iter_content(chunk_size=4096):
            f.write(chunk)
```

<Info>Rime's models produce PCM audio by default, and conversion and resampling must take place for sampling rates other than the model's native rate (24kHz for Coda, 22.05kHz for Mist). For low-bandwidth applications, the smaller payload usually outweighs the added server processing.</Info>

## Network latency by region

Rime serves the API from multiple regions so you can route requests to the data center closest to your application. Picking the closest endpoint typically shaves tens of milliseconds off round-trip time.

These are rough round-trip times (RTT), the back-and-forth network delay between your application and Rime, from major US metros to each region:

| From metro                                | To US East | To US West |
| :---------------------------------------- | :--------- | :--------- |
| East Coast (NYC, DC, Boston, Atlanta)     | 5–25 ms    | 60–85 ms   |
| Midwest / South (Chicago, Dallas, Denver) | 25–55 ms   | 35–65 ms   |
| West Coast (SF, LA, Seattle)              | 60–85 ms   | 5–25 ms    |

Rules of thumb:

* **Same region** (your app and the Rime endpoint in the same AWS region): typically 1–10 ms.
* **Coast-to-coast**: \~60 ms is the physical floor, set by the speed of light in fiber across \~2,500 miles. 60–85 ms is normal.
* **Above 90 ms** between major US metros usually points to a suboptimal network route, not Rime.

**For voice AI:** if you serve users nationwide from a single region, far-coast users will see 60–85 ms of network round-trip on top of Rime's inference time. To stay comfortably under 200 ms end-to-end, route East-coast users to US East and West-coast users to US West.

For the full endpoint URLs and routing guidance, see [Regional endpoints](/docs/regional-endpoints). To measure TTFB against each endpoint from your own machine, run [`rime speedtest`](/cli-reference/rime-monitoring).
