Which Speech-to-Text API to Use
Sarvam gives you four ways to run speech recognition on its models: the REST, Realtime, Batch, and legacy WebSocket APIs. They differ in how you send audio, how fast you get results, the maximum audio they accept, and which features (diarization, timestamps, partial transcripts) are available. Use this page to pick one before you start integrating.
Every transport also supports translating to English via mode="translate" (see the Tip below). A separate legacy Speech-to-Text-Translate counterpart exists on saaras:v2.5, the transport trade-offs below are identical, only the output language and underlying model change. See Speech-to-Text-Translate.
Quick decision
Comparison
When to use each
REST: POST /speech-to-text
- The audio is already captured and short (≤30 seconds).
- You want one request, one response, no connection to manage.
- Examples: voice search, push-to-talk commands, transcribing a short voice note.
- REST API guide →
Realtime: GET /speech-to-text-realtime/ws
- Audio arrives continuously from a mic, browser, or telephony stream, for a voice agent or live captioning product.
- You need true interim transcripts as the user speaks (fast barge-in), millisecond-based VAD tuning, and the ability to change language, mode, or VAD settings mid-call without reconnecting.
- Note: raw PCM only, no diarization.
- Realtime Streaming guide →
Batch: POST /speech-to-text/job/v1
- Recordings are long (up to 2 hours) or you have many files (up to 20 per job).
- You need speaker diarization and chunk-level timestamps (e.g. subtitles, meeting minutes).
- Latency isn’t critical. You submit a job and download results when it finishes.
- Batch API guide →
WebSocket (Legacy): GET /speech-to-text/ws
- You have an existing integration on this WebSocket. It now defaults to
saaras:v4;saaras:v3is still accepted for existing integrations. - For new voice-agent or live-transcription work, prefer Realtime Streaming above: it adds partial transcripts, simpler VAD tuning, and live reconfiguration.
- Note: only WAV / raw PCM is accepted, and results are final per utterance: there are no interim partials. See finalization semantics.
- Streaming API (Legacy) guide →
Need English output regardless of the spoken language? Use the same transport on the regular Speech-to-Text endpoints with mode="translate": saaras:v4 (default, recommended) or v3 on REST, Batch, and the legacy WebSocket (transcribe()/connect()); saaras:v3-realtime (default) or v4 on Realtime (the final-transcript mode). The dedicated Speech-to-Text-Translate endpoints are legacy (saaras:v2.5) and don’t support mode.