Skip to main content
Use this tutorial to make your first realtime STT calls with Ink-2.

Prerequisites

  • A Cartesia API key. Create one here, then add it to your shell profile:
  • A language runtime and package manager:

Stream audio and receive transcripts

In these scripts, we programmatically invoke Cartesia’s TTS to generate audio input that we then pass to Ink-2 for transcription.
1

Install the client library

2

Create a realtime STT script

realtime-stt.py
3

Run the script

Your console should show Ink-2’s emitted events - specifically turn.update events with incremental, additive transcripts. Finally, you should see a turn.end event with the full TTS transcript.

What just happened

You streamed raw PCM audio to Ink-2 over WebSocket and read transcript events as they arrived.
turn.update gives live progress for the active turn, and turn.end gives the finalized transcript for that turn.

What’s next

Learn about Ink-2

More on the realtime STT model.

Understand turn detection

See how Ink-2 detects when a user starts and stops speaking.

Build with Ink

Find integrations, SDKs, examples, and migration guides.