Skip to navigation

Synthesize speech with word-level timestamps (streaming)

View as Markdown

Same request shape and model header as /fishaudio/v1/tts, relayed to https://api.fish.audio/v1/tts/stream/with-timestamp, but answers as Server-Sent Events instead of a flat binary stream. Billed identically to /fishaudio/v1/tts.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Headers

modelenumRequiredDefaults to s2.1-pro
Which Fish Audio TTS model to use.
Allowed values:

Request

This endpoint expects a map from strings to any.

Response

A Server-Sent Events stream. Each message event is one JSON payload: audio_base64 (concatenate every chunk, in arrival order, to reconstruct the full audio), content, a cumulative alignment snapshot ({audio_duration, segments: [{text, start, end}]}) keyed by chunk_seq — replace the stored snapshot for that chunk_seq on each new event, never append — and chunk_audio_offset_sec.

Errors

401
Unauthorized Error
404
Not Found Error