Skip to main content
POST
/
api
/
v1
/
tts
/
sse
TTS Stream
curl --request POST \
  --url https://api.vachana.ai/api/v1/tts/sse \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key-ID: <x-api-key-id>' \
  --data '
{
  "text": "नमस्ते, आप कैसे हैं?",
  "voice": "speaker_0"
}
'
"event: audio_chunk\ndata: UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAAAAA=\n\nevent: completed\ndata: {\"status\": \"success\"}\n"

Overview

The SSE (Server-Sent Events) endpoint streams synthesized audio in chunks. Use it when you want to start playback or processing before the full audio is ready, reducing perceived latency compared to the REST inference endpoint.

Headers

X-API-Request-ID
string
X-API-Key-ID
string
required

Body

application/json

Request body for TTS inference.

text
string
required
voice
string
required
model
string
default:vachana-voice-v1

Supported TTS models.

Allowed value: "vachana-voice-v1"
audio_config
AudioConfig · object

Audio output configuration.

Response

Successful Server-Sent Events stream

The response is of type string.