Choosing a model
Two kinds of Speech-to-Text model are available, selected withmodel_name:
"default"— a standard transcription model. The transcription is produced in the language of the audio."stt-translate"— a translating transcription model. The transcription is generated in another language, which you choose withlanguage(ortarget_language). See Transcription Settings.
WebSocket vs REST
If you’re transcribing pre-recorded audio and don’t need VAD, REST is
the simpler path. Move to WebSocket when you need live audio,
turn-taking, or in-stream
flush.
What both transports share
- Models: same
model_nameworks on both. - Input formats: PCM (multiple sample rates), WAV, Opus, mu-law, A-law.
- Tunable options:
temp,language,padding_bonus,delay_in_frames, and akeywordsdictionary for boosting names and jargon, all viajson_config. See Transcription Settings.
What’s transport-specific
- WebSocket-only: semantic VAD
stepmessages every 80 ms, in-streamsend_flush()for forced processing, adaptive delay controls (delay_in_frames), setup-message stream controls (send_setup_on_start,wait_for_ready_on_start), browser tokens. See WebSocket Lifecycle. - REST-only: send the full audio as the request body; receive NDJSON over a streaming response.
Next steps
Use the WebSocket API
Streaming audio in, transcripts and VAD signals out, with flush
control.
Use the REST API
One-shot transcription of a complete audio file.
Turn-taking recipe
Use semantic VAD and adaptive delay to decide when an agent should answer.
Keyword boosting recipe
Recognize names, brands, and jargon by biasing STT toward a custom dictionary.
GitHub examples
Browse complete voice-agent demos built with Gradium STT and TTS.
Transcription settings
language, temp, padding_bonus, delay_in_frames.Errors
Error contracts across REST, WebSocket, and streamed responses.