Tools / Speech to text API
The speech to text API ranked #1 for streaming accuracy
wss://api.cartesia.ai/stt/turns/websocket
Talk and watch it transcribe
Join the teams making the switch to Cartesia
Speech to text in Python: your first transcript
Install the SDK
Use Python 3.9 or later. The websockets extra adds realtime streaming.
Set your API key
Create a key in the Cartesia playground and store it in an environment variable, so it never sits in your code.
Using PowerShell?
$env:CARTESIA_API_KEY="your-api-key"Transcribe a recording
Save this script as transcribe.py next to a mono, 16-bit WAV file named call.wav, then run it. The script streams the audio at the speed it was recorded and prints each finished turn.
For live audio, send microphone or phone-call chunks as they arrive instead of reading a file.
- Model
- ink-2
- Endpoint
- /stt/turns/websocket
Pick the endpoint that fits your audio
Stream live audio over a WebSocket. Upload a finished recording in one HTTP request.
Voice agents
/stt/turns/websocket
- Transport
- WebSocket
- Returns
- Turn events with full transcripts
Cartesia decides when the speaker is done and sends a turn.end event with the whole turn.
Read the turn detection guideYour own turn control
/stt/websocket
- Transport
- WebSocket
- Returns
- Transcript updates
Use this when your app already runs a voice activity detector or push-to-talk. Send finalize when the speaker stops to get the transcript right away.
Read the realtime API referenceRecorded files
/stt
- Transport
- HTTP
- Returns
- One transcript
Upload a whole WAV or MP3 file and get one transcript back, with optional word timestamps.
Read the batch API referenceAccurate where voice agents usually break
Callers read out card numbers, spell their names, and pause mid-sentence. Your agent needs a correct transcript at each of those moments.
Ranked #1 for streaming accuracy
Ink-2, Cartesia's streaming speech-to-text model, writes phone numbers, emails, and UUIDs correctly and stays accurate on noisy phone lines without a separate noise filter.
Turn detection without a VAD
Ink-2 decides when a turn is over from what the caller says, so you can drop your separate voice activity detector (VAD). A turn.eager_end event lets your LLM start a reply before the turn is confirmed.
Your product's words, spelled right
Keyterm prompting biases recognition toward the names and jargon your callers use. Pass up to 100 terms on each connection.
SDKs and voice agent frameworks
Official Python and JavaScript SDKs handle the WebSocket for you, and Cartesia's Pipecat and LiveKit integrations add Ink-2 to an existing agent.
Where speech to text sits in a voice agent
Ink-2 sits between the caller's audio and your LLM, and its turn events tell the agent when to reply.
Your audio
Stream microphone, browser, or phone-call audio as raw PCM, μ-law, or A-law, at the sample rate your source already uses.
Ink-2
Writes the transcript while the caller talks and sends turn.end when the caller has finished.
Your agent
Passes the finished turn to your LLM. Start the reply on turn.eager_end to answer sooner, and drop it if turn.resume arrives.
Enterprise-grade security.From Cloud to Local.
HIPAA compliant

SOC 2 Type 2

GDPR

PCI
Add speech to text to your product
A free account includes up to 111 minutes of Ink-2 transcription a month. Talk to us about volume pricing, on-prem deployment, or a BAA.
Explore more voice tools
Speech to text API FAQs
Which speech to text API is best?
For live conversations like voice agents, pick the API that is accurate while it streams and knows when the speaker is done. Ink-2 is ranked #1 for streaming speech-to-text accuracy and detects turns itself, so one model replaces a transcription model plus a voice activity detector.
Is there a free speech to text API?
Yes. A free Cartesia account includes monthly credits that cover up to 111 minutes of Ink-2 transcription through the API, and paid plans add more. To try speech to text without writing code, use the free online tool.
How much does the Cartesia speech to text API cost?
Transcription with Ink-2 costs 3 credits per second of audio, drawn from your plan's monthly credits. The free plan covers up to 111 minutes a month, and the pricing page lists the minutes each paid plan includes.
How do I convert speech to text in Python?
Install the SDK with pip install "cartesia[websockets]", set CARTESIA_API_KEY, and open a WebSocket with client.stt.auto_finalize.websocket(model="ink-2", ...). Send raw audio chunks with send_raw and read each finished transcript from the turn.end events. The Python section of this page has a complete script.
Can I transcribe audio files with the Cartesia speech to text API?
Yes. The batch endpoint takes a whole recording, such as a WAV or MP3 file, in one HTTP request and returns one transcript, with optional word timestamps. The realtime WebSocket only accepts audio as fast as it was recorded, so batch is the faster way to transcribe a file.
What languages does the Cartesia speech to text API support?
Ink-2 transcribes English, Spanish, French, Hindi, and Japanese, and detects which of them is being spoken.
What is a speech to text API?
A speech to text API (also called an STT, speech recognition, or transcription API) takes audio from your app and returns the words as text. A streaming API returns the transcript while the speaker is still talking, which is what voice agents and live captions need.
Can I run Cartesia's speech to text API in my own infrastructure?
Yes. Ink-2 deploys on-prem (including air-gapped environments), in your own VPC on AWS, GCP, or Azure, or as an OEM license embedded in your product. These deployments, and zero data retention, are available under enterprise contracts.