Zipformer-v3 Arabic / Quranic ASR & Forced Alignment
Attribution & Credits:
This model family is based on the state-of-the-art Zipformer2-CTC architecture developed by Quran-Lab (Quran-Lab/zipformer_p-arabic-v3). All original training, phonetization, and dataset curation credits belong to the Quran-Lab team and the authors of quran-transcript.
Quantization & Model Variants Table
This repository hosts ONNX quantized and precision-optimized variants designed for edge, CPU, and high-throughput GPU forced-alignment pipelines:
| Model File | Precision / Quant | Size | Recommended Platform | Realtime Speedup (RTF) |
|---|---|---|---|---|
zipformer_p_arabic_v3.1.fp16.onnx |
Pure FP16 (Tensor Core) | 126.2 MB | NVIDIA GPU (CUDA / Tensor Cores) | >220x – 235x realtime (RTF < 0.0045) |
zipformer_p_arabic_v3.1.onnx |
FP32 (v3.1 madd fine-tune) | 250.8 MB | High-precision CPU / GPU | ~100x realtime (GPU) / 3.5x (CPU) |
zipformer_p_arabic_v3.1.int8.onnx |
INT8 / Q8 Quantized | 69.3 MB | Mobile / Embedded / Laptop CPU | ~12x – 15x realtime (x86 CPU) |
zipformer_p_arabic_v3.onnx |
FP32 (v3 Base) | 250.8 MB | Reference FP32 | ~100x realtime (GPU) |
zipformer_p_arabic_v3.int8.onnx |
INT8 / Q8 (v3 Base) | 69.3 MB | Standard CPU deployment | ~12x realtime (CPU) |
tokens.txt |
CTC Symbol Table (251 units) | 2.3 KB | Required for decoding | — |
config.json |
Model Hyperparameters | 177 B | Config metadata | — |
Benchmark Highlights (Surah Al-Kahf 18 & Surah Al-Baqarah 2)
Evaluated across continuous full-surah recitations on NVIDIA Tesla T4 GPU:
- Parity:
0.00 msmean delta against FP32 reference alignment. - Throughput: Aligns full 24.8-minute continuous audio (1,584 words) in
6.69 secondsflat. - Entire 30-Juz Quran (~25 hours audio): Full word-level forced-alignment and repeat-detection in
~6.3 minutes.
Usage with quran-forced-align
Install and align with zero configuration:
# Installs and runs with automatic GPU/CPU detection and auto-model caching:
pip install quran-forced-align
# Single Surah alignment (JSON + SRT):
quran-forced-align --surah 66 --audio audio/066_basit.mp3 --out output/066.json
Python Streaming ONNX Inference
import onnxruntime as ort
import numpy as np
# Load FP16 model on CUDA Execution Provider:
opts = ort.SessionOptions()
opts.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_ALL
session = ort.InferenceSession(
"zipformer_p_arabic_v3.1.fp16.onnx",
sess_options=opts,
providers=[('CUDAExecutionProvider', {'device_id': 0, 'enable_cuda_graph': True}), 'CPUExecutionProvider']
)
Original Model Tree Files
Included in this repository are all symbol mappings and reference metadata from the original release:
tokens.txt: CTC 251-symbol table.config.json: Model configuration.
License
Released under the Quran-Lab No-Profit License, Version 1.1 (NPL-1.1); free to use, study, adapt and redistribute for non-profit and educational purposes.
- Downloads last month
- 32