Streams the audio bytes immediately or returns a URL that allows immediate streaming.
Turbo Streaming
For low latency turbo streaming, set
voice_engine
toPlayHT2.0-turbo
and use a PlayHT 2.0 voice.
For more information, see supported voice models.
To ensure fair usage, this streaming endpoint is subject to more strict rate-limits and also limits the text size it may take as input. Input text provided to the streaming endpoint may contain at most 20 sentences. A sentence is defined as a sequence of at least 35 characters separated by a punctuation character (.
, ?
or !
). Maximum text length is 2000 characters.
The endpoint responds with a byte audio stream right away:
- Status:
200 - OK
- Body: audio bytes
If the accept
header is application/json
, the endpoint returns data containing an URL that is immediately streamable:
- Status:
201 - CREATED
- Body:
{ "href": "https://play.ht/api/v2/tts/f0gZrOKBKL7veJ6o1M;1KjbyModJp92iPdBp4;w92633zG2nrMalFlEg?format=audio-mpeg", "method": "GET", "contentType": "audio/mpeg", "rel": "item", "description": "URL for fetching the generated audio as a playable stream of bytes" }