Sorani ASR: speech to text for Central Kurdish · دەنگ بۆ دەق بۆ کوردیی ناوەندی
Try it in your browser, free and without an account: 140-238-73-72.sslip.io
A speech-to-text model for Central Kurdish (Sorani). It turns spoken Sorani into written text. It is free to use, including commercially, under the MIT licence.
Author: Rawa Hazhar, University of Slemani · ORCID 0009-0003-5134-6626
Highlights (based on the tests in the accompanying paper)
- To our knowledge, the first Central Kurdish model that is freely licensed (MIT), this accurate, and light enough to run on an ordinary laptop without a graphics card.
- More accurate than every Sorani-specific open model we tested.
- With its language model, as accurate as Meta's largest Omnilingual ASR model (about 13 times bigger) on FLEURS and AsoSoft, and more accurate than it on speakers it has never heard (Common Voice).
بە کوردی
خاڵە بەهێزەکان (بەپێی تاقیکردنەوەکانی توێژینەوەکە):
- تا ئەوەی ئێمە بزانین، یەکەمین مۆدێلی کوردیی ناوەندییە کە هەم بە مۆڵەتی ئازاد (MIT) بڵاوکراوەتەوە، هەم ئەوەندە وردە، و هەم بەبێ کارتی گرافیک لەسەر لاپتۆپێکی ئاسایی کار دەکات.
- لە هەموو ئەو مۆدێلە کراوانەی تایبەت بە سۆرانی کە تاقیمان کردنەوە، وردترە.
- لەگەڵ مۆدێلی زمان، هاوتای گەورەترین مۆدێلی Omnilingual ASR ی Meta-یە (نزیکەی 13 جار گەورەتر)، و لەسەر دەنگی کەسانێک کە هەرگیز نەیبیستوون، لەو وردترە.
ئەم مۆدێلە قسەی کوردیی سۆرانی دەکات بە دەقی نووسراو. بەخۆڕاییە و بە مۆڵەتی MIT بڵاوکراوەتەوە، واتە هەر کەسێک دەتوانێت بەکاری بهێنێت، تەنانەت لە کاری بازرگانیدا.
چۆن بەکاری بهێنم؟ ئاسانترین ڕێگا ئەم پەڕەیەیە: فایلی دەنگ دابنێ یان تۆمار بکە، و دەقەکە و ژێرنووس (srt) وەربگرە. هەژمار و تێپەڕەوشەی ناوێت.
بۆ چی باشە؟ نووسینەوەی چاوپێکەوتن، وتار، وانە، کۆبوونەوە و دەنگی واتسئاپ، و دروستکردنی ژێرنووس بۆ ڤیدیۆ.
ئاگاداری: باشترین ئەنجام بۆ قسەی ڕوون و بێ ژاوەژاوە. دەقەکە خاڵبەندی تێدا نییە، و ناو و وشەی بیانی هەندێک جار هەڵە دەنووسرێن. پێش بڵاوکردنەوە، هەمیشە دەقەکە بخوێنەرەوە و ڕاستی بکەرەوە.
وردی: لە تاقیکردنەوەیەکی ستانداردی قسەی خوێندراوەدا (FLEURS)، نزیکەی 24 وشە لە هەر 100 وشە جیاوازن لە دەقی فەرمی. بەڵام دوو کەسی کوردزمان کە بە شێوەی کوێر هەڵەکانیان هەڵسەنگاند، دۆزیانەوە کە تەنها نزیکەی یەک لەسەر سێی ئەو جیاوازییانە هەڵەی ڕاستەقینەن؛ زۆربەیان جیاوازیی ڕێنووس و بۆشایین.
What it is good for
- transcribing interviews, lectures, speeches, meetings and WhatsApp voice notes;
- making subtitles for videos;
- building Sorani voice applications (it runs on an ordinary laptop, without a graphics card).
It works best on clear speech without background noise. The output has no punctuation. Always check the text before you publish it.
Results
FLEURS Central Kurdish test set: 348 sentences, one recording each, scored with the Sorani normaliser described in the accompanying paper. Values in brackets are 95% bootstrap confidence intervals.
| Configuration | WER % | CER % |
|---|---|---|
| This model, greedy decoding | 27.5 (25.8–29.4) | 6.9 (5.8–8.2) |
| This model + 5-gram Sorani language model (included in this repository) | 24.2 (22.4–26.1) | 6.5 (5.4–7.8) |
Omnilingual ASR omniASR_LLM_7B (7.8 billion parameters, no language model) | 24.2 (22.4–26.1) | 6.7 (5.4–8.0) |
| MMS-1b-all + the same language model (same tuning grid) | 27.4 | 7.3 |
With its language model, this model is statistically level with the largest Omnilingual ASR model on FLEURS (difference 0.04 WER points, p = 0.96), with about one-thirteenth of the parameters. Without a language model it is 3.3 WER points behind that model on FLEURS, and ahead of every Sorani-specific open model and MMS-1b-all that we tested.
| Test set | Greedy WER / CER % | With language model WER / CER % | Omnilingual ASR LLM-7B WER / CER % |
|---|---|---|---|
| AsoSoft (600 studio recordings of 100 sentences) | 19.7 / 2.8 | 17.5 / 2.5 | 18.9 / 2.7 |
| Common Voice v24 test (5,348 recordings from 1,151 speakers excluded from training) | 22.5 / 4.2 | 19.8 / 3.9 | 23.5 / 4.6 |
On AsoSoft the differences from Omnilingual ASR are not statistically significant; on Common Voice this model is better (p ≤ 0.001).
How to read these numbers:
- Word error rate for Sorani depends strongly on spelling conventions. The model writes in the convention of its training transcripts, without punctuation. Against references in Kurdish Academy orthography, word-level scores are lower; the paper reports this in detail.
- In a blind analysis of 160 sampled error spans, two native speakers judged only 29% and 33% to be genuine misrecognitions; most of the rest were spelling or word-spacing variants.
- On an ordinary laptop CPU (Intel Core i5-10210U, 8 GB of RAM), greedy decoding runs at about 0.9 times real time.
Usage
Simple (greedy decoding)
import torch, librosa
from transformers import Wav2Vec2BertForCTC, Wav2Vec2CTCTokenizer, SeamlessM4TFeatureExtractor
repo = "RawaHazhar/sorani-asr"
tok = Wav2Vec2CTCTokenizer.from_pretrained(repo)
feat = SeamlessM4TFeatureExtractor.from_pretrained(repo)
model = Wav2Vec2BertForCTC.from_pretrained(repo).eval()
audio, _ = librosa.load("speech.wav", sr=16000)
inputs = feat([audio], sampling_rate=16000, return_tensors="pt")
with torch.inference_mode():
logits = model(**inputs).logits
print(tok.batch_decode(logits.argmax(-1))[0])
More accurate (with the language model)
Install pyctcdecode and kenlm (pip install pyctcdecode https://github.com/kpu/kenlm/archive/master.zip), then:
from huggingface_hub import hf_hub_download
from pyctcdecode import build_ctcdecoder
lm = hf_hub_download(repo, "sorani5_clean3.bin") # 2.2 GB, downloaded once
v = tok.get_vocab(); labels = [None] * len(v)
for t, i in v.items():
labels[i] = " " if t == "|" else ("" if t == tok.pad_token else ("⁇" if t == tok.unk_token else t))
decoder = build_ctcdecoder(labels, kenlm_model_path=lm, alpha=0.5, beta=1.0)
print(decoder.decode(torch.log_softmax(logits[0], -1).numpy(), beam_width=100))
Long recordings should be cut into segments of up to about 20 seconds; the model was trained on clips of 0.5–20 seconds. The demo's code shows one way to do this.
Files
model.safetensors,config.json, tokenizer and feature-extractor files: the acoustic model (MIT licence).sorani5_clean3.bin: a 5-gram KenLM language model trained on Sorani Wikipedia and FineWeb-2 text, with every sentence that overlaps the FLEURS, AsoSoft or Common Voice test sets removed. Licence: CC BY-SA 4.0 (because of its Wikipedia component); it also permits commercial use.
Training
- Base model: w2v-BERT 2.0 (600M parameters), with a new CTC output layer over 73 Sorani, digit and Latin characters.
- Data: Common Voice Central Kurdish v24 validated recordings (CC0) and the FLEURS Central Kurdish training split (CC BY 4.0), with strict held-out speaker and sentence exclusion. Every Common Voice speaker or sentence that appears in the official development or test splits is excluded, as is every FLEURS development or test sentence. This leaves 46,845 recordings, about 56 hours.
- Schedule: 10,000 steps, AdamW, peak learning rate 5e-5, warm-up 1,000 steps then linear decay, batches of up to 120 seconds of audio.
- Hardware: one NVIDIA L4 GPU, about 6 hours, bfloat16.
Limitations
- Trained and evaluated on read speech. Conversational, noisy, broadcast or strongly dialectal speech is untested.
- Output is normalised text without punctuation.
- Automatic transcripts should be checked by a fluent speaker before use in research, journalism or legal settings.
Citation
Hazhar, R. (2026). Benchmarking and Advancing Open Speech Recognition for Central Kurdish: Normalisation, Reference Auditing and Speaker-Disjoint Fine-Tuning. Preprint (arXiv link to follow).
Training data attribution: FLEURS (Conneau et al., 2023; CC BY 4.0) and Common Voice (Ardila et al., 2020; CC0).