Realtime Overview
Realtime is a Voice Context Layer mode for live speech. [Recorded](/docs/recorded) is the other mode, for full-file processing. See [Voice Context Layer](/docs/concepts) for the umbrella model.
The Realtime API provides streaming speech transcription over WebSocket. You send PCM16LE audio frames, the server returns transcription events.
What it does
Input
Output
Server pushes JSON events. The primary output is:
conversation.item.input_audio_transcription.completed — a speech segment has been transcribedSupporting events:
input_audio_buffer.speech_started / speech_stopped — speech segment boundariessession.created — connection establishederror — error eventsArchitecture
Your app LansonAI Gateway Upstream STT
│ │ │
├── WS connect (Bearer) ───→ session.created │
│ │ │
├── Send PCM16 frames ──────→ gateway relay (binary PCM) ─────→ VAD + STT
│ │ │
│←── input_audio_buffer.speech_started ──────│←── input_audio_buffer.speech_started
│ │ │
│←── conversation.item.input_audio_transcription.completed ─│←── conversation.item.input_audio_transcription.completed
│ │ │
├── Close ─────────────────→ meter flush → R2 ledger │
vs. Segment and Batch
| Dimension | Realtime WS | Segment HTTP | Batch jobs |
|---|---|---|---|
| Transport | WebSocket | HTTP sync | HTTP async |
| Latency | Milliseconds | ~≤1.6s | Minutes |
| Input | PCM16LE stream | Multipart file | Audio URL |
| Output | Event stream | Transcript JSON | Complete job JSON |
| VAD | Server | Client | Server (slice) |
| Best for | Live stream | Pre-cut utterances | Long files |