commit_strategy=vad.
All migration guides
If you’re already using the Cartesia SDK, upgrade to version
>=3.2.0Ink 2 only supports English right now.
We expect to add more languages in the coming months.
We expect to add more languages in the coming months.
Connection
Replace the ElevenLabs WebSocket URL and auth header with Cartesia’s/stt/turns/websocket.
cartesia_version query param and use a short-lived access token using the access_token query param instead of an API key.
Connect to the auto-finalization WebSocket with the Cartesia SDK:
Query parameters
encoding
encoding
ElevenLabs bundles the sample format and rate into a single
All Cartesia encodings support all sample rates.
audio_format token. Cartesia splits them into encoding and sample_rate.Cartesia also accepts
pcm_s32le, pcm_f16le, pcm_f32le, and pcm_alaw.All Cartesia encodings support all sample rates.
Sending audio
ElevenLabs wraps each audio chunk in a JSON formatted text frame and base64-encodes the audio bytes.Cartesia accepts audio chunks as binary frames: send the raw audio bytes directly:
- No need to supply previous text
- Sample rate is determined upon connection by the
sample_ratequery parameter
Sending audio with the SDK
Decoding base64 encoded audio before sending
Committing and closing
Event mapping
Scribe emits apartial_transcript, then a committed_transcript when its VAD commits a segment.
Cartesia folds the same information into a turn lifecycle: turn.start, turn.update, turn.eager_end, turn.resume, and turn.end. See Turn Detection for the full state machine.
Partial transcripts
An ElevenLabspartial_transcript:
turn.update:
Committed transcripts
An ElevenLabscommitted_transcript:
turn.end:
Example Server Messages
Scribe’s transcripts are joined with spaces. Ink’s are not.
References
API Reference
Cartesia Realtime STT (Auto)
Full Code Example
Using the Cartesia SDK