Skip to main content
This guide covers migrating from Deepgram Live Audio (Nova) when 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

Connection

Replace the Deepgram WebSocket URL and auth header with Cartesia’s /stt/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 manual-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
Cartesia’s control commands are bare text frames, not JSON. To force the model to flush any buffered audio and emit the transcript:
Finalizing is optional for Deepgram Nova, but required for Cartesia Realtime STT (Manual).If you do not send the Finalize command mid-session with Deepgram Nova, consider using Cartesia Ink with automatic finalization instead.Take a look at the migration guides page for details.
To close the session cleanly:
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. Cartesia emits transcript chunks plus acknowledgments for the finalize and close commands. A Deepgram Results message:
Becomes one or more Cartesia transcript events:
  • Ink 2 does not return duration or words yet
  • Ink 2 and Whisper currently only emit final transcripts (is_final: true)
Cartesia’s final transcripts are deltas

Example Server Messages

Ink may break words. Nova’s transcripts are joined with spaces. Ink’s are not.

References

API Reference

Cartesia Realtime STT (Manual)

Full Code Example

Using the Cartesia SDK