CoolFace
Modelpublic

soniqo/Whisper-Small-ONNX

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
0likes10downloads
Model Card

Whisper Small - ONNX

Official OpenAI Whisper small checkpoint exported as ONNX encoder/decoder graphs for speech-core and sherpa-onnx-compatible runtimes.

Part of the soniqo.audio speech toolkit. This is the ONNX Runtime bundle used by speech-core for server, desktop, and Android-style runtimes; the graphs remain sherpa-onnx compatible. Browse ONNX bundles in the soniqo ONNX collection.

Model

Sourceopenai/whisper-small
Export formatONNX for sherpa-onnx
VariantsFP32, INT8, FP16
Runtimespeech-core OnnxWhisperStt / ONNX Runtime; sherpa-onnx compatible
Total artifact size1744.05 MiB

The FP16 graphs use external *.onnx.data files. Large-style bundles also use external FP32 *.weights files. Keep external-data files beside their matching .onnx files.

Files

FileSizeDescription
small-decoder.fp16.onnx1.0 MBWhisper decoder graph
small-decoder.fp16.onnx.data265.91 MBExternal tensor data for the adjacent ONNX graph
small-decoder.int8.onnx250.05 MBWhisper decoder graph
small-decoder.onnx533.19 MBWhisper decoder graph
small-encoder.fp16.onnx0.22 MBWhisper encoder graph
small-encoder.fp16.onnx.data195.16 MBExternal tensor data for the adjacent ONNX graph
small-encoder.int8.onnx107.21 MBWhisper encoder graph
small-encoder.onnx390.52 MBWhisper encoder graph
small-tokens.txt0.78 MBTokenizer tokens for speech-core and sherpa-onnx-compatible runtimes

Usage

Use with speech-core's native ONNX Whisper runtime:

cpp
#include <speech_core/models/onnx_whisper_stt.h>

speech_core::OnnxWhisperStt stt(
    "small-encoder.int8.onnx",
    "small-decoder.int8.onnx",
    "small-tokens.txt");

auto result = stt.transcribe(audio, length, 16000);

The same encoder/decoder/token files can also be loaded by sherpa-onnx:

python
import sherpa_onnx

recognizer = sherpa_onnx.OfflineRecognizer.from_whisper(
    encoder="small-encoder.fp16.onnx",
    decoder="small-decoder.fp16.onnx",
    tokens="small-tokens.txt",
    language="en",
    task="transcribe",
    provider="cpu",
)

Benchmarks

This repository ships the exported model artifacts. Full published WER/RTF is currently available for the turbo bundle; run the benchmark command above for local numbers on this variant.

Links