File Transcription
Upload an audio file and receive a text transcription. This endpoint is compatible with the OpenAI Audio Transcription API.POST /v1/audio/transcriptions
View the full OpenAPI reference for file transcription.
Supported Formats
wav, mp3, flac, ogg, m4a, webm — up to 15 MB per file.
Request
Response Formats
- json (default)
- verbose_json
- text
Real-Time Streaming (WebSocket)
For real-time transcription, connect via WebSocket and stream audio frames. The server uses LocalAgreement to emit stable (confirmed) words as they are recognized, plus tentative partial results.Connection
token query parameter. Non-browser clients can alternatively use the Authorization: Bearer YOUR_API_KEY header during the WebSocket handshake.
Wire Protocol
The session follows a simple three-phase protocol: 1. Configure — Send a JSON text frame with session settings:
2. Stream audio — Send raw PCM audio as binary WebSocket frames.
- Format: 16-bit signed integer, little-endian, mono
- Send frames continuously as audio is captured (e.g. every 100–500 ms)
Server Messages
The server sends JSON text frames throughout the session:- partial
- final
- result
- error
How LocalAgreement Works
The server re-transcribes the accumulated audio buffer on every tick (~500 ms). It compares consecutive hypotheses and only emits words that both agree on asfinal. The unstable tail is sent as partial and may change on the next tick. This gives you low-latency confirmed words without hallucinated flicker.