Reza2kn commited on
Commit
f4eef7d
·
verified ·
1 Parent(s): d0b1f55

Add extensive bilingual English-Persian Shenava-1 card

Browse files

Document purpose, contents, usage, provenance, evaluation, limitations, responsible use, reproducibility, citation, and Apache-2.0 licensing in English and Persian.

Files changed (1) hide show
  1. README.md +168 -0
README.md CHANGED
@@ -7,6 +7,173 @@ tags: [automatic-speech-recognition, speech, persian, farsi, fastconformer, ctc,
7
  base_model: [Reza2kn/Shenava-Rizeh-v1.0]
8
  ---
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  # Shenava — Rizeh v1.0 (32M) · cache-aware streaming · **native-Rust (tract)**
11
 
12
  Cache-aware **streaming** CTC export of [`Shenava-Rizeh-v1.0`](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0)
@@ -49,3 +216,4 @@ Our streaming support is **merged into tract main** ([sonos/tract#2441](https://
49
  | `model.int8.onnx` | int8 (matmul-only, MatMulInteger) | 49MB | byte-identical; slower on small-batch streaming (per-matmul `DynamicQuantizeLinear`) — best for large-batch / offline, or CPUs where it wins |
50
 
51
  Both quants decode **byte-identically** to fp32. For edge/on-device streaming, use **`model.int4.onnx`** (weight-only, no per-matmul activation quant). Needs **tract main** — the streaming fixes are upstream now, so the bundled `.patch` is no longer required.
 
 
7
  base_model: [Reza2kn/Shenava-Rizeh-v1.0]
8
  ---
9
 
10
+ # 🎙️ Shenava-Rizeh-v1.0-tract-streaming
11
+
12
+ > **English + فارسی** · Part of [Shenava 1.0](https://huggingface.co/collections/Reza2kn/shenava-10-open-streaming-persian-asr-and-captioning) · [Project hub](https://github.com/Reza2kn/shenava-1) · [SLT paper submission](https://openreview.net/forum?id=QTa6ax9PU3)
13
+
14
+ ## 🌟 At a glance | معرفی سریع
15
+
16
+ | | English | فارسی |
17
+ |---|---|---|
18
+ | 🎯 Role | Rizeh native-Rust tract streaming export. | مدل دانش‌آموز فشردهٔ شنوا ریزه؛ این مخزن یکی از مصنوعات رسمی خانوادهٔ Shenava-1 است. |
19
+ | 🧠 Family | Shenava Rizeh compact student | مدل دانش‌آموز فشردهٔ شنوا ریزه |
20
+ | 📦 Format | native Rust tract streaming bundle | بستهٔ جریانی بومی Rust با tract |
21
+ | 📐 Scale | 32M parameters | اندازه: 32M parameters |
22
+ | 📥 Input | mono Persian speech resampled to 16 kHz | گفتار تک‌کانالهٔ فارسی با نرخ نمونه‌برداری ۱۶ کیلوهرتز |
23
+ | 📤 Output | Persian transcription; normalization and ITN belong in the display layer | رونویسی فارسی؛ نرمال‌سازی و تبدیل عدد گفتاری در لایهٔ نمایش انجام می‌شود |
24
+ | ⚖️ License | Apache License 2.0 | مجوز Apache 2.0 |
25
+
26
+ ## 🇬🇧 English documentation
27
+
28
+ ### 🧭 Overview
29
+
30
+ Rizeh native-Rust tract streaming export. This repository is an official Shenava-1 release artifact, not an isolated checkpoint. It belongs to a Persian-first stack covering training data, streaming ASR, semantic evaluation, on-device exports, captioning applications, and reproducible benchmarks. Use the collection link above to locate sibling model sizes, deployment formats, datasets, and evaluation assets.
31
+
32
+ The artifact is optimized for Persian speech and the conventions used by the Shenava/VisualEars pipeline. A model file alone is not the entire inference system: audio preparation, tokenizer assets, streaming state, decoding, Persian text normalization, and inverse text normalization can materially affect observed output.
33
+
34
+ ### ✅ Intended uses
35
+
36
+ - Persian ASR research, benchmarking, and reproducible comparison inside the Shenava-1 evaluation protocol.
37
+ - Offline or streaming transcription when the selected runtime and graph support that mode.
38
+ - On-device captioning, accessibility prototypes, and Persian speech interfaces.
39
+ - Conversion or runtime integration work that preserves the source model’s tokenizer, decoding assumptions, and numerical checks.
40
+
41
+ ### 🚫 Out-of-scope or unsafe uses
42
+
43
+ - Do not treat transcripts as guaranteed verbatim records for legal, medical, emergency, or other high-stakes decisions.
44
+ - Do not infer identity, health, ethnicity, intent, or other sensitive traits from speech or model errors.
45
+ - Do not compare formats using different text normalization, test subsets, or decoding settings and present the result as model quality.
46
+ - Do not assume robustness to every Persian accent, code-switching pattern, recording channel, or adversarial acoustic condition.
47
+
48
+ ### 📁 Repository contents
49
+
50
+ This snapshot contains **9 files** totaling approximately **205.80 MB**. Common file groups: `.onnx` × 3, `no extension` × 2, `.md` × 1, `.py` × 1, `.patch` × 1, `.txt` × 1.
51
+
52
+ Largest or representative artifacts:
53
+
54
+ - `model.onnx`
55
+ - `model.int8.onnx`
56
+ - `model.int4.onnx`
57
+ - `tokens.txt`
58
+ - `shenava_tract_streaming.patch`
59
+
60
+ The repository card and `LICENSE` are part of the release. Runtime-specific configuration, tokenizer, vocabulary, metadata, and state files should be kept beside the main weights when present.
61
+
62
+ ### 🚀 Download and integration
63
+
64
+ ```python
65
+ from huggingface_hub import snapshot_download
66
+
67
+ local_dir = snapshot_download(
68
+ repo_id="Reza2kn/Shenava-Rizeh-v1.0-tract-streaming",
69
+ local_dir="./Shenava-Rizeh-v1.0-tract-streaming",
70
+ )
71
+ print(local_dir)
72
+ ```
73
+
74
+ Use the runtime named by the artifact format. Inspect the exported graph signature before binding input and output tensors; deployment exports may expose cache/state tensors in addition to acoustic features.
75
+
76
+ For NeMo checkpoints, restore through `nemo.collections.asr.models.ASRModel.restore_from(...)` rather than assuming a CTC-only class. For converted artifacts, follow the graph metadata and the runtime-specific notes retained later in this card. Validate one known clip against the source checkpoint before shipping a conversion.
77
+
78
+ ### 📏 Evaluation
79
+
80
+ Report at least WER and CER using the same Persian normalization rules, plus S³ when semantic importance matters. Shenava’s public [Triple Threat leaderboard](https://huggingface.co/spaces/Reza2kn/PersianASR-TrippleThreat) combines the Golden6669 and FLEURS-fa splits. Record the exact repository revision, decoder settings, chunk/context configuration, precision, device, and normalization code.
81
+
82
+ Deployment exports should be checked for numerical and transcription parity against their parent repository, [ `Reza2kn/Shenava-Rizeh-v1.0` ](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0). Runtime speed is hardware-specific; publish latency, real-time factor, warm-up policy, thread count, and audio duration together.
83
+
84
+ ### ⚠️ Limitations and responsible use
85
+
86
+ ASR quality varies with accent, age, speaking style, background noise, distance, clipping, reverberation, telephony bandwidth, overlapping speech, and code-switching. Persian orthography also permits multiple acceptable written forms. WER or CER can therefore penalize a semantically correct alternative, while a low aggregate score can still hide loss of a critical word. Review meaning-critical outputs and expose uncertainty in accessibility-facing products.
87
+
88
+ ### 🔁 Reproducibility checklist
89
+
90
+ 1. Pin the Hub revision and runtime/library versions.
91
+ 2. Resample audio deterministically and document channel mixing.
92
+ 3. Keep tokenizer and decoding assets from this repository together.
93
+ 4. Record streaming chunk, left/right context, cache reset, and endpointing behavior.
94
+ 5. Apply one documented Persian normalization/ITN pipeline to references and hypotheses.
95
+ 6. Publish failed cases and condition-level results, not only a single average.
96
+
97
+ ## 🇮🇷 مستندات فارسی
98
+
99
+ ### 🧭 معرفی
100
+
101
+ مدل دانش‌آموز فشردهٔ شنوا ریزه است. این مخزن یک مصنوع رسمی از انتشار Shenava-1 است و باید همراه با داده‌های آموزشی، توکنایزر، روش رمزگشایی، نرمال‌سازی فارسی و تنظیمات اجرای جریانی دیده شود. پیوند مجموعه در بالای صفحه، نسخه‌های هم‌خانواده، قالب‌های استقرار، داده‌ها و معیارهای ارزیابی را یک‌جا نشان می‌دهد.
102
+
103
+ هدف پروژه ارائهٔ زیرساخت باز و قابل بازتولید برای بازشناسی گفتار و زیرنویس فارسی است. نتیجهٔ نهایی فقط به وزن مدل وابسته نیست؛ نرخ نمونه‌برداری، کانال صوت، وضعیت کش، روش رمزگشایی، تبدیل اعداد گفتاری و یکسان‌سازی نیم‌فاصله نیز بر خروجی اثر دارند.
104
+
105
+ ### ✅ کاربردهای پیشنهادی
106
+
107
+ - پژوهش، بنچمارک و مقایسهٔ منصفانهٔ ASR فارسی با پروتکل یکسان.
108
+ - رونویسی آفلاین یا جریانی، در صورتی که قالب و زمان‌اجرای انتخابی از آن پشتیبانی کند.
109
+ - زیرنویس روی دستگاه، ابزارهای دسترس‌پذیری و رابط‌های گفتاری فارسی.
110
+ - تبدیل مدل و یکپارچه‌سازی با زمان‌اجراهای مختلف همراه با آزمون برابری خروجی.
111
+
112
+ ### 🚫 کاربردهای نامناسب
113
+
114
+ - خروجی را در تصمیم‌های پزشکی، حقوقی، اضطراری یا پرخطر به‌عنوان سند قطعی به کار نبرید.
115
+ - از خطا یا صدای کاربر برای استنباط هویت، سلامت، قومیت، نیت یا ویژگی حساس استفاده نکنید.
116
+ - نتایجی را که با زیرمجموعه، نرمال‌سازی یا رمزگشایی متفاوت ساخته شده‌اند مقایسهٔ مستقیم ننامید.
117
+ - پوشش کامل همهٔ لهجه‌ها، گفتار آمیخته، کانال‌ها و شرایط صوتی را فرض نکنید.
118
+
119
+ ### 📁 محتوای مخزن
120
+
121
+ این نسخه شامل **9 فایل** با حجم تقریبی **205.80 MB** است. گروه‌های رایج فایل: `.onnx` × 3, `no extension` × 2, `.md` × 1, `.py` × 1, `.patch` × 1, `.txt` × 1.
122
+
123
+ فایل‌های شاخص:
124
+
125
+ - `model.onnx`
126
+ - `model.int8.onnx`
127
+ - `model.int4.onnx`
128
+ - `tokens.txt`
129
+ - `shenava_tract_streaming.patch`
130
+
131
+ فایل‌های توکنایزر، واژگان، پیکربندی، وضعیت جریانی و فراداده را در صورت وجود کنار وزن اصلی نگه دارید.
132
+
133
+ ### 🚀 دریافت و استفاده
134
+
135
+ ابتدا snapshot کامل مخزن را دریافت کنید، سپس از زمان‌اجرای متناسب با قالب استفاده کنید. پیش از اتصال ورودی و خروجی، امضای گراف را بررسی کنید؛ خروجی‌های جریانی ممکن است علاوه بر ویژگی صوتی، تنسورهای وضعیت و کش داشته باشند.
136
+
137
+ برای چک‌پوینت NeMo از `ASRModel.restore_from(...)` استفاده کنید و مدل را صرفاً CTC فرض نکنید. برای خروجی‌های تبدیل‌شده، یک کلیپ مرجع را با مدل مبدأ مقایسه کنید و سپس استقرار را انجام دهید.
138
+
139
+ ### 📏 ارزیابی
140
+
141
+ حداقل WER و CER را با نرمال‌سازی فارسی یکسان گزارش کنید و در سناریوهای حساس به معنا، S³ را نیز بیاورید. در [جدول Triple Threat](https://huggingface.co/spaces/Reza2kn/PersianASR-TrippleThreat) دو بخش Golden6669 و FLEURS-fa با هم سنجیده می‌شوند. شناسهٔ دقیق نسخه، تنظیمات دیکودر، کانتکست، دقت عددی، سخت‌افزار و کد نرمال‌سازی را ثبت کنید.
142
+
143
+ ### ⚠️ محدودیت‌ها و استفادهٔ مسئولانه
144
+
145
+ لهجه، سن، سبک گفتار، نویز، فاصله، کلیپ‌شدن، پژواک، کانال تلفنی، هم‌پوشانی گویندگان و کدسوئیچینگ می‌توانند کیفیت را تغییر دهند. چند نگارش فارسی ممکن است از نظر معنایی درست باشند، اما WER/CER یکی را خطا حساب کند. در محصولات دسترس‌پذیری، واژه‌های کلیدی را جداگانه بازبینی و عدم قطعیت را به کاربر نشان دهید.
146
+
147
+ ### 🔁 چک‌لیست بازتولید
148
+
149
+ ۱. نسخهٔ دقیق مخزن و کتابخانه‌ها را ثابت کنید. ۲. تبدیل نرخ نمونه و کانال را مستند کنید. ۳. توکنایزر و دارایی‌های رمزگشایی همین مخزن را نگه دارید. ۴. اندازهٔ قطعه، کانتکست، بازنشانی کش و endpointing را ثبت کنید. ۵. یک خط لولهٔ نرمال‌سازی/ITN مشترک به مرجع و خروجی اعمال کنید. ۶. خطاهای نمونه‌ای و نتایج هر شرایط را در کنار میانگین منتشر کنید.
150
+
151
+ ## 📚 Citation, links, and license | استناد، پیوندها و مجوز
152
+
153
+ - 🤗 [Shenava-1 collection](https://huggingface.co/collections/Reza2kn/shenava-10-open-streaming-persian-asr-and-captioning)
154
+ - 🧰 [Project repository](https://github.com/Reza2kn/shenava-1)
155
+ - 📄 [SLT paper submission](https://openreview.net/forum?id=QTa6ax9PU3)
156
+ - 📊 [Persian ASR Triple Threat](https://huggingface.co/spaces/Reza2kn/PersianASR-TrippleThreat)
157
+
158
+ ```bibtex
159
+ @misc{shenava1_shenava_rizeh_v1_0_tract_streaming,
160
+ title = {Shenava-Rizeh-v1.0-tract-streaming: a Shenava-1 Persian speech artifact},
161
+ author = {Reza2kn},
162
+ year = {2026},
163
+ url = {https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0-tract-streaming}
164
+ }
165
+ ```
166
+
167
+ Released under the **Apache License 2.0**. این مخزن با **مجوز Apache 2.0** منتشر شده است.
168
+
169
+ ---
170
+
171
+ ## 📎 Retained technical notes | یادداشت‌های فنی پیشین
172
+
173
+ The pre-existing technical card is retained below for revision-specific commands, measurements, and artifact details. The bilingual sections above define the common Shenava-1 documentation contract.
174
+
175
+ یادداشت فنی قبلی برای فرمان‌ها، اندازه‌گیری‌ها و جزئیات همان نسخه در ادامه حفظ شده است. بخش‌های دوزبانهٔ بالا قرارداد مستندسازی مشترک Shenava-1 را تعریف می‌کنند.
176
+
177
  # Shenava — Rizeh v1.0 (32M) · cache-aware streaming · **native-Rust (tract)**
178
 
179
  Cache-aware **streaming** CTC export of [`Shenava-Rizeh-v1.0`](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0)
 
216
  | `model.int8.onnx` | int8 (matmul-only, MatMulInteger) | 49MB | byte-identical; slower on small-batch streaming (per-matmul `DynamicQuantizeLinear`) — best for large-batch / offline, or CPUs where it wins |
217
 
218
  Both quants decode **byte-identically** to fp32. For edge/on-device streaming, use **`model.int4.onnx`** (weight-only, no per-matmul activation quant). Needs **tract main** — the streaming fixes are upstream now, so the bundled `.patch` is no longer required.
219
+