Speech-to-Text APIs
Sarvam AI offers a powerful speech recognition model: Saaras, state-of-the-art ASR with flexible output modes: transcribe, translate, verbatim, transliterate, and codemix.
Use the Sarvam speech-to-text skill to generate correct STT code from your AI coding assistant:
See Agent Skills for the full list.
Choosing the model, endpoint & mode
The mode parameter is supported by both saaras:v3 and saaras:v4 on the /speech-to-text endpoint. saaras:v4 is the default, recommended model. The /speech-to-text-translate endpoint is legacy (saaras:v2.5); for new integrations, use /speech-to-text with mode="translate".
API Types
Available API types: REST API for synchronous processing (files under 30 seconds), Batch API for asynchronous processing (files up to 2 hours), and Realtime Streaming for live audio with true partial transcripts and mid-call reconfiguration.
Already integrated against the WebSocket saaras:v3 endpoint? It’s still generally available, documented under Streaming API (Legacy).
Not sure which one fits your audio length and latency needs? See Which Speech-to-Text API to Use for a side-by-side comparison of REST, WebSocket, and Batch.
Supported Audio Formats & MIME Types
The STT and STTT REST and Batch APIs support over 10 major audio formats and MIME type variants. Supported formats and MIME types are listed below:
For most audio formats, our API automatically detects the codec. However, when
using PCM formats (pcm_s16le, pcm_l16, pcm_raw), you must explicitly
specify the input_audio_codec parameter. PCM files are only supported at
16kHz sample rate.
WebSocket/Streaming APIs: The STT and STTT WebSocket streaming APIs only support WAV and raw PCM formats (wav, pcm_s16le, pcm_l16, pcm_raw). Other audio formats are not supported for real-time streaming.
Technical Capabilities
Limits
Before uploading audio, run through the Preparing Your Audio checklist, sample rate, channels, format, and duration limits, to avoid the most common 400 errors.
Next Steps
Need help choosing the right API? Contact us on discord for guidance.