Realtime streaming
Stream PCM audio and receive partial, final, VAD, timestamp, and translation events.
Streaming uses a dedicated client and event handlers. The async client is recommended for servers already using an event loop.
Transcribe a stream
Audio frames must be PCM16, mono, little-endian. The configured sample rate must match the source.
Handle final segments
Subclass StreamingEventHandlers; only override the events your application needs.
Partial transcripts can change. Persist only final segments.
Translate finalized speech
Realtime translation is applied after a segment becomes final:
segment_ids links each translation to the final transcript segment or segments that produced it. A failed translation does not invalidate the source transcript.
Inspect streaming languages
Query supported streaming input languages and realtime translation targets:
Convert an audio file
Install the audio extra, then convert supported files to the required PCM format:
For the wire protocol and complete event sequence, see Realtime transcription, Realtime translation, and the WebSocket protocol reference.