Views
No views yet
tarteel-ai/whisper-base-ar-quran
for Arabic Qurʾān recitation (tilâwah).| model | WER ↓ | Δ vs ours |
|---|---|---|
KheemP/whisper-base-quran-lora | 0.0598 | — |
| tarteel-ai/whisper-base-ar-quran | 0.073 | -1.3 × |
| tarteel-ai/whisper-tiny-ar-quran | 0.096 | -1.6 × |
| NVIDIA FastConformer large (NeMo) | ≈ 0.069 | -1.2 × |
1from transformers import WhisperProcessor, WhisperForConditionalGeneration
2from peft import PeftModel
3import torch, soundfile as sf
4
5base_id = "tarteel-ai/whisper-base-ar-quran"
6lora_id = "KheemP/whisper-base-quran-lora"
7
8# load model+processor
9model = WhisperForConditionalGeneration.from_pretrained(base_id, torch_dtype=torch.float16)
10model = PeftModel.from_pretrained(model, lora_id)
11proc = WhisperProcessor.from_pretrained(base_id)
12
13# transcribe an mp3 -> text
14audio, _ = sf.read("my_recitation.mp3")
15inputs = proc(audio, sampling_rate=16_000, return_tensors="pt").to(model.device)
16pred_ids = model.generate(**inputs)
17print(proc.decode(pred_ids[0]))⚠️ This repo only stores the LoRA adapter (~2 MB). The code above automatically downloads the original Whisper base model and injects the adapter.
| Back-bone | Whisper Base (77 M params) |
| LoRA rank / α / drop | 8 / 16 / 0.05 |
| Trainable params | 0.59 M (0.8 %) |
| Epochs | 5 |
| Batch / grad-accum | 2×4 (effective = 8) |
| LR / sched | 5 · 10⁻⁴, constant |
| Mixed-precision | fp16 |
| Hardware | single NVIDIA A100 40 GB |
q_proj, k_proj, v_proj, out_proj in both encoder & decoder self-attn and
encoder-cross-attn blocks.1@software{quran_whisper_lora_2024,
2 author = {Kheem Dharmani},
3 title = {Whisper-Base Qurʾān LoRA Adapter},
4 year = 2024,
5 url = {https://huggingface.co/KheemP/whisper-base-quran-lora}
6}