🦀🌊🎙️ Shenava Koochik v1.0 — tract streaming

Cache-aware Persian CTC streaming for the pure-Rust tract runtime. This bundle does not require ONNX Runtime or a C++ inference library.

✨ At a glance | معرفی سریع

English فارسی
🦀 Runtime Pure Rust with tract اجرای خالص Rust با tract
🌊 Mode True cache-aware streaming اجرای جریانی واقعی با cache
🪶 Smallest graph 138 MB INT4 کوچک‌ترین گراف INT4 با حجم ۱۳۸MB
🎧 Input 121-frame log-mel chunks chunkهای ۱۲۱ فریمی log-mel
🔌 Dependencies No ONNX Runtime or C++ engine بدون ONNX Runtime یا موتور C++

📦 Pick a graph

File Precision Size Intended use
model.int4.onnx Q4_0 weight-only 138 MB Recommended edge/streaming graph.
model.int8.onnx dynamic INT8 matmul 174 MB Useful where INT8 kernels win; can be slower for batch-1 streaming.
model.onnx FP32 459 MB Reference graph.

The release’s parity checks reported byte-identical greedy transcripts for INT4 and INT8 versus FP32. The published x86 measurement for FP32 was about 83.9 ms per 1.12-second chunk (RTF about 0.075); treat this as release-specific, not a promise for other hardware.

🌊 Streaming contract

  • audio_signal: FP32 [1, 80, 121], unnormalized NeMo log-mel.
  • length: INT64 [1], the true valid frame count.
  • cache_last_channel: [1, 17, 70, 512].
  • cache_last_time: [1, 17, 512, 8].
  • cache_last_channel_len: INT64 [1].
  • Output: CTC log-probabilities plus the next cache tensors.

Feed 121-frame chunks with a shift of 112 frames and 9 frames of pre-encode overlap. Pad the first and final chunks, but pass their true lengths. Initialize cache tensors to zero, thread the returned caches into the next step, and preserve the previous CTC token across chunk boundaries when collapsing repeats. Blank id is 1024; map tokens with tokens.txt and convert SentencePiece to spaces.

🧩 tract compatibility

NeMo FastConformer cache-aware graph support was merged into tract main in sonos/tract#2441. Use a tract revision containing that change. shenava_tract_streaming.patch remains in this repository for older tract revisions and reproducibility.

persian_itn.py optionally converts spoken Persian numbers to Persian digits.

🇮🇷 خلاصهٔ فارسی

این مخزن مدل جریانی cache-aware برای موتور خالص Rust یعنی tract است. برای دستگاه‌های edge فایل INT4 پیشنهاد می‌شود. cacheها را از هر مرحله به مرحلهٔ بعد منتقل کنید و هنگام CTC collapse توکن قبلی را بین chunkها حفظ کنید.

🌌 Explore Shenava-1

🧠 Koochik source · 🦀 tract streaming · 📼 tract offline · 🌐 Browser ONNX · 🍎 Core ML

Apache-2.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for PersianML/Shenava-Koochik-v1.0-tract-streaming

Quantized
(14)
this model

Collection including PersianML/Shenava-Koochik-v1.0-tract-streaming