Skip to main content

Overview

1

Step 1 — Generate a voice embedding

Upload a reference audio clip to get a speaker_embedding. See Voice Clone Embeddings.
2

Step 2 — Synthesize with your cloned voice — this page

Pass the speaker_embedding from Step 1 to this endpoint to stream cloned voice audio in real-time with the lowest latency.
Stream cloned voice audio in real-time with the lowest latency via WebSocket. Pass the speaker_embedding from Voice Clone Embeddings to use your cloned voice. For simpler use cases, see Voice Cloning REST or Voice Cloning Streaming.

Endpoint

Authentication

All Realtime connections require the following headers:

Request Format

Send a JSON message with the following structure:

Response

The server uses the same WebSocket message protocol as TTS Realtime. Send a JSON synthesis request; receive JSON-wrapped base64 audio chunks.

Connection flow

  1. Connect to wss://api.vachana.ai/api/v1/tts with X-API-Key-ID.
  2. Send a JSON message with text, model, speaker_embedding, and audio_config.
  3. Receive start, then audio chunks, then complete.
  4. Decode each chunk’s data.audio from base64 and append in order.

Server messages

start — synthesis began:
Audio chunk:
complete — all audio sent:
error — synthesis failed:
Include a complete audio_config (sample_rate, num_channels, sample_width, encoding, container) matching VC REST examples.

Example Usage