{
"type": "init",
"model_id": "sonic-3",
"voice": "f786b574-daa5-4673-aa0c-cbe3e8534c02",
"encoding": "linear16",
"sample_rate": 24000
}{
"type": "text",
"text": "Hello, this is Cartesia Sonic 3."
}{
"type": "flush"
}{
"type": "cancel"
}{
"type": "close"
}{
"type": "keepalive"
}{
"type": "audio_chunk",
"context_id": "9baf38d7-799e-40f2-88d1-daeacbdb3910",
"status_code": 206,
"done": false,
"data": "AAF+/dD7n/wj/rD/owGoBEQHBgjTBcoDjAITAk0BtwF0BFUI5wmlB7cEAgO3ArIBUwB0AJwDDQbQBacCEgDA/vD96vxr/H3+hwAqASr/Z/3C/BEAEQAUAA==",
"step_time": 67.49622,
"flush_id": 0
}{
"type": "audio_end",
"context_id": "9baf38d7-799e-40f2-88d1-daeacbdb3910",
"status_code": 200,
"done": true
}{
"type": "error",
"message": "Provider returned an unexpected error",
"status_code": 500,
"error_code": "provider_error",
"done": true,
"request_id": "req-9b1c2f",
"doc_url": "https://docs.cartesia.ai/errors/provider_error",
"context_id": "demo-context-123"
}Cartesia Sonic 3
Stream low-latency speech synthesis from Cartesia Sonic 3 over WebSocket with a multilingual catalog of voices and context-aware controls.
Documentation Index
Fetch the complete documentation index at: https://docs.slng.ai/llms.txt
Use this file to discover all available pages before exploring further.
{
"type": "init",
"model_id": "sonic-3",
"voice": "f786b574-daa5-4673-aa0c-cbe3e8534c02",
"encoding": "linear16",
"sample_rate": 24000
}{
"type": "text",
"text": "Hello, this is Cartesia Sonic 3."
}{
"type": "flush"
}{
"type": "cancel"
}{
"type": "close"
}{
"type": "keepalive"
}{
"type": "audio_chunk",
"context_id": "9baf38d7-799e-40f2-88d1-daeacbdb3910",
"status_code": 206,
"done": false,
"data": "AAF+/dD7n/wj/rD/owGoBEQHBgjTBcoDjAITAk0BtwF0BFUI5wmlB7cEAgO3ArIBUwB0AJwDDQbQBacCEgDA/vD96vxr/H3+hwAqASr/Z/3C/BEAEQAUAA==",
"step_time": 67.49622,
"flush_id": 0
}{
"type": "audio_end",
"context_id": "9baf38d7-799e-40f2-88d1-daeacbdb3910",
"status_code": 200,
"done": true
}{
"type": "error",
"message": "Provider returned an unexpected error",
"status_code": 500,
"error_code": "provider_error",
"done": true,
"request_id": "req-9b1c2f",
"doc_url": "https://docs.cartesia.ai/errors/provider_error",
"context_id": "demo-context-123"
}API key issued by SLNG. Pass as Authorization: Bearer <token> in the WebSocket upgrade request headers.
GET
Target world part override. Auto-selected if not provided. Available world parts: ap, eu, na.
ap, eu, naInitialize a Cartesia Sonic 3 TTS session with provider-specific configuration.
Send text to synthesize on Cartesia Sonic 3 with optional generation controls.
Standalone segment boundary on the active Cartesia Sonic 3 context.
Cancel an in-progress Cartesia Sonic 3 synthesis context.
Close the session and stop any further audio.
Keep the WebSocket connection alive during silence.
Streaming audio chunk from Cartesia Sonic 3.
Signals the end of audio generation.
Indicates an error occurred during synthesis.
Was this page helpful?