🕌 Whisper Quranic ASR — Fully Merged Fine-Tuned Model (v2)
Graduation Project · Computer Engineering
A fully merged, standalone fine-tuned version of Whisper Large V3 Turbo optimized for Quranic Arabic speech recognition. The LoRA adapter weights have been permanently fused into the base model parameters for zero-overhead inference.
Quranic recitation presents unique challenges for general-purpose ASR systems: precise Tajweed rules, elongations (Madd), and a phonetic richness distinct from Modern Standard Arabic.
While the initial version (v1) was trained using LoRA (Low-Rank Adaptation) and 8-bit quantization to fit modest hardware, this version (v2) represents the final engineering milestone: permanently merging those adapted weights back into the foundational model architecture. This eliminates any secondary dependency on PEFT libraries at inference time, reduces VRAM loading overhead, and guarantees maximal transcription throughput for real-world deployment in educational and memorization systems.
The EveryAyah dataset contains high-quality recordings of Quranic verses by various reciters, making it an ideal resource for training recitation-aware ASR models.
⚙️ Core Methodology (v1 → v2)
The model weights were fused in native FP16 precision using the following formula:
$$\theta_{\text{merged}} = \theta_{\text{base}} + \frac{\alpha}{r} (A \cdot B)$$
Where $A$ and $B$ are the low-rank matrices learned during the 400-step fine-tuning phase ($r=32$, $\alpha=64$). Merging these deltas ensures that the model executes as a single, unified computation graph with no PEFT overhead at inference time.
🔊 Audio Preprocessing & Augmentation
Decoding Pipeline
All audio files are decoded manually at 16 kHz using librosa.load(), converting raw bytes directly to float32 NumPy arrays. This approach bypasses the default torchcodec audio decoder (which exhibited compatibility issues with the installed PyTorch version) and ensures reproducible behaviour across environments.
Data Augmentation Strategy
To improve robustness to diverse recitation paces and tonal variations, two on-the-fly transformations were applied during training via the audiomentations library:
Transform
Parameters
Probability
Purpose
PitchShift
±3 semitones
50%
Simulates pitch differences across male, female, and child reciters
TimeStretch
Rate: 0.85× – 1.15×
40%
Adapts the model to handle both rapid (Hadr) and deliberate (Tarteel) recitation paces
🚀 How to Run — Inference
Since this is a fully merged model, you do not need the peft library. Load it directly as a standard Whisper model.