Skip to main content
This guide covers migrating from Deepgram Live Audio (Nova) when used without sending the Finalize command mid-session.

All migration guides

This guide contains both bare API descriptions and SDK code. To install the SDK:
If you’re already using the Cartesia SDK, upgrade to version >=3.2.0
Ink 2 only supports English right now.
We expect to add more languages in the coming months.

Connection

Replace the Deepgram WebSocket URL and auth header with Cartesia’s /stt/turns/websocket.
In browsers, WebSockets do not support request headers. Instead, pass the API version as the 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

Sending audio

Both APIs accept raw PCM audio as binary WebSocket frames in the same way.
Cartesia does not support these encodings: flac, amr-nb, amr-wb, opus, ogg-opus, speex, g729
Deepgram’s Finalize command has no equivalent. Ink detects turn boundaries on its own and emits a turn.end when the user stops speaking, so there is nothing to flush.
If you currently send the Finalize command mid-session with Deepgram Nova, consider using Cartesia Ink with manual finalization instead.Take a look at the migration guides page for details.
To close the session cleanly, send a JSON text frame:
Cartesia has no equivalent of Deepgram’s KeepAlive message. The connection has a 3-minute idle timeout that resets every time you send an audio chunk — keep streaming audio (silent or otherwise) to hold it open.

Event mapping

Deepgram emits four server message types, mixing transcript results with separate voice-activity signals. 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.

The Deepgram Results message

Deepgram’s Results carry a lot of information. You can extract similar information from Cartesia’s turn.update and turn.end events.
Deepgram sends UtteranceEnd and speech_final: true separately, but they have the same semantic meaning: “the user has finished speaking”.Cartesia simplifies this into a single high-accuracy signal: turn.end.
A Deepgram Results message:
Becomes a Cartesia turn.update / turn.end event:
turn.start and turn.resume events do not carry a transcript.

Example Server Messages

Hello! Nova’s transcripts are joined with spaces. Ink’s are not.

References

API Reference

Cartesia Realtime STT (Auto)

Full Code Example

Using the Cartesia SDK