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 can also return English text: set mode="translate" (see the Tip below). All four use saaras:v4 by default.
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 or timestamps, segment-level or word-level (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 defaults to
saaras:v4; keep usingsaaras:v4. - 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 →
Want text that is ready to send (punctuation, no fillers, your names spelled your way, or JSON from the recording) rather than a raw transcript? See Dictate.
Need English output regardless of the spoken language? Use mode="translate" with saaras:v4 on any of these transports: REST, Batch, Realtime (applies to the final transcript), or the legacy WebSocket (transcribe()/connect()). The separate Speech-to-Text-Translate endpoints are legacy and don’t support mode.