Skip to main content

Overview

The Live Transcription API turns a stream of audio into text in real time over a single WebSocket connection. You send raw audio frames as you capture them and receive interim (partial) results immediately, followed by final, stabilized segments — ideal for live captions, voice agents, dictation, and meeting transcription. Live transcription runs on Premium accuracy (punctuation, per-word confidence, language detection, and optional speaker labels).

Key features

  • Sub-second interim results as the speaker talks
  • Stabilized final segments with word timestamps
  • Optional speaker labels (diarize)
  • 50+ languages with auto-detect
  • One artifact: a finished session is saved as a normal transcription job you can fetch, edit, and export (SRT/VTT/TXT/JSON) like any batch transcript

Endpoint

Authentication

WebSocket handshakes can’t carry custom headers from every client, so the API key travels as a query parameter:
Browser/session clients may instead pass a short-lived JWT as ?token=.... Server-side clients that can set handshake headers may send the API key as Authorization: Bearer ap_your_key instead. When that header is present it is the only credential used: a malformed or invalid Bearer value is refused and never falls back to ?api_key= or ?token=.

Protocol

Messages are JSON text frames, except the audio you upload, which is binary. Client → server Server → client The first server frame is always ready. Send audio in small chunks (e.g. 100 ms) for the lowest latency.

Audio format

Declare the format in the start frame. sample_rate, channels and max_duration_seconds must be JSON integers (not strings or decimals). A sample_rate outside 8000–48000 Hz, channels other than 1 or 2, or a max_duration_seconds below 1 is rejected with an INVALID_CONFIG error before the session starts and before any credits are reserved. 16 kHz mono is recommended for the lowest latency and bandwidth. language is a language code such as "en", "pt-BR" or "yue". Omitting it, or sending null or "auto", uses the default language (English). Send "multi" for multilingual detection. diarize must be true or false. Any other value is rejected with INVALID_CONFIG. Each binary audio message may be at most 1 MiB (1,048,576 bytes); a larger one is rejected with FRAME_TOO_LARGE and ends the session. Audio beyond max_duration_seconds is not transcribed or billed: the session stops at that point with MAX_DURATION_REACHED.
Prepaid billing. Live transcription is prepaid at the standard transcription rate (220 credits/minute). Credits for the maximum session length are reserved up front and settled to your actual streamed duration when the session ends (the unused reservation is released). If you don’t have enough credits to start, the session is rejected with INSUFFICIENT_CREDITS before any audio flows.

Quickstart

You can also consume events as an async iterable instead of with .on():

Capturing microphone audio in the browser

Browsers capture at the hardware sample rate, so request a 16 kHz AudioContext and convert float samples to 16-bit PCM before sending:

Error codes

Next steps

Speech-to-Text (batch)

Transcribe files and URLs, with Standard or Premium accuracy.

Authentication

Create an API key to authenticate your streams.