---
title: "Open an incremental TTS WebSocket"
method: GET
path: "/v1/synthesize/stream"
---

# Open an incremental TTS WebSocket

`GET /v1/synthesize/stream`

Upgrade to WebSocket, then send {"type":"config","language":"en","voice":"..."} as the first text frame, optionally carrying an opening "text". Push more with {"type":"text","text":"..."} and finish with {"type":"end"}. The router answers one {"type":"ready"} frame naming the chosen provider, then binary 24 kHz mono PCM chunks, then {"type":"end"}. Offer the speko.realtime.v1 subprotocol. {"type":"end"} is required -- a vendor will not finish an utterance without it -- and is idempotent, so sending it twice is safe. Incremental text needs a provider that accepts it; the others take all text in the config frame and reject later pushes.

## Headers

- `X-Speko-Objective` 'latency' | 'quality' | 'cost' | 'balanced'
- `X-Speko-Language` string
- `X-Speko-Allow` string
- `X-Speko-Deny` string
- `X-Speko-Max-Price` number

## Response `default`

Error

- Error
  - `error` object, required
    - `code` string, required
    - `message` string, required
    - `type` string
    - `details` unknown

## Other responses

- `101` — WebSocket accepted
- `503` — No streaming TTS provider is available for this request

---

[API](https://skmtc.net/speko/apis/speko-voice-router-api.md) · [All operations](https://skmtc.net/speko/apis/speko-voice-router-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/speko/speko-voice-router-api/versions/ef3d201df72e/schema)
