Downloads · 30 days
1.5K
41% of all-time downloads
Sharjeelbaig/whisper-tiny-ar-quran-onnx
whisper-tiny-ar-quran-onnx is a automatic speech recognition model from Sharjeelbaig. Use it when you need speech turned into text. It is set up for transformers.js. The card lists the license as apache-2.0.
Transformers.js-compatible ONNX conversion of tarteel-ai/whisper-tiny-ar-quran. The decoder exports cross-attention tensors and the generation config contains Whisper alignment heads, enabling word-level timestamps in…
Downloads · 30 days
1.5K
41% of all-time downloads
All-time downloads
3.5K
Public
Repo size
192 MB
Likes
0
Public
Click a slice to open those files.
.onnx192 MB · 97%
From the Hugging Face model README
Transformers.js-compatible ONNX conversion of
tarteel-ai/whisper-tiny-ar-quran.
The decoder exports cross-attention tensors and the generation config contains
Whisper alignment heads, enabling word-level timestamps in Transformers.js.
import { pipeline } from "@huggingface/transformers";
const transcriber = await pipeline(
"automatic-speech-recognition",
"Sharjeelbaig/whisper-tiny-ar-quran-onnx",
{ dtype: "q8" },
);
const result = await transcriber(audioFloat32Array, {
language: "ar",
task: "transcribe",
return_timestamps: "word",
});
The repository contains fp32 and dynamically quantized q8 encoder/merged decoder graphs. q8 is recommended for local CPU inference.
The q8 artifact was loaded with @huggingface/transformers 4.2.0 in Node.js.
It returned the correct text and four timestamped words for Qur'an 1:1. A
second-reciter test on Husary's complete Sūrah 112 found all four verses and
aligned all 15 canonical words from 16 recognized tokens. The artifact was also
exercised end to end by transcribe-quran, including offline cached inference,
canonical matching, ASS generation, and FFmpeg/libass video rendering.
SHA-256:
| File | SHA-256 |
|---|---|
encoder_model.onnx | f0c604c7ea767c1eab1d26df50dbc3afa861cc28a1a68bd965e6b9e897c5b5c8 |
decoder_model_merged.onnx | 52ed5be1e5db4f213578d0ba6fc5f207bda119e130954855240b44ec5563272b |
encoder_model_quantized.onnx | 965e0ca31daf589ffb572e8b6deb1a4e65ad72221c1873c952331ff1c52f50c1 |
decoder_model_merged_quantized.onnx | 06a5c4409988b9ae7747bd55cf81e3851e3f2238536c86467963e0241464f652 |
convert-model.py is the reproducible development-only exporter. It enables
eager attention and explicitly exposes encoder, decoder, and cross-attention
outputs before Optimum merges the cached and non-cached decoder graphs.
uv run --python 3.12 \
--with torch --with accelerate --with 'optimum-onnx[onnxruntime]' \
python convert-model.py --output export
uvx --python 3.12 --with torch --with accelerate \
--from 'optimum-onnx[onnxruntime]' optimum-cli onnxruntime quantize \
--onnx_model export --arm64 --per_channel -o quantized
The published onnx/*_quantized.onnx files are the encoder and merged decoder
from that quantized output, using Transformers.js's _quantized q8 filename
convention. The full generation metadata comes from the matching multilingual
Whisper Tiny generation config.
The source checkpoint is Apache-2.0. See its model card for reported training and evaluation details and limitations.