shruti-coreml / README.md
bingokingooo's picture
Publish Koash iPhone Shruti benchmark and runtime decision
f1bb67e verified
|
Raw History Blame Contribute Delete
9.59 kB
metadata
license: apache-2.0
pipeline_tag: automatic-speech-recognition
language:
  - as
  - bn
  - brx
  - doi
  - en
  - gu
  - hi
  - kn
  - kok
  - ks
  - mai
  - ml
  - mni
  - mr
  - ne
  - or
  - pa
  - sa
  - sat
  - sd
  - ta
  - te
  - ur
tags:
  - coreml
  - on-device
  - offline
  - apple-silicon
  - indic
  - quantized
  - shruti

Shruti Core ML

Offline speech recognition for 22 Indian languages on Apple devices. Download just the language you need. Each pack also accepts English. Downloads are 49.5–54.1 MB per language, and all 22 packs compile for iOS 26.

Choose a language · Run on a Mac · Read the benchmarks · Koash

Shruti Core ML from Koash, with a two-tone waveform

Why we built it

We build Koash, a private voice-to-notes app for iPhone. People switch languages mid-sentence, especially when they’re capturing a thought quickly. We wanted more people to be able to speak naturally and keep their recordings and transcripts on their own device.

Udgam Labs’ Shruti family gave us an open starting point. We ported its released weights to Apple’s Core ML so iOS and macOS developers can evaluate Indic transcription through the frameworks they already use. The first Core ML export stored weights as FP32 and took about 208 MB per language. This release compresses the same weights and keeps language downloads independent.

Download a language

Each ZIP includes portable Core ML packages, tokenizer and decoder metadata, and the original Apache 2.0 license and notice. The release manifest records the exact model revision, SHA-256, and download size for every pack.

Language Pack Download
Assamese (as) Mixed 4/8-bit 49.9 MB
Bengali (bn) Mixed 4/8-bit 49.9 MB
Bodo (brx) INT8 54.0 MB
Dogri (doi) Mixed 4/8-bit 49.7 MB
Gujarati (gu) Mixed 4/8-bit 49.9 MB
Hindi (hi) Mixed 4/8-bit 49.5 MB
Kannada (kn) Mixed 4/8-bit 49.9 MB
Kashmiri (ks) Mixed 4/8-bit 49.9 MB
Konkani (kok) Mixed 4/8-bit 49.7 MB
Maithili (mai) Mixed 4/8-bit 49.7 MB
Malayalam (ml) Mixed 4/8-bit 49.9 MB
Manipuri (mni) Mixed 4/8-bit 49.9 MB
Marathi (mr) Mixed 4/8-bit 49.7 MB
Nepali (ne) Mixed 4/8-bit 49.7 MB
Odia (or) INT8 54.1 MB
Punjabi (pa) Mixed 4/8-bit 49.9 MB
Sanskrit (sa) Mixed 4/8-bit 49.7 MB
Santali (sat) Mixed 4/8-bit 49.9 MB
Sindhi (sd) Mixed 4/8-bit 49.7 MB
Tamil (ta) Mixed 4/8-bit 49.9 MB
Telugu (te) INT8 54.1 MB
Urdu (ur) INT8 54.1 MB

Sizes are decimal MB. The FP32 archives are also available for evaluation.

Run on Apple Silicon

The reference runner accepts a local audio file and can force the pack language or English. It uses Core ML for model inference and reuses Udgam’s Python beam search.

# From a Python environment with the Hugging Face CLI installed
hf download bingokingooo/shruti-coreml \
  --include 'source/**' 'models/compressed/shruti-hi-coreml.zip' \
  --local-dir shruti-coreml

cd shruti-coreml/source
python -m pip install coremltools==9.0 numpy==2.0.2 onnxruntime==1.19.2 soundfile==0.13.1
git clone --filter=blob:none https://github.com/udgamlabs/shruti.git .upstream/shruti
git -C .upstream/shruti checkout 68a8d77e88e58ed1201cc20a9c4adc5d9750723f
unzip ../models/compressed/shruti-hi-coreml.zip -d ../hindi
python -m shruti_coreml.runtime ../hindi /path/to/recording.wav --language hi

For an iOS app, compile the .mlpackage files for your target platform, send 16 kHz mono samples into the frontend, and integrate the encoder, decoder state, and tokenizer in your host app. The reference source shows their input and output contracts.

Benchmarks

Compressed packs

All 22 language packs were checked with pinned Indic DiarBench turns. Original CQ4, FP32 Core ML, and compressed Core ML received identical audio. See the scores by language and the aggregate results for the tested variants and Mac CPU timings. The protocol describes how we selected utterances and picked a release profile.

The Hindi compression screen compares five precision profiles on 24 matched clips each from FLEURS, Monsoon, and MUCS. The 49.5 MB Hindi pack added 0.51, 0.50, and 0.34 percentage points of error on those samples, respectively, versus FP32.

iPhone benchmark

On iPhone17,3, the published Hindi pack took 4.39 s across four clips including model load and first transcription. Sherpa-ONNX took 4.58 s. With each model already loaded, Sherpa took 2.06 s and Core ML took 4.07 s. Koash uses Sherpa for Shruti transcription based on this run and the Hinglish outputs. Method and results

Full Hindi-pack evaluations

Dataset Clips Metric Original Shruti FP32 Core ML
FLEURS Hindi 418 WER 20.56% 20.90%
Monsoon Hindi 753 OIWER 20.43% 20.24%
MUCS Hinglish 3,136 WER 35.28% 36.29%
LibriSpeech test-clean 2,620 WER 7.47% 7.48%
Silence and low noise 100 Words emitted 0 0

The full-split runs use the FP32 port. See the evaluation notes for corpus revisions, scoring differences, and access limitations.

How it works

The port reconstructs Udgam Labs’ released CQ4 tensors and exports the audio frontend, encoder, and decoder as Core ML ML Programs. The compact profile stores eligible encoder-block weights in 4-bit blocks and uses 8-bit weights elsewhere. Some languages use the 8-bit profile when it performed better in the speech screen. The reference decoder uses length-normalized five-beam search.

Intended use and limits

These packs are for Apple-platform developers and researchers evaluating offline dictation, voice notes, and multilingual transcription. The family benchmark uses small conversation samples. Accuracy varies by language, recording conditions, and code-switching. Test names, numbers, and instructions with recordings representative of your app. Compilation and Mac runs establish compatibility for the evaluated paths. The iPhone comparison covers Hindi and Hinglish. Broader device coverage, peak memory, and energy are open measurements.

Credits and license

Udgam Labs trained and released the Shruti family, based on Cactus Whistle. Koash built this independent Core ML port and compression release. Released under Apache 2.0. See the original NOTICE and the notices in each ZIP.