UDGAM LABS · Speech-to-text model · about 56M parameters · part of the Shruti family
Shruti Sanskrit
Spoken Sanskrit and English in one 29.7 MB file that runs on your device. Sanskrit comes out in Devanagari and English words stay in English: अधुना अन्तिमम् over प्रचलति. It runs on a phone, a laptop or in a browser, with no server and no internet connection. On a 2021 Samsung Galaxy F62 it transcribes about 12x faster than real time using 64 MB of memory.
This is not the most accurate Sanskrit model we measured, and we make no comparative claim for it. IndicConformer Sanskrit is more accurate on IndicVoices' held-out set (24.4 vs 30.9), and ahead on conversation against the native reference (33.4 vs 38.1). About a third of words are wrong on both of our tests. What it offers is one small file that works offline. This is speech to text for spoken Sanskrit, tested on everyday speech; chant, verse and recitation were not tested. No Sanskrit reader has reviewed this output yet.
Shruti Sanskrit is part of the Shruti family, one small model per language, and is built on Cactus Whistle (Apache-2.0) via Shruti Hindi: we retrained all its weights on Sanskrit and English speech and added 400 Sanskrit vocabulary pieces.
Shruti (श्रुति) is Sanskrit for "that which is heard".
Try it: in your browser, on your own device · demo on Hugging Face · Code and examples: github.com/udgamlabs/shruti
Audio (Sanskrit with English, AI voice) Shruti Sanskrit writes (on the phone, native engine, unedited)
"अधुना अन्तिमम् over प्रचलति ..." -> अधुना अन्तिमम् over प्रचलति षड् धावनाङ्काः अपेक्षिताः कण्डुकः सीमारेखां प्रति गच्छति अहो चतुष्कम्
"पाणिनेरष्टाध्याय्यां सूत्राणि ... slide ..." -> पाणिने रष्टाध्याय्यां सूत्राणि क्रमेण सन्ति अद्य प्रथमाध्यायस्य प्रथमं पादं पठामः पूर्वं slide पश्यन्तु
(Neither line is word for word. The top one writes कन्दुकः as कण्डुकः; the other splits पाणिनेरष्टाध्याय्यां in two. In the phone's browser the same clip wrote slide in Devanagari, as स्लैड्, so the two engines' text can differ.)
| Developer | Udgam Labs |
| Base model | Shruti Hindi (Udgam Labs), built on Cactus Whistle (Cactus Compute); both Apache-2.0 |
| Parameters | About 56M (55,722,313; 8 encoder + 8 decoder layers, width 512) |
| File | shruti-sanskrit.cact, 29.7 MB (4-bit weights, 8-bit activations) for the Cactus needle engine |
| Input / output | 16 kHz audio of any length → text; Sanskrit in Devanagari, English words in lowercase Latin |
| Languages | Spoken Sanskrit, English, and Sanskrit mixed with English. Other languages have their own Shruti models |
| Runtime | Cactus needle engine (Apache-2.0), native and WebAssembly; we measured it on a Mac, an Android phone and that phone's Chrome |
| Licence | Apache-2.0 |
Quick start
pip install cactus-needle
hf download udgamlabs/shruti-sanskrit shruti-sanskrit.cact config.json --local-dir .
from needle import Whistle
model = Whistle("shruti-sanskrit.cact")
print(model.transcribe("clip.wav")) # Sanskrit or English is detected automatically
The cactus-needle Python package sends anonymous usage counts by default; set NEEDLE_TELEMETRY=0 to turn that off.
Command line: ./needle --model shruti-sanskrit.cact --audio clip.wav with the needle binary for your platform from
Cactus-Compute/needle3. In the browser, the wasm/ build of the same
engine runs it inside a web page; udgamlabs.com/models/shruti/sanskrit is a
working page.
Results
Word error rate (%, lower is better), the same clips and scorer for every model; Shruti Sanskrit in its on-device engine on a Mac. IndicVoices valid has 200 clips, DiarBench 55 turns. Measured 3 November 2026; Su-śrotā on 6 November 2026. Size is the file as published by its makers (whisper.cpp q8_0 for Whisper).
| Model | File size | IndicVoices valid | DiarBench, English in English (conversation, held out) | DiarBench, native reference |
|---|---|---|---|---|
| Shruti Sanskrit | 29.7 MB | 30.9 | 32.3 | 38.1 |
| Whisper tiny | 43.5 MB | 617.4 | 522.9 | 528.1 |
| Whisper base | 81.8 MB | 440.6 | 367.7 | 374.7 |
| IndicConformer Sanskrit (int8) | 137.7 MB | 24.4 | 36.6 | 33.4 |
| Su-śrotā (int8 ONNX) | 187.5 MB | 38.7 | 43.8 | 41.8 |
| Whisper small | 264.5 MB | 443.3 | 367.4 | 369.4 |
How to read this. IndicVoices valid is IndicVoices' own held-out split: its speakers are kept out of training and its sentences blocked, but it is the same source as our training data, so it flatters us. DiarBench is real conversation from outside it: 55 turns from 21 conversations, 637 reference words, only 68 of them English, in 15 turns. That is too few to say much about mixed speech. The "English in English" column scores against references that write English words in English (Latin script), and English words count only if written in English letters; the native column scores against references that write those English words in Devanagari. Whisper's rates pass 100% because it adds words and often writes the wrong script, so they say little about Whisper at its best.
Paired 95% intervals below are Shruti Sanskrit minus the other model, in word error points (1,000 resamples of clips; "by conversation" resamples whole conversations).
- IndicConformer Sanskrit: ahead on IndicVoices valid (+4.29 to +9.01). On DiarBench native 33.4 vs 38.1 (-0.18 to +9.65 by clip, +0.98 to +8.46 by conversation). On DiarBench English in English, 36.6 vs 32.3, the interval includes 0 (-11.44 to +2.77; by conversation -12.39 to +2.27), so there is no lead either way.
- Su-śrotā (a purpose-built Sanskrit model, measured with greedy CTC decoding as its ONNX card shows): word errors on IndicVoices valid 38.7 vs 30.9 (-11.00 to -4.54), DiarBench native 41.8 vs 38.1 (-9.20 to +1.69, so level). But it writes words joined more often (558 words on DiarBench, the reference 637, ours 633), and word error counts each join as errors. On characters it is level or ahead: IndicVoices valid 11.62% vs 11.75%, DiarBench native 12.13% vs 15.90%. We claim no lead over it. Its card notes that word error over-penalises sandhi spacing.
- English inside Sanskrit: Shruti Sanskrit writes 61.8% of DiarBench's 68 English words in English (42 words). That is a small count, and Whisper base writes 69.1% on the same set.
- One file for two languages: Shruti Sanskrit also transcribes English: LibriSpeech test-clean 5.93 (Shruti Hindi: 5.95).
- Silence: 0 words invented on 100 silent clips.
Other Sanskrit speech models exist that we have not measured, and these results cover only the models listed here. A scan of Hugging Face on 6 November 2026 found, among others, a wav2vec2 Sanskrit model of 377.8 MB and another model of 140.4 MB.
Speed and memory (offline): Samsung Galaxy F62 (2021, 6 GB RAM), native engine, 12.0x faster than real time, 64 MB peak memory (20 clips, 202.6 s of audio). In that phone's Chrome, on five lines played into the page, it took 1.9-2.3 s on the device for 12-14 s of speech.
Where it falls short
- Not the most accurate. IndicConformer Sanskrit is ahead on IndicVoices valid and on DiarBench's native reference (numbers above). Character errors: IndicVoices valid 11.75% vs its 6.10%, DiarBench native 15.90% vs its 8.65%, about twice as many.
- About a third of words are wrong. 30.9% on IndicVoices valid, 32.3-38.1% on DiarBench. Word error overstates this for spoken Sanskrit because of sandhi spacing (30.9% of words is 11.75% of characters), but expect to correct a lot.
- A thin test. No independent read set (no FLEURS, no Kathbath here). IndicVoices valid shares a source with our training data. DiarBench is 55 turns, so its intervals are wide. No Sanskrit reader has reviewed this output yet.
- One data source. Its Sanskrit comes from IndicVoices alone.
- Chant, verse and recitation were not tested. Nothing here says anything about Vedic recitation or pronunciation.
- English words in Devanagari: about 16 of DiarBench's 68 English words come out in Devanagari (egypt as इजिप्ट्), and in the phone's browser slide came out as स्लैड्. DiarBench also glosses some local names in Latin, so a correct native spelling can score as an error.
- Real errors and spelling variants: real errors happen (कन्दुकः as कण्डुकः), and joins and spelling variants count as errors.
- Browser: tested on five lines only, played into the page on one phone's Chrome with the language set. All five came out in Devanagari. Not tested with a live microphone. On the other Shruti languages where we measured it, plain English loses a little accuracy with the language set.
- Loud noise: Shruti models sometimes repeat a phrase over and over in loud noise (9 of 3,400 clips at 5 dB on an everyday-speech test, measured on Shruti Hindi-family models, not on Sanskrit).
- Not tested on Sanskrit: noise, music, far-away or speaker-played audio, Linux, Windows and iOS. No punctuation; numbers come out as words.
How it was trained
- Start: Shruti Hindi (itself a full fine-tune of Cactus Whistle). We added 400 Sanskrit vocabulary pieces and used Shruti Hindi's language tag for Sanskrit, then trained all weights with 4-bit quantisation-aware training.
- Data: Sanskrit speech, with English words kept in English where the dataset marks them, plus English from Shruti Hindi's own training data. Test speakers and test sentences were removed.
| Source | Licence |
|---|---|
| AI4Bharat IndicVoices, Sanskrit | CC-BY-4.0 |
| English from Shruti Hindi's training data: LibriSpeech, Mozilla Common Voice 17 English, AI4Bharat NPTEL | CC-BY-4.0, CC0, CC-BY-4.0 |
Intended use and limitations
For transcribing spoken Sanskrit and English on devices where privacy, cost or connectivity rule out a cloud service: voice notes, dictation, captions, field apps. If accuracy matters more than size, use a larger model. Not for high-stakes use without human review, and not for checking recitation. Accuracy drops on noisy audio, strong accents, rare names, numbers and long technical English.
Licence
Apache-2.0. Shruti Sanskrit is a modified version of Shruti Hindi (Udgam Labs) and of Cactus Whistle by Cactus Compute (both
Apache-2.0); see NOTICE. The training data licences are listed above; please credit the datasets if you build on it.
Citation
@misc{udgamlabs2026shrutisanskrit,
title = {Shruti Sanskrit: offline speech-to-text for spoken Sanskrit and English in 29.7 MB},
author = {{Udgam Labs}},
year = {2026},
url = {https://huggingface.co/udgamlabs/shruti-sanskrit}
}
About Udgam Labs. Udgam Labs is an independent AI research lab. We work from first principles: before we build, we understand why things work, whether we are training a model, fine-tuning one or applying AI to a new problem. Udgam (उद्गम) is Sanskrit for origin. udgamlabs.com
- Downloads last month
- -
