Voice Agents logo

Voice Agents

Organization
sarvamai
voice-agents

Build real-time Indic voice agents with Sarvam STT/TTS/LLM on LiveKit or Pipecat (Python), plus JS/TS custom-pipeline notes. Use this skill when creating phone bots, IVR, or always-on conversational voice apps. For one-shot in-chat voice reply or dubbing via MCP, use sarvam-mcp instead.

Overview

Publishersarvamai
Repositoryskills
Skill namevoice-agents
Stars
72
Forks
24
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by sarvamai on GitHub. Read the source before you install it.

Installation

Install the Voice Agents AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/sarvamai/skills/tree/main/voice-agents
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sarvamai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/voice-agents .claude/skills/voice-agents
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Voice Agents in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Voice Agents on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Voice Agents is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Voice Agents — Sarvam AI

One-shot in-chat voice/dub → sarvam-mcp (sarvam_tools_voice / _dub). This skill = LiveKit/Pipecat agent code.

[!IMPORTANT] Auth: api-subscription-key header — NOT Authorization: Bearer. Env var: SARVAM_API_KEY

LiveKit Quick Start

bash
pip install "livekit-agents[sarvam,silero]" python-dotenv
python
from livekit.agents import JobContext, WorkerOptions, cli
from livekit.agents.voice import Agent, AgentSession
from livekit.plugins import sarvam

class VoiceAgent(Agent):
    def __init__(self) -> None:
        super().__init__(
            instructions="You are a helpful voice assistant. Be friendly, concise, and conversational.",
            stt=sarvam.STT(
                language="unknown",   # auto-detect; or "hi-IN", "ta-IN", etc.
                model="saaras:v3",
                mode="transcribe",
                flush_signal=True     # emits speech start/end events for turn-taking
            ),
            llm=sarvam.LLM(model="sarvam-105b"),
            tts=sarvam.TTS(
                target_language_code="en-IN",
                model="bulbul:v4-flash",
                speaker="simran_en_customer",
            ),
        )

    async def on_enter(self):
        self.session.generate_reply()

async def entrypoint(ctx: JobContext):
    # Do NOT pass vad= — VAD is handled internally by the Sarvam plugin
    session = AgentSession(
        turn_detection="stt",       # let Sarvam STT handle turn detection
        min_endpointing_delay=0.07  # ~70ms matches Sarvam STT processing latency
    )
    await session.start(agent=VoiceAgent(), room=ctx.room)

if __name__ == "__main__":
    cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))

Run with python agent.py dev, test with python agent.py console.

Pipecat Quick Start

bash
pip install "pipecat-ai[daily,sarvam]" python-dotenv loguru
python
import os
from pipecat.pipeline.pipeline import Pipeline
from pipecat.processors.aggregators.llm_context import LLMContext
from pipecat.processors.aggregators.llm_response_universal import LLMContextAggregatorPair
from pipecat.services.sarvam.stt import SarvamSTTService
from pipecat.services.sarvam.tts import SarvamTTSService
from pipecat.services.sarvam.llm import SarvamLLMService

stt = SarvamSTTService(
    api_key=os.getenv("SARVAM_API_KEY"),
    language="unknown",   # auto-detect; or "hi-IN", "ta-IN", etc.
    model="saaras:v3",
    mode="transcribe"     # or "translate" for speech-to-English
)
tts = SarvamTTSService(
    api_key=os.getenv("SARVAM_API_KEY"),
    settings=SarvamTTSService.Settings(
        model="bulbul:v4-flash",
        voice="simran_en_customer",  # persona ID — not a v3 short name
        language="en-IN",
        pace=1.0,
    ),
)
llm = SarvamLLMService(
    api_key=os.getenv("SARVAM_API_KEY"),
    settings=SarvamLLMService.Settings(model="sarvam-105b"),
)

messages = [{"role": "system", "content": "You are a friendly AI assistant. Keep responses brief."}]
context_aggregator = LLMContextAggregatorPair(LLMContext(messages))

pipeline = Pipeline([
    transport.input(),            # Daily or WebRTC transport
    stt,
    context_aggregator.user(),
    llm,
    tts,
    transport.output(),
    context_aggregator.assistant(),
])

JavaScript/TypeScript Note

LiveKit and Pipecat agents are Python-only. For JS/TS voice pipelines, use the individual SDK methods directly:

typescript
import { SarvamAIClient } from "sarvamai";
const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY" });

// STT: client.speechToText.transcribe({...})
// TTS: client.textToSpeech.convertStream({...})  // returns BinaryResponse
// LLM: client.chat.completions({...})

Gotchas

GotchaDetail
LiveKit: no vad=Do NOT pass vad= to AgentSession — VAD is handled internally by the Sarvam plugin. Set turn_detection="stt" and min_endpointing_delay=0.07 instead.
LiveKit: flush_signal=TrueRequired on sarvam.STT for speech start/end events and proper turn-taking.
TTS voice params differ by pluginLiveKit (livekit-plugins-sarvam through 1.5.2): target_language_code + speaker. language_code= on sarvam.TTS() is rejected. Pipecat (1.0): settings=SarvamTTSService.Settings(voice=..., language=..., model=...) — voice, not speaker, and not bare constructor kwargs.
v4 speakers are persona IDsmodel="bulbul:v4-flash" needs voice_language_style (simran_en_customer, aparna_hi_customer). Short names (shubh, anand, priya) 400. LiveKit defaults a missing speaker to anushka when the model is not v3 — always pass speaker. Hindi: aparna_hi_customer. Tamil: gokul_ta_narration. No v4 personas for ml-IN / od-IN — use bulbul:v3 there.
Pipecat class namesSarvamSTTService/SarvamTTSService/SarvamLLMService from pipecat.services.sarvam.stt/.tts/.llm — NOT SarvamSTT. LLM model goes in SarvamLLMService.Settings(model=...), system prompt in LLMContext messages.
sarvam-30b is deprecated — and now hard-errors at the APIVerified live: calling sarvam-30b via the chat API now returns 400: "Model 'sarvam-30b' has been deprecated. Please use one of the available models instead: sarvam-105b, sarvam-105b-conversations." A Pipecat pipeline built on sarvam-30b will still construct fine (see below) but every LLM turn will start failing at runtime — this isn't a future risk, it's already broken if you're on it.
sarvam-105b-conversations may not be in your installed Pipecat's allowlist yetSarvam ships sarvam-105b-conversations — a 32K-context variant post-trained specifically for real-time dialogue/voice agents, i.e. the slot sarvam-30b used to fill. Verified live against pipecat-ai==0.0.108: SarvamLLMService._SUPPORTED_MODELS is frozenset({"sarvam-105b", "sarvam-105b-32k", "sarvam-30b", "sarvam-30b-16k"}) — it does not include sarvam-105b-conversations yet, and constructing SarvamLLMService(settings=SarvamLLMService.Settings(model="sarvam-105b-conversations")) raises ValueError: Unsupported Sarvam LLM model 'sarvam-105b-conversations'. Allowed values: sarvam-105b, sarvam-105b-32k, sarvam-30b, sarvam-30b-16k. immediately. Also note the same allowlist still happily accepts sarvam-30b/sarvam-30b-16k at construction time even though those are now dead at the API level (see row above) — construction succeeding is not a signal the model works. Check your installed pipecat-ai version's allowlist before switching to sarvam-105b-conversations; use plain sarvam-105b if it's not there yet.
max_tokens budgetSarvam models reason internally. Don't set low max_tokens or content will be None. Omit, set 500+, or disable with reasoning_effort=None.
TTS pitch/loudnessOn bulbul:v4-flash, pitch is −0.5–0.5 and loudness is 0.1–2.5. Bulbul v3 now accepts them too (live-verified 2026-10-06); pace is 0.5–2.0. Out-of-range values return 400.
STT WebSocket codecsOnly wav/pcm — no MP3/AAC/OGG for streaming.
HTTP Stream for TTSconvert_stream returns binary audio directly (no base64), better for pipelines.
TelephonyFor phone agents (e.g. Exotel), set audio_in_sample_rate=8000 and audio_out_sample_rate=8000 to match telephony audio.

Full Docs

Fetch framework integration guides, environment setup, and advanced patterns from:

Frequently asked questions

What does the Voice Agents AI skill do?

Build real-time Indic voice agents with Sarvam STT/TTS/LLM on LiveKit or Pipecat (Python), plus JS/TS custom-pipeline notes. Use this skill when creating phone bots, IVR, or always-on conversational voice apps. For one-shot in-chat voice reply or dubbing via MCP, use sarvam-mcp instead.

Why use Voice Agents on TypingMind?

Because you install it once and use it with any model. Voice Agents is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Voice Agents in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/sarvamai/skills/tree/main/voice-agents. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Voice Agents?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Voice Agents?

As many as you like. As long as a model supports skills, you can use Voice Agents with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Voice Agents AI skill free?

Yes. It is published on GitHub by sarvamai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇