LLM
Not supported
STT
Supported —
saarika:v2.5 and higherTTS
Supported —
bulbul:v2 with multiple Indian voices"stt_provider": "sarvam") and text-to-speech ("tts_provider": "sarvam"). You can use one or both independently — for example, pair Sarvam STT with Sarvam TTS for a fully Indian-language pipeline, or mix Sarvam TTS with Groq LLM for a low-latency Hindi voice agent.
Sarvam does not provide LLM functionality. You must pair it with a supported LLM provider such as openai, anthropic, groq, or ollama.
API Key
Get your API key from the Sarvam AI dashboard under your account settings.- config.json
- Environment Variable
Quick Start Config
The example below mirrors the defaults inconfig.example.json — a Hindi voice agent using Sarvam for both STT and TTS with Groq for LLM inference.
- config.json
- Environment Variables
Sarvam does not support LLM. The
llm_provider above is set to "groq" — swap in any other supported LLM provider (openai, anthropic, ollama, etc.) based on your needs.Speech-to-Text
Sarvam’s STT engine (saarika) is purpose-built for Indian languages and handles code-switching (mixing Hindi and English in the same utterance) better than general-purpose English-first models.
STT Models
Set the model via
"stt_model" in your config. When omitted, Voxray uses saarika:v2.5.
Language Detection
Set"stt_language" to a BCP-47 language code to pin the transcription language. When the field is empty or omitted, Sarvam performs automatic language detection.
Streaming STT
Sarvam implements Voxray’sSTTStreamingService interface via a WebSocket-based streaming endpoint. When turn detection is active, audio chunks are streamed to Sarvam’s API in real time and partial transcripts are surfaced as they arrive, reducing the latency between end-of-speech and LLM handoff.
Text-to-Speech
Sarvam’s TTS engine (bulbul) produces natural-sounding speech for Indian languages. It returns audio as base64-encoded WAV, which Voxray decodes and strips of WAV headers before routing raw PCM into the pipeline.
TTS Models
Set via
"tts_model". When omitted, Voxray defaults to bulbul:v2.
Available Voices
Set via
"tts_voice". When omitted, Voxray defaults to anushka.
Streaming TTS
Sarvam TTS implements Voxray’sTTSStreamingService interface via a WebSocket streaming API. Audio chunks are delivered to the pipeline as they are synthesized, allowing TTS output to begin playing before the full text response has been generated by the LLM.
Full Pipeline Examples
Hindi Voice Agent (Sarvam STT + Groq LLM + Sarvam TTS)
Sarvam TTS with OpenAI STT and LLM (mixed providers)
Auto-Detect Language (multilingual support)
stt_language is omitted, Sarvam auto-detects the spoken language. This is useful for deployments that serve callers in multiple Indian languages from a single agent instance.