Downloads · 30 days
10
17% of all-time downloads
Sharjeelbaig/whisper-base-onnx
whisper-base-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 openai/whisper-base. The encoder and decoder export attention tensors, and the original Whisper alignment heads are preserved for word-level timestamps.
Downloads · 30 days
10
17% of all-time downloads
All-time downloads
59
Public
Repo size
367 MB
Likes
0
Public
Click a slice to open those files.
.onnx367 MB · 98%
From the Hugging Face model README
Transformers.js-compatible ONNX conversion of
openai/whisper-base. The
encoder and decoder export attention tensors, and the original Whisper
alignment heads are preserved for word-level timestamps.
import { pipeline } from "@huggingface/transformers";
const transcriber = await pipeline(
"automatic-speech-recognition",
"Sharjeelbaig/whisper-base-onnx",
{ dtype: "q8" },
);
const result = await transcriber(audioFloat32Array, {
language: "ar",
task: "transcribe",
return_timestamps: "word",
});
The repository contains fp32 and ARM64 dynamically quantized q8 encoder and
merged decoder graphs. q8 is recommended for local CPU inference; use
dtype: "fp32" when the unquantized graphs are preferred.
The model files are under onnx/, following the Transformers.js layout:
encoder_model.onnx and decoder_model_merged.onnx — fp32 graphsencoder_model_quantized.onnx and decoder_model_merged_quantized.onnx — q8 graphsconvert-model.py is the reproducible development-only exporter. It enables
eager attention and explicitly exposes encoder, decoder, and cross-attention
outputs before the cached and non-cached decoder graphs are merged.
python convert-model.py --model openai/whisper-base --output export
optimum-cli onnxruntime quantize \
--onnx_model export --arm64 --per_channel -o quantized
The source checkpoint is Apache-2.0 licensed. See the upstream model card for training details, evaluation results, and limitations.