Automatic Speech Recognition
Transformers
Safetensors
Arabic
whisper
Quran
Tajweed
Recitation
Islam
Arabic
turbo
Instructions to use MaddoggProduction/whisper-l-v3-turbo-quran-lora-dataset-mix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MaddoggProduction/whisper-l-v3-turbo-quran-lora-dataset-mix with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="MaddoggProduction/whisper-l-v3-turbo-quran-lora-dataset-mix")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("MaddoggProduction/whisper-l-v3-turbo-quran-lora-dataset-mix") model = AutoModelForSpeechSeq2Seq.from_pretrained("MaddoggProduction/whisper-l-v3-turbo-quran-lora-dataset-mix", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 4,059 Bytes
f86beb9 76e2a26 f86beb9 a67f3b8 90cb203 f86beb9 e7390fa f86beb9 e7390fa f86beb9 a67f3b8 f86beb9 6b588da f86beb9 a67f3b8 f86beb9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | ---
license: apache-2.0
datasets:
- tarteel-ai/everyayah
- MohamedRashad/Quran-Recitations
- ahishamm/QURANICWhisperDataset
language:
- ar
metrics:
- wer
base_model:
- openai/whisper-large-v3-turbo
pipeline_tag: automatic-speech-recognition
library_name: transformers
tags:
- Quran
- Tajweed
- Recitation
- Islam
- Arabic
- whisper
- turbo
---
# Whisper Large v3 Turbo Quran (LoRA Fine-Tuned)
This is a specialized **Automatic Speech Recognition (ASR)** model for **Quranic Recitation** with **tashkeel** or **diacritics**. It is a fine-tuned version of [openai/whisper-large-v3-turbo](https://huggingface.co/openai/whisper-large-v3-turbo), optimized to recognize Quranic Arabic (with diacritics or tashkeel) with high accuracy while maintaining exceptional inference speed.
## Model Performance
- **Word Error Rate (WER):** Achieved **12.69%** on the `ahishamm/QURANICWhisperDataset` test set (20% of the dataset).
- **Accuracy:** The model demonstrates high precision in capturing Quranic vocabulary and standard script nuances.
## Architecture & Trade-offs
This model utilizes the **Turbo** architecture, which reduces the decoder depth from 32 layers (in the standard Large v3) to **4 layers**.
- **Pros:** Extremely fast inference speed (significantly lower latency than Medium or Large v3).
- **Cons:** Due to the reduced decoder depth, the model has less capacity for long-range context retention compared to the full Large model. This makes it slightly more prone to **hallucinations** and **repetition loops** (e.g., repeating a word during silence), especially if not configured correctly during inference.
**Recommendation:** This model is great for fast verse transcription, **Live Transcription**, or applications where low latency is critical. For offline batch processing where speed is not a priority, a full Large-v3 (or even a medium whisper) model will offer higher semantic stability, especially on long verses.
## Training Details
The model was trained using **LoRA (Low-Rank Adaptation)** in a multi-stage curriculum learning process to ensure stability and precision.
### Datasets
The training and evaluation process utilized a comprehensive mix of professional recitations:
1. **Training & Validation:**
- [tarteel-ai/everyayah](https://huggingface.co/datasets/tarteel-ai/everyayah)
- [MohamedRashad/Quran-Recitations](https://huggingface.co/datasets/MohamedRashad/Quran-Recitations)
2. **Testing:**
- [ahishamm/QURANICWhisperDataset](https://huggingface.co/datasets/ahishamm/QURANICWhisperDataset) (Used for final WER calculation).
### Methodology
- **Curriculum Learning:** The model was trained gradually across these datasets to refine its understanding of Tajweed and Quranic sentence structures.
- **Data Augmentation:** To ensure the model remains robust against real-world conditions (non-studio microphones, background noise, varying volumes), diverse audio augmentations (gain adjustments, spectral masking and white noise) were applied during the training process.
## Usage
This model is fully compatible with the Hugging Face `transformers` pipeline.
**CRITICAL NOTE ON INFERENCE:**
Due to the Turbo architecture's reduced decoder depth, you must carefully control the `stride_length_s` parameter. A long stride (e.g., 5s or more) can cause the model to lose context and enter infinite repetition loops. **It is recommended to keep the stride length to around 2 or 3 seconds.**
```python
from transformers import pipeline
# Load the pipeline
pipe = pipeline(
"automatic-speech-recognition",
model="MaddoggProduction/whisper-l-v3-turbo-quran-lora-dataset-mix",
device=0 # for GPU usage, -1 for CPU
)
# Transcribe audio
result = pipe(
"path_to_audio.mp3",
chunk_length_s=30,
stride_length_s=2, # 2s or 3s to prevent loops and hallucinations
batch_size=8,
return_timestamps=True,
generate_kwargs={
"task": "transcribe",
"language": "arabic",
"num_beams": 1 # 1 is sufficient, adjust as needed
}
)
print(result["text"]) |