Skip to content
Guides/Models and Routing

Speech to Text

Upload audio, read the transcript, and choose the right path for captions or long recordings.

Transcribe a Recording

Speech to text converts recorded audio into a transcript. Before starting, complete the quickstart to configure your API URL, key, and credits. Place a short recording named recording.wav in your current directory, or use the speech.mp3 from the Text to Speech guide. Confirm that the key has audio.write access.

Terminal
curl --fail --show-error --silent \
  "$AUDIOLAB_API_URL/v1/audio/transcriptions" \
  -H "Authorization: Bearer $AUDIOLAB_API_KEY" \
  --form "model=auto" \
  --form "file=@recording.wav" \
  --form "response_format=json"

Read the recognized speech from the response’s text field. The exact text and optional metadata depend on the recording and selected model. Let your HTTP client generate the multipart boundary; do not manually set Content-Type: application/json for a file upload.

Use auto to select an eligible transcription model. Use an exact model ID from the transcription catalog when you need predictable provider behavior or specific capabilities.

Request the Detail You Need

Start with a plain transcript, then add only the features your application needs:

NeedWhat to Check
Multiple speakersDiarization support and the model’s speaker-label format
Word-level alignmentWord timestamps and a response format that includes them
CaptionsSubtitle format support, such as srt or vtt
A particular languageSupported languages and language-hint behavior
Long or large recordingsFile size, duration, and synchronous or batch limits

Required features narrow the eligible route. They do not automatically become available on every provider. Review the transcription request fields and the selected model’s limits before uploading a large file.

Process a Long Recording

Background processing is available for supported batch models, including sarvam/saaras-v3-batch and sarvam/saaras-v4-batch. Select a supported batch model and submit with ?async=true. Audio storage must be enabled, and the deployment must have an available worker.

A queued request returns 202 with a job ID. Keep that ID and use Retrieve Transcription until the job reaches a terminal state. Stop polling on failure and inspect its error rather than submitting the recording again automatically.

Add Live Captions

Use the streaming guide for audio captured over time. The WebSocket protocol accepts raw PCM frames rather than a multipart file. Show interim text as a draft, replace it as recognition updates arrive, and commit final transcript events to your application’s history.