Reza2kn commited on
Commit
0f12996
·
verified ·
1 Parent(s): 80a065d

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
@@ -26,6 +26,173 @@ tags:
26
  - visualears
27
  ---
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  # Shenava — Rizeh v1.0 (32M) · CoreML iOS15 NeuralNetwork fp16
30
 
31
  CoreML **NeuralNetwork** (not ML Program) fp16 export of [`Reza2kn/Shenava-Rizeh-v1.0`](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0) — built so **older Apple devices capped at iOS 15** (e.g. iPad Air 2 / iOS 15.8) can load and run it. ML Program packages require iOS 16+; this targets **NeuralNetwork / CoreML spec v5 with iOS 14 availability**, so it runs on iOS 15.
@@ -79,3 +246,4 @@ coremlc compile shenava_rizeh_v1_0_ctc_streaming_att70_0_ios15_fp16.mlmodel /tmp
79
  Tokenizer: ve_tok_v4 (SentencePiece BPE-1024 +blank, digit/punct/«»-aware). Numbers are emitted in **spoken form**; apply Persian ITN at display for digits. Part of [VisualEars / Shenava](https://shenava.app).
80
 
81
  Export stack: coremltools 9.0, torch 2.7.0, NeMo 2.7.3. fp16 vs fp32 argmax agreement: **1.000**.
 
 
26
  - visualears
27
  ---
28
 
29
+ # 🎙️ Shenava-Rizeh-v1.0-CoreML-iOS15-fp16
30
+
31
+ > **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)
32
+
33
+ ## 🌟 At a glance | معرفی سریع
34
+
35
+ | | English | فارسی |
36
+ |---|---|---|
37
+ | 🎯 Role | Rizeh iOS 15 CoreML export. | مدل دانش‌آموز فشردهٔ شنوا ریزه؛ این مخزن یکی از مصنوعات رسمی خانوادهٔ Shenava-1 است. |
38
+ | 🧠 Family | Shenava Rizeh compact student | مدل دانش‌آموز فشردهٔ شنوا ریزه |
39
+ | 📦 Format | Core ML FP16 deployment export | خروجی FP16 برای Core ML |
40
+ | 📐 Scale | 32M parameters | اندازه: 32M parameters |
41
+ | 📥 Input | mono Persian speech resampled to 16 kHz | گفتار تک‌کانالهٔ فارسی با نرخ نمونه‌برداری ۱۶ کیلوهرتز |
42
+ | 📤 Output | Persian transcription; normalization and ITN belong in the display layer | رونویسی فارسی؛ نرمال‌سازی و تبدیل عدد گفتاری در لایهٔ نمایش انجام می‌شود |
43
+ | ⚖️ License | Apache License 2.0 | مجوز Apache 2.0 |
44
+
45
+ ## 🇬🇧 English documentation
46
+
47
+ ### 🧭 Overview
48
+
49
+ Rizeh iOS 15 CoreML 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.
50
+
51
+ 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.
52
+
53
+ ### ✅ Intended uses
54
+
55
+ - Persian ASR research, benchmarking, and reproducible comparison inside the Shenava-1 evaluation protocol.
56
+ - Offline or streaming transcription when the selected runtime and graph support that mode.
57
+ - On-device captioning, accessibility prototypes, and Persian speech interfaces.
58
+ - Conversion or runtime integration work that preserves the source model’s tokenizer, decoding assumptions, and numerical checks.
59
+
60
+ ### 🚫 Out-of-scope or unsafe uses
61
+
62
+ - Do not treat transcripts as guaranteed verbatim records for legal, medical, emergency, or other high-stakes decisions.
63
+ - Do not infer identity, health, ethnicity, intent, or other sensitive traits from speech or model errors.
64
+ - Do not compare formats using different text normalization, test subsets, or decoding settings and present the result as model quality.
65
+ - Do not assume robustness to every Persian accent, code-switching pattern, recording channel, or adversarial acoustic condition.
66
+
67
+ ### 📁 Repository contents
68
+
69
+ This snapshot contains **9 files** totaling approximately **52.19 MB**. Common file groups: `.json` × 4, `no extension` × 2, `.md` × 1, `.py` × 1, `.mlmodel` × 1.
70
+
71
+ Largest or representative artifacts:
72
+
73
+ - `shenava_rizeh_v1_0_ctc_streaming_att70_0_ios15_fp16.mlmodel`
74
+ - `mel_filters_slaney_80x257.json`
75
+ - `tokens.json`
76
+ - `export_koochik10_streaming_coreml.py`
77
+ - `preprocessor.json`
78
+
79
+ 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.
80
+
81
+ ### 🚀 Download and integration
82
+
83
+ ```python
84
+ from huggingface_hub import snapshot_download
85
+
86
+ local_dir = snapshot_download(
87
+ repo_id="Reza2kn/Shenava-Rizeh-v1.0-CoreML-iOS15-fp16",
88
+ local_dir="./Shenava-Rizeh-v1.0-CoreML-iOS15-fp16",
89
+ )
90
+ print(local_dir)
91
+ ```
92
+
93
+ 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.
94
+
95
+ 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.
96
+
97
+ ### 📏 Evaluation
98
+
99
+ 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.
100
+
101
+ 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.
102
+
103
+ ### ⚠️ Limitations and responsible use
104
+
105
+ 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.
106
+
107
+ ### 🔁 Reproducibility checklist
108
+
109
+ 1. Pin the Hub revision and runtime/library versions.
110
+ 2. Resample audio deterministically and document channel mixing.
111
+ 3. Keep tokenizer and decoding assets from this repository together.
112
+ 4. Record streaming chunk, left/right context, cache reset, and endpointing behavior.
113
+ 5. Apply one documented Persian normalization/ITN pipeline to references and hypotheses.
114
+ 6. Publish failed cases and condition-level results, not only a single average.
115
+
116
+ ## 🇮🇷 مستندات فارسی
117
+
118
+ ### 🧭 معرفی
119
+
120
+ مدل دانش‌آموز فشردهٔ شنوا ریزه است. این مخزن یک مصنوع رسمی از انتشار Shenava-1 است و باید همراه با داده‌های آموزشی، توکنایزر، روش رمزگشایی، نرمال‌سازی فارسی و تنظیمات اجرای جریانی دیده شود. پیوند مجموعه در بالای صفحه، نسخه‌های هم‌خانواده، قالب‌های استقرار، داده‌ها و معیارهای ارزیابی را یک‌جا نشان می‌دهد.
121
+
122
+ هدف پروژه ارائهٔ زیرساخت باز و قابل بازتولید برای بازشناسی گفتار و زیرنویس فارسی است. نتیجهٔ نهایی فقط به وزن مدل وابسته نیست؛ نرخ نمونه‌برداری، کانال صوت، وضعیت کش، روش رمزگشایی، تبدیل اعداد گفتاری و یکسان‌سازی نیم‌فاصله نیز بر خروجی اثر دارند.
123
+
124
+ ### ✅ کاربردهای پیشنهادی
125
+
126
+ - پژوهش، بنچمارک و مقایسهٔ منصفانهٔ ASR فارسی با پروتکل یکسان.
127
+ - رونویسی آفلاین یا جریانی، در صورتی که قالب و زمان‌اجرای انتخابی از آن پشتیبانی کند.
128
+ - زیرنویس روی دستگاه، ابزارهای دسترس‌پذیری و رابط‌های گفتاری فارسی.
129
+ - تبدیل مدل و یکپارچه‌سازی با زمان‌اجراهای مختلف همراه با آزمون برابری خروجی.
130
+
131
+ ### 🚫 کاربردهای نامناسب
132
+
133
+ - خروجی را در تصمیم‌های پزشکی، حقوقی، اضطراری یا پرخطر به‌عنوان سند قطعی به کار نبرید.
134
+ - از خطا یا صدای کاربر برای استنباط هویت، سلامت، قومیت، نیت یا ویژگی حساس استفاده نکنید.
135
+ - نتایجی را که با زیرمجموعه، نرمال‌سازی یا رمزگشایی متفاوت ساخته شده‌اند مقایسهٔ مستقیم ننامید.
136
+ - پوشش کامل همهٔ لهجه‌ها، گفتار آمیخته، کانال‌ها و شرایط صوتی را فرض نکنید.
137
+
138
+ ### 📁 محتوای مخزن
139
+
140
+ این نسخه شامل **9 فایل** با حجم تقریبی **52.19 MB** است. گروه‌های رایج فایل: `.json` × 4, `no extension` × 2, `.md` × 1, `.py` × 1, `.mlmodel` × 1.
141
+
142
+ فایل‌های شاخص:
143
+
144
+ - `shenava_rizeh_v1_0_ctc_streaming_att70_0_ios15_fp16.mlmodel`
145
+ - `mel_filters_slaney_80x257.json`
146
+ - `tokens.json`
147
+ - `export_koochik10_streaming_coreml.py`
148
+ - `preprocessor.json`
149
+
150
+ فایل‌های توکنایزر، واژگان، پیکربندی، وضعیت جریانی و فراداده را در صورت وجود کنار وزن اصلی نگه دارید.
151
+
152
+ ### 🚀 دریافت و استفاده
153
+
154
+ ابتدا snapshot کامل مخزن را دریافت کنید، سپس از زمان‌اجرای متناسب با قالب استفاده کنید. پیش از اتصال ورودی و خروجی، امضای گراف را بررسی کنید؛ خروجی‌های جریانی ممکن است علاوه بر ویژگی صوتی، تنسورهای وضعیت و کش داشته باشند.
155
+
156
+ برای چک‌پوینت NeMo از `ASRModel.restore_from(...)` استفاده کنید و مدل را صرفاً CTC فرض نکنید. برای خروجی‌های تبدیل‌شده، یک کلیپ مرجع را با مدل مبدأ مقایسه کنید و سپس استقرار را انجام دهید.
157
+
158
+ ### 📏 ارزیابی
159
+
160
+ حداقل WER و CER را با نرمال‌سازی فارسی یکسان گزارش کنید و در سناریوهای حساس به معنا، S³ را نیز بیاورید. در [جدول Triple Threat](https://huggingface.co/spaces/Reza2kn/PersianASR-TrippleThreat) دو بخش Golden6669 و FLEURS-fa با هم سنجیده می‌شوند. شناسهٔ دقیق نسخه، تنظیمات دیکودر، کانتکست، دقت عددی، سخت‌افزار و کد نرمال‌سازی را ثبت کنید.
161
+
162
+ ### ⚠️ محدودیت‌ها و استفادهٔ مسئولانه
163
+
164
+ لهجه، سن، سبک گفتار، نویز، فاصله، کلیپ‌شدن، پژواک، کانال تلفنی، هم‌پوشانی گویندگان و کدسوئیچینگ می‌توانند کیفیت را تغییر دهند. چند نگارش فارسی ممکن است از نظر معنایی درست باشند، اما WER/CER یکی را خطا حساب کند. در محصولات دسترس‌پذیری، واژه‌های کلیدی را جداگانه بازبینی و عدم قطعیت را به کاربر نشان دهید.
165
+
166
+ ### 🔁 چک‌لیست بازتولید
167
+
168
+ ۱. نسخهٔ دقیق مخزن و کتابخانه‌ها را ثابت کنید. ۲. تبدیل نرخ نمونه و کانال را مستند کنید. ۳. توکنایزر و دارایی‌های رمزگشایی همین مخزن را نگه دارید. ۴. اندازهٔ قطعه، کانتکست، بازنشانی کش و endpointing را ثبت کنید. ۵. یک خط لولهٔ نرمال‌سازی/ITN مشترک به مرجع و خروجی اعمال کنید. ۶. خطاهای نمونه‌ای و نتایج هر شرایط را در کنار میانگین منتشر کنید.
169
+
170
+ ## 📚 Citation, links, and license | استناد، پیوندها و مجوز
171
+
172
+ - 🤗 [Shenava-1 collection](https://huggingface.co/collections/Reza2kn/shenava-10-open-streaming-persian-asr-and-captioning)
173
+ - 🧰 [Project repository](https://github.com/Reza2kn/shenava-1)
174
+ - 📄 [SLT paper submission](https://openreview.net/forum?id=QTa6ax9PU3)
175
+ - 📊 [Persian ASR Triple Threat](https://huggingface.co/spaces/Reza2kn/PersianASR-TrippleThreat)
176
+
177
+ ```bibtex
178
+ @misc{shenava1_shenava_rizeh_v1_0_coreml_ios15_fp16,
179
+ title = {Shenava-Rizeh-v1.0-CoreML-iOS15-fp16: a Shenava-1 Persian speech artifact},
180
+ author = {Reza2kn},
181
+ year = {2026},
182
+ url = {https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0-CoreML-iOS15-fp16}
183
+ }
184
+ ```
185
+
186
+ Released under the **Apache License 2.0**. این مخزن با **مجوز Apache 2.0** منتشر شده است.
187
+
188
+ ---
189
+
190
+ ## 📎 Retained technical notes | یادداشت‌های فنی پیشین
191
+
192
+ 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.
193
+
194
+ یادداشت فنی قبلی برای فرمان‌ها، اندازه‌گیری‌ها و جزئیات همان نسخه در ادامه حفظ شده است. بخش‌های دوزبانهٔ بالا قرارداد مستندسازی مشترک Shenava-1 را تعریف می‌کنند.
195
+
196
  # Shenava — Rizeh v1.0 (32M) · CoreML iOS15 NeuralNetwork fp16
197
 
198
  CoreML **NeuralNetwork** (not ML Program) fp16 export of [`Reza2kn/Shenava-Rizeh-v1.0`](https://huggingface.co/Reza2kn/Shenava-Rizeh-v1.0) — built so **older Apple devices capped at iOS 15** (e.g. iPad Air 2 / iOS 15.8) can load and run it. ML Program packages require iOS 16+; this targets **NeuralNetwork / CoreML spec v5 with iOS 14 availability**, so it runs on iOS 15.
 
246
  Tokenizer: ve_tok_v4 (SentencePiece BPE-1024 +blank, digit/punct/«»-aware). Numbers are emitted in **spoken form**; apply Persian ITN at display for digits. Part of [VisualEars / Shenava](https://shenava.app).
247
 
248
  Export stack: coremltools 9.0, torch 2.7.0, NeMo 2.7.3. fp16 vs fp32 argmax agreement: **1.000**.
249
+