yazinsai/tilawa
Offline Quran verse recognition — identify surah and ayah from audio. (Formerly offline-tarteel; renamed to Tilawa.)
What it solves
Tilawa provides a way to recognize Quranic recitation in real-time, entirely on-device. It eliminates the need for a network connection during inference, allowing developers to integrate audio recognition that can map audio input to specific surahs and ayahs (verses) of the Quran.
How it works
The project uses ONNX Runtime to run machine learning models locally on the web, mobile (React Native), or Node.js. It offers two primary engines:
- Zipformer: The default streaming engine that uses a tajweed-phoneme vocabulary to provide continuous recognition.
- FastConformer: An alternative engine used for one-shot transcription or raw Arabic text output.
Both engines process 16 kHz mono audio and emit events such as verse_match (when a verse is confidently identified) and word_progress (for word-level alignment).
Who it’s for
Developers building Quranic apps that require offline, low-latency audio recognition, verse tracking, and recitation correction tools.
Highlights
- Fully On-Device: No network required at inference time.
- Zero Native Dependencies: The core library is pure TypeScript, requiring only the ONNX runtime for the target platform.
- Real-time Streaming: Supports streaming audio input via a
feed()method. - Recitation Correction: Includes a "correction mode" that can flag skipped ayahs or substituted words based on structural rules.
- Cross-Platform: Compatible with browsers, Node.js, and React Native.
Related
- Project
- Project
- Project
- Project