Stream speech in a named voice as raw PCM
Changed onRender the given text as speech in one of the named voices from GET /v1/voices, streaming the audio while it is generated, so playback can start after the first ~80 ms instead of after the whole clip. The response body is the audio itself: raw 16-bit little-endian PCM, mono, at sample_rate (24 kHz by default), with no header. Each request renders one utterance. The response starts with the first audio, so a request that fails before then gets an ordinary error response with its status code; if generation fails after audio has started, the connection is terminated before the response completes. Closing the connection stops generation.
Request
- Base URLhttps://api.kalpalabs.ai
- AuthHTTP bearer
Path parameters
A named voice id, as listed by GET /v1/voices.
Request body
Example request
{
"text": "Hey there! How are you doing today?",
"model": "kalpa-tts-1"
}Response
The audio as it is generated: raw 16-bit little-endian PCM, mono, at sample_rate.
Changes
- warning
removed the request property
/
- warning
- info
endpoint added
- info