Automatic Speech Recognition
Transformers
Safetensors
Arabic
whisper
Quran
Tajweed
Recitation
Islam
Arabic
turbo
MaddoggProduction commited on
Commit
f86beb9
·
verified ·
1 Parent(s): 9180631

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +88 -3
README.md CHANGED
@@ -1,3 +1,88 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - tarteel-ai/everyayah
5
+ - MohamedRashad/Quran-Recitations
6
+ - ahishamm/QURANICWhisperDataset
7
+ language:
8
+ - ar
9
+ metrics:
10
+ - wer
11
+ base_model:
12
+ - openai/whisper-large-v3-turbo
13
+ pipeline_tag: automatic-speech-recognition
14
+ library_name: transformers
15
+ tags:
16
+ - Quran
17
+ - Tajweed
18
+ - Recitation
19
+ - Islam
20
+ - Arabic
21
+ - whisper
22
+ - turbo
23
+ ---
24
+
25
+ # Whisper Large v3 Turbo Quran (LoRA Fine-Tuned)
26
+
27
+ This is a specialized **Automatic Speech Recognition (ASR)** model for **Quranic Recitation**. 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 high accuracy while maintaining exceptional inference speed.
28
+
29
+ ## Model Performance
30
+ - **Word Error Rate (WER):** Achieved **12.69%** on the `ahishamm/QURANICWhisperDataset` test set.
31
+ - **Accuracy:** The model demonstrates high precision in capturing Quranic vocabulary and standard Imla'i script nuances.
32
+
33
+ ## Architecture & Trade-offs
34
+ This model utilizes the **Turbo** architecture, which reduces the decoder depth from 32 layers (in the standard Large v3) to **4 layers**.
35
+
36
+ - **Pros:** Extremely fast inference speed (significantly lower latency than Medium or Large v3).
37
+ - **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) if not configured correctly during inference.
38
+
39
+ **Recommendation:** This model is ideal for **Live Transcription** or applications where low latency is critical. For offline batch processing where speed is not a priority, a full Large-v3 model may offer slightly higher semantic stability on very long verses.
40
+
41
+ ## Training Details
42
+ The model was trained using **LoRA (Low-Rank Adaptation)** in a multi-stage curriculum learning process to ensure stability and precision.
43
+
44
+ ### Datasets
45
+ The training and evaluation process utilized a comprehensive mix of professional recitations:
46
+ 1. **Training & Validation:**
47
+ - [tarteel-ai/everyayah](https://huggingface.co/datasets/tarteel-ai/everyayah)
48
+ - [MohamedRashad/Quran-Recitations](https://huggingface.co/datasets/MohamedRashad/Quran-Recitations)
49
+ 2. **Testing:**
50
+ - [ahishamm/QURANICWhisperDataset](https://huggingface.co/datasets/ahishamm/QURANICWhisperDataset) (Used for final WER calculation).
51
+
52
+ ### Methodology
53
+ - **Curriculum Learning:** The model was trained gradually across these datasets to refine its understanding of Tajweed and Quranic sentence structures.
54
+ - **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.
55
+
56
+ ## Usage
57
+
58
+ This model is fully compatible with the Hugging Face `transformers` pipeline.
59
+
60
+ **CRITICAL NOTE ON INFERENCE:**
61
+ Due to the Turbo architecture's reduced decoder depth, you must carefully control the `stride_length_s` parameter. A long stride (e.g., 4s or more) can cause the model to lose context and enter infinite repetition loops. **It is strongly recommended to keep the stride length to 2 seconds.**
62
+
63
+ ```python
64
+ from transformers import pipeline
65
+
66
+ # Load the pipeline
67
+ pipe = pipeline(
68
+ "automatic-speech-recognition",
69
+ model="YourUsername/whisper-l-v3-turbo-quran-lora", # Replace with your model ID
70
+ device=0 # for GPU usage, -1 for CPU
71
+ )
72
+
73
+ # Transcribe audio
74
+ result = pipe(
75
+ "path_to_audio.mp3",
76
+ chunk_length_s=30,
77
+ stride_length_s=2, # Keep this at 2s to prevent loops and hallucinations
78
+ batch_size=8,
79
+ return_timestamps=True,
80
+ generate_kwargs={
81
+ "task": "transcribe",
82
+ "language": "arabic",
83
+ "temperature": 0.0, # Greedy decoding, recommended for stability
84
+ "num_beams": 1 # 1 is sufficient, adjust as needed
85
+ }
86
+ )
87
+
88
+ print(result["text"])