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.
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:
| Need | What to Check |
|---|---|
| Multiple speakers | Diarization support and the model’s speaker-label format |
| Word-level alignment | Word timestamps and a response format that includes them |
| Captions | Subtitle format support, such as srt or vtt |
| A particular language | Supported languages and language-hint behavior |
| Long or large recordings | File 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.
Metered transcription profiles reject Idempotency-Key. They also reject async mode unless the selected profile explicitly supports batch processing. Do not assume that adding a header or async=true makes every transcription request retryable or asynchronous.
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.