Realtime Speech To Speech
Stream microphone audio into a realtime translation session and receive transcripts, translated text, and translated audio.
WSS
Beta. The Speech to Speech WebSocket is generally available for testing but session events, configuration, and audio formats may change in backwards-incompatible ways before GA.
realtime-api-server at wss://realtime.camb.ai/v1/realtime, separate from the /apis/live-tts/ws and /streaming-transcription/listen WebSocket endpoints.
iris model.
Authenticate with the x-api-key WebSocket request header. If your client cannot set WebSocket headers, send credentials in the first session.update event instead.
Quickstart
Use the SDK (Python or TypeScript) β it handles the session lifecycle (including thesession.starting cold-boot wait), normalizes binary and base64 audio frames, and exposes typed events. Input and output audio are PCM16, mono, 24 kHz. The example below streams a WAV file and writes the translated speech to another WAV.
Integration in 4 steps
1
Open the realtime socket
Connect to
wss://realtime.camb.ai/v1/realtime. This endpoint is not under the client.camb.ai/apis namespace used by the other WebSocket API references.2
Send `session.update` as the first message
The first WebSocket message must be a JSON The server responds with
session.update event. The server waits up to 10 seconds for it.session.created, then session.updated.3
Stream input audio
Send microphone audio as base64-encoded bytes in Each decoded audio payload can be up to 256 KiB.
input_audio_buffer.append. Only text WebSocket messages are parsed as realtime events.4
Read translated output
Listen for transcript, translated text, and translated audio events.
response.text.delta values are additive for the current response, and response.audio.delta contains base64-encoded synthesized audio bytes.Authentication
Prefer the WebSocket request header:session.update event can also carry credentials:
auth object are present, the request header credential is used.
Reference
The AsyncAPI spec above documents every client and server event. Quick lookup:Session configuration
Voice selection
By default, translated speech is synthesized with a built-in voice for the target language. To synthesize the translation with one of your own cloned voices, include avoice object in the session configuration:
The voice must belong to your account β stock/built-in voice IDs are rejected with an
error event. Omitting voice (or sending { "type": "default" }) uses the built-in voice. The resolved selection is echoed back in session.created.
If you use the SDK, pass voice_id (Python) or voiceId (TypeScript) to realtime.connect() and it builds this voice object for you:
Supported languages
source_language and target_language accept the BCP-47 tags below (case-insensitive). Pick any supported language as the source and any supported language as the target.
Supported realtime languages (14)
Supported realtime languages (14)
Client events
Server events
Limits
Billing
Active sessions are charged in billing windows and finalized on close, failure, or billing stop. If billing stops a session, the server sends anerror event whose error.message is the billing close reason, then ends the realtime loop.Last modified on June 30, 2026