Transcribe audio to text
Transcribes audio input into text. Supports three modes:
1. File Upload (Non-Streaming)
Upload an audio file and receive the complete transcription in a single response.
Request:
- Content-Type:
multipart/form-data - Include
file,model,stream=false
Response:
- Complete transcription text
- Detected language
2. File Upload (Streaming Results)
Upload an audio file and receive partial transcription results via WebSocket.
Request:
- Content-Type:
multipart/form-data - Include
file,model,stream=true
Response:
- Initial acknowledgment with
session_id - Partial results via WebSocket (
transcript.text.delta) - Final result via WebSocket (
transcript.text.done)
3. Live Audio Streaming
Stream audio chunks in real-time via WebSocket.
Request:
- Content-Type:
application/json - Include
model,stream=true(no file)
Response:
- Session ID for WebSocket connection
- Send audio chunks via WebSocket
- Receive events and partial results in real-time
Event Sequence (Live Streaming with VAD)
When streaming live audio with VAD/EPD enabled, the server emits the following sequence of WebSocket messages for each utterance:
transcript.event/speech_start— speech first detected by VAD{ "session_id": "session123", "type": "transcript.event", "state": "speech_start" }transcript.text.delta— zero or more partial transcription results{ "session_id": "session123", "text": "Partial text...", "language": "en", "type": "transcript.text.delta", "state": "transcription" }transcript.event/speech_end— end-of-speech detected by VAD/EPD{ "session_id": "session123", "type": "transcript.event", "state": "speech_end" }transcript.text.done— final transcription for the utterance{ "session_id": "session123", "text": "Complete utterance text.", "language": "en", "type": "transcript.text.done", "state": "transcription" }
After step 4 the engine resets and listens for the next utterance.
The session remains open until the client calls /transcriptions/close.
The client may also call /transcriptions/flush at any time to force
immediate processing of buffered audio.
Important - Session Timeout: When streaming audio, if no audio data is sent for a period of time (session timeout), the session will automatically close and the final transcription will be sent. This prevents sessions from remaining open indefinitely when audio streaming has stopped.
Supported Audio Formats
- WAV (recommended)
Sample Rates
- 16000 Hz (recommended)
- Automatic resampling available
Parameters
You can include additional parameters for fine-tuning:
sampling_rate: Target sample rate (e.g., “16000”)channels: Number of audio channels (e.g., “1” for mono)
Body
ID of the ASR model to use
"whisper-small-quantized"
Audio file to transcribe (for file-based transcription)
ISO 639-1 language code (e.g., 'en' for English). If omitted, language may be auto-detected.
"en"
If true, results will be streamed via WebSocket. If false, complete transcription returned in response.
false
Number of audio channels in the input stream (1=mono, 2=stereo). Takes priority over the channels key inside the parameters array.
1
Additional parameters for transcription (e.g., sampling_rate, channels)
"[{\"key\": \"sampling_rate\", \"value\": \"16000\"}, {\"key\": \"channels\", \"value\": \"1\"}, {\"key\": \"server_timeout\", \"value\": \"60\"}]"
Response
Transcription request accepted
- Option 1
- Option 2
Transcription result (non-streaming)
The transcribed text
"The sky is blue and the sun is shining."
Detected or specified language (ISO 639-1 code)
"en"
Detected language full name as returned by the ASR engine
"English"
Result type
transcript.text.done, transcript.text.delta "transcript.text.done"
Session identifier (if applicable)
"session123"

