IVR & Contact Center Voice Agents
IVR & Contact Center Voice Agents
Indian contact centers run at huge call volumes on infrastructure that’s still largely PSTN and IVR-menu based: outbound collections, order status, appointment reminders, first-line support. A Sarvam-powered voice agent can sit behind that IVR (or replace the menu entirely) and hold a real conversation in the caller’s language, instead of routing them through “press 1 for Hindi.”
This guide covers the architecture pattern common to IVR/contact-center bots, then walks through the Collection Agent example (a payment-reminder bot) as the concrete implementation. The same pattern (professional tone, structured account lookup, clean escalation to a human) applies whether you’re doing collections, order-status calls, or appointment reminders.
In short: stream everything (STT and TTS), keep the LLM turn short and on sarvam-30b by default, and build the human-escalation path before you build anything else.
Architecture
- DTMF / intent detection → escalate to human queue
- Call recording (with consent) → batch STT for QA/analytics
Telephony ingress
Calls typically arrive over a SIP trunk. Both LiveKit and Pipecat support SIP/telephony transports that bridge PSTN audio into the same Agent/Pipeline you’d use for a WebRTC call. There’s no separate code path for phone vs. app.
Streaming STT
Use the WebSocket transport (or the LiveKit/Pipecat Sarvam plugins, which use it internally) so the agent starts processing speech before the caller finishes talking. Telephony audio is 8kHz, which Saaras v3 supports natively without upsampling.
Conversational turn
The LLM generates a response. Keep it short: contact-center callers are on hold, not reading an essay. Stream the reply into TTS rather than waiting for the full completion.
Escalation path
Detect explicit requests (“talk to a person,” repeated failed intents, DTMF 0) and transfer to a human queue rather than looping the caller through the bot. Every example agent in this series is written to acknowledge and offer transfer instead of stonewalling.
Recording & QA (optional)
If you record calls for compliance or quality review, run them through Sarvam’s Batch STT with diarization afterward. See the Call Analytics Pipeline cookbook for a full diarized-transcript-to-insights pipeline.
Recommended models & params
Latency targets
There’s no official Sarvam round-trip SLA to quote here, so budget your own. Streaming STT plus sarvam-30b plus streaming TTS keeps each leg in the tens-to-low-hundreds of milliseconds, which is what makes barge-in and natural turn-taking possible over a phone line.
Pitfalls
Forcing a single language
Contact-center callers switch between Hindi, English, and their regional language within one sentence. language="unknown" on STT handles this. Hardcoding a single language code degrades transcription the moment a caller code-mixes.
No escalation path
A bot that can’t recognize “I want to speak to a person” and hand off cleanly will frustrate callers and generate complaints. Build the transfer/escalation branch first, not as an afterthought.
Acronyms and IDs mispronounced
Account numbers, product codes, and abbreviations (e.g. “EMI,” “NAIC”) don’t always get read the way you’d expect. Use a pronunciation dictionary scoped per language rather than fighting it in the prompt.
REST TTS on the live call leg
REST returns the full audio only after synthesis completes, which reads as dead air to a caller on a phone line. Reserve REST for pre-generated, static prompts; use WebSocket streaming for anything generated per turn.
Treating recorded calls as a black box
If you’re recording for QA, capture consent in the call flow itself, and pipe recordings through diarized batch STT so per-speaker talk-time and sentiment are queryable. Don’t just archive raw audio.
Full example
The Collection Agent guide has the complete, runnable code (LiveKit-based). The core of it:
The example above uses sarvam-105b for a richer collections conversation with payment-plan negotiation. For simpler, high-volume flows (order status, appointment reminders, balance inquiries), swap in sarvam-30b per the recommended params to shave latency off every turn.
See also: BFSI Voice Bots for collections-specific compliance guardrails, and the Call Analytics Pipeline cookbook for post-call QA.