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.- Python
- TypeScript
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.