| name | test-sarvam-voice | ||||
|---|---|---|---|---|---|
| description | Benchmark Sarvam AI voice-agent pipelines end to end across Saaras v3, Sarvam-30B, and Bulbul v3. Use for prerecorded voice regression tests, multilingual ASR quality checks, VAD tuning, latency and cost analysis, reliability testing, baseline comparisons, or CI quality gates. Produces reproducible JSON, standalone HTML, and semantic-evaluation exports. | ||||
| license | Apache-2.0 | ||||
| metadata |
|
Measure the pipeline instead of testing STT, LLM, and TTS in isolation. Use the bundled CLI for deterministic validation, execution, reporting, and regression gates. Use voice-agents when building a LiveKit or Pipecat agent; use this skill when proving that an existing voice pipeline remains fast, accurate, reliable, and affordable.
Important
Keep SARVAM_API_KEY in the environment. Never put credentials, raw headers, private audio, or unredacted transcripts in a suite or report.
Run commands from the sarvamai/skills repository root.
-
Copy
references/example-suite.yamland replace each audio path and reference transcript. -
Keep v1 input audio as mono 16-bit PCM WAV at 8 or 16 kHz. Convert other audio first:
ffmpeg -i input.mp3 -ac 1 -ar 16000 -c:a pcm_s16le output.wav
-
Validate the suite and review the conservative cost projection before any network call:
uv run test-sarvam-voice/scripts/voice_lab.py plan suite.yaml
-
Run the suite sequentially with no retry by default:
export SARVAM_API_KEY="your-api-key" uv run test-sarvam-voice/scripts/voice_lab.py run suite.yaml --out results/
-
Compare a candidate with a committed or downloaded baseline:
uv run test-sarvam-voice/scripts/voice_lab.py compare \ baseline/report.json candidate/report.json --out comparison/
Treat exit 0 as success, 1 as a quality/regression gate failure, 2 as invalid input or a rejected budget, 3 as an incomplete live run, and 130 as interruption.
- Cover the languages, acoustic conditions, intents, numbers, names, and code-mixing patterns that matter in production.
- Use a stable human-verified reference transcript for each case.
- Add
entitiesonly for critical values that must survive ASR, such as phone numbers, amounts, dates, people, and locations. Interpretconfigured_entity_recallas deterministic substring preservation, not Sarvam's LLM-based Entity Score. - Tag cases by language, channel, domain, and risk so the report exposes cohort regressions.
- Set absolute gates for release requirements and regression thresholds for candidate-versus-baseline changes.
- Keep
reasoning_effort: nullfor latency-sensitive voice responses. Increasemax_tokensif Sarvam-30B returns no speakable content. - Keep the budget ceiling conservative. The CLI refuses an over-budget run before creating a connection.
Read references/report-schema.md when adding CI gates, interpreting timings, or consuming JSON/JSONL artifacts.
- Default to one worker, zero retries, redacted text, and discarded TTS audio.
- Add
--concurrencyonly after checking account rate limits. Add bounded--retriesonly to measure recovery behavior; authentication, quota, and validation failures are never retried. - Add
--include-transcriptsonly in a private output directory when semantic evaluation is required. - Add
--retain-audioonly for deliberate listening tests. Do not commit generated speech. - Use
--mock-eventsfor offline protocol regression tests. Never present mock latency as live service performance. - Compare distributions and P95 latency, not only averages. Inspect per-case failures before accepting a passing aggregate.
The run directory contains:
report.json: schema-versioned measurements, configuration, errors, gates, and suite/language/tag aggregates.report.html: escaped, standalone comparison surface with no external assets.llm-wer.jsonl: rows compatible with Sarvam'sllm_werdataset columns when transcript inclusion is enabled.llm-intent-entity.jsonl: rows compatible with Sarvam'sllm_intent_entitydataset columns when transcript inclusion is enabled.audio/: synthesized responses only when explicitly retained.
Use raw and normalized WER/CER together. Normalization removes punctuation, symbols, casing, and Unicode compatibility differences; it does not make semantic judgments. Treat all INR values as estimates tied to the dated pricing snapshot in the suite.
Before changing model IDs, supported languages, VAD parameters, limits, or pricing, fetch the current index and primary pages:
- https://docs.sarvam.ai/llms.txt — current documentation index
- Pricing
- Saaras v3
- Sarvam-30B
- Bulbul v3
- Credits and rate limits