ONNX export of C1Tech/whisper_base_persian (Whisper Base, 74M parameters, fine-tuned for Persian) for use with Transformers.js in the browser (on the GGML/whisper.cpp side, see armantee/whisper-base-persian-ggml).
Files:
onnx/encoder_model.onnx / onnx/encoder_model_quantized.onnx (fp32 / int8)onnx/decoder_model_merged.onnx / onnx/decoder_model_merged_quantized.onnx (fp32 / int8)Usage:
import { pipeline } from "@huggingface/transformers";
const transcriber = await pipeline(
"automatic-speech-recognition",
"armantee/whisper-base-persian-onnx",
{ device: "wasm", dtype: "q8" },
);
const output = await transcriber(audio, { language: "persian", task: "transcribe" });
Conversion (no retraining): optimum-cli export onnx (with-past), dynamic int8
quantization, then decoder merge. The fp32 export reproduced the GGML model's
transcript exactly on an evaluation clip. Licensed Apache-2.0, following the
source model.
onnx/decoder_model_merged.onnx 315 MBonnx/encoder_model.onnx 82 MBonnx/decoder_model_merged_quantized.onnx 79 MBonnx/encoder_model_quantized.onnx 26 MBC1Tech/whisper_base_persian