--- language: - fa - en license: gpl-3.0 library_name: tinyasr pipeline_tag: automatic-speech-recognition tags: - persian - farsi - asr - on-device - zipformer - transducer - shenava base_model_relation: finetune --- # Shenava Rizeh v1.5 **Small, fast, offline Persian speech recognition.** A 60M-parameter streaming-capable Zipformer2 transducer, stored as 4-bit weights (34 MB), running on CPU (no GPU needed) through the [tinyasr](https://github.com/dkaraush/tinyasr) engine on Android, iOS, desktop and the browser (WASM). Shenava Rizeh v1.5 is a fine-tune of the Persian (`en-fa`) model from [dkaraush/tinyasr](https://github.com/dkaraush/tinyasr) — the engine behind Telegram's on-device transcription — on ~149 hours of teacher-verified Persian speech, followed by a 50/50 weight average with the original to keep its strengths. ## Results [PersianASR Triple Threat](https://huggingface.co/spaces/Reza2kn/PersianASR-TrippleThreat) benchmark: all 11,010 clips of VisualEars-Golden-6669 (in-the-wild) + FLEURS-fa-4341. Triple Threat = 0.6·S³ + 0.2·WER + 0.2·CER, lower is better. "Uniform" is the board's re-scoring contract; "official" uses frozen importance weights. | Model | Size | Uniform TT | Official TT | |---|---|---:|---:| | tinyasr `en-fa` (original), no LM | 60M int4 | 4.136 | 4.875 | | **Shenava Rizeh v1.5, no LM** | 60M int4 | **3.692** | **4.397** | | tinyasr `en-fa` + Persian LM | 60M int4 + LM | 3.375 | 3.932 | | **Shenava Rizeh v1.5 + Persian LM** | 60M int4 + LM | **3.201** | **3.790** | | Shenava Rizeh v1.0 + LM (previous) | 32M | 5.454 | 6.719 | With the LM, v1.5 ranks #4 on the board, behind only Gemini 4 Argon, Gemini 3.5 Flash and ElevenLabs Scribe v2. No benchmark-derived hotword lists are used. LM weights (α 0.2, β 1.5) and the averaging were chosen on a held-out tuning half; on the other half, never tuned on, v1.5 + LM scores 3.674 vs 3.834 for the original + LM. English (kept from the original bilingual model): LibriSpeech dummy set WER 8.3 vs 7.8 for the original. ## Files | File | What | |---|---| | `shenava-rizeh-v1.5.tzf` | the model, tinyasr TZF3 format (int4/int8 weights, same layout as the original) | | `silero_vad.onnx` | Silero VAD v5, required by tinyasr | | `lm/shenava-fa-wiki-4gram.bin` | KenLM 4-gram (RaahNaameh corpus + Persian Wikipedia, benchmark sentences removed), optional | | `shenava-rizeh-v1.5.pt` | the same weights as a PyTorch state dict for icefall's Zipformer2 (+ config, token pieces) | | `engine/` | patch to tinyasr adding in-beam KenLM shallow fusion and hotwords, a KenLM C shim, and a CLI (`tbench_fz`) | | `training/` | TZF ⇄ PyTorch converter, exact fbank port, tokenizer, QAT fine-tuning and averaging scripts | ## Usage **Plain tinyasr** (no LM) — drop-in replacement for the original `en-fa.tzf` in any tinyasr app; Persian is language code `fa`: ```rust let models = tinyasr::Models::load(tinyasr::Files { asr: &tzf_bytes, vad: &vad_bytes })?; for words in tinyasr::Transcription::new(&models, &audio_16k_f32, &["fa"], 4) { /* ... */ } ``` **With the LM**: apply `engine/tinyasr-lm-fusion-hotwords.patch` to tinyasr, build `engine/tbench_fz` (links KenLM through `klm_shim.cc`), then ``` tbench_fz shenava-rizeh-v1.5.tzf silero_vad.onnx list.tsv out.tsv 16 lm/shenava-fa-wiki-4gram.bin 0.2 1.5 - 0 ``` (`list.tsv`: `idpath.wav`, 16 kHz). Hotwords: pass a word list and a weight instead of `- 0`. ## Training - Weights dequantized from the original TZF into icefall's Zipformer2 (exact 1:1 tensor mapping; greedy output token-identical to the Rust engine). - Fine-tuned with quantization-aware training (weights fake-quantized to the exact TZF int4/int8 groups), RNN-T loss on the Persian vocabulary, and an encoder-output distillation anchor to the frozen original. 2 epochs, AdamW lr 1e-5. - Data (149 h): Telegram audiobooks (teacher-verified, incl. a rare-word-targeted set), Tarjoman, and NasleMana, labeled by ElevenLabs Scribe v2 and verified by a second teacher. Labels keep punctuation and half-spaces. - Final model = 0.5 · original + 0.5 · fine-tuned, re-quantized to TZF. ## License and credits GPL-3.0-or-later, like the tinyasr engine and models it derives from. If you ship it, release your app's source under the GPL. - Base model and engine: [dkaraush/tinyasr](https://github.com/dkaraush/tinyasr) (GPL-3.0-or-later). - The original models were trained primarily on [YODAS v3](https://huggingface.co/datasets/espnet/yodas3) (ESPnet, CC BY 3.0), Creative Commons YouTube audio — see the dataset card for per-source attribution. - Voice activity detection: [Silero VAD](https://github.com/snakers4/silero-vad) (MIT). - Architecture: Zipformer2 from [k2-fsa/icefall](https://github.com/k2-fsa/icefall) (Apache-2.0).