At a glance
| HF ONNX artifact |
Xenova/whisper-small
(q8 · 249.11 MB ONNX = 249,105,759 B:
onnx/encoder_model_quantized.onnx 92,324,809 B +
onnx/decoder_model_merged_quantized.onnx 156,780,950 B;
+2,769,557 B config.json, generation_config.json,
preprocessor_config.json, tokenizer_config.json, and
tokenizer.json [2,480,466 B] = 251.88 MB [~252 MB total] · apache-2.0)
|
|---|---|
| Upstream checkpoint |
openai/whisper-small
(MIT / HF card apache-2.0 · 244M params · 12 encoder / 12 decoder layers,
d_model: 768, 12 heads, ffn_dim: 3072, 80 mel bins, 16 kHz, 51,865 BPE vocab, 99 <|lang|> tokens)
|
| Task & runtime |
automatic-speech-recognition · shared @huggingface/transformers@3.7.5 via lib/webai.js · CPU wasm
|
| Whisper-Small vs Base vs Tiny |
244M params (12+12 layers, d_model=768, 12 heads, 251.88 MB) vs
Whisper-Base 72.6M (6+6, d_model=512, 79.68 MB) vs
Whisper-Tiny 37.8M (4+4, d_model=384, 40.9 MB)
|
1 · Transcribe or translate multilingual speech
Bundled ledgered clips + deterministic 16 kHz Web Audio synths: JFK (EN, Public domain), Rimbaud / Bécquer / Collodi LibriVox (FR / ES / IT, Public domain), VoxPopuli EU Parliament (DE / NL, CC0), FLEURS (JA, CC BY 4.0), LibriSpeech (EN, CC BY 4.0), plus Ctrl/Cmd+V audio paste · English audio credits · multilingual credits.
Initialise Whisper-Small Multilingual (251.88 MB q8 WASM) above to transcribe or translate locally.
Live output & clickable timestamp chips
2 · See inside: 99-language softmax, decoder prefix & 80-bin Log-Mel
Decoder prompt prefix tokens
Every multilingual run conditions the 12-layer decoder with <|startoftranscript|>,
<|lang|>, and <|transcribe|> or <|translate|>.
99-language <|lang|> softmax
Run transcription or translation to inspect Whisper-Small's 99-language softmax.
Why Whisper-Small Multilingual matters
Scaling from Whisper-Base (72.6M params, 6+6 layers, d_model=512) to
Whisper-Small (244M params, 12+12 layers, d_model=768, 12 heads)
delivers a substantial jump in non-English WER, speech-to-English translation fluency, and
resilience under noise and reverberation while still running completely offline in a single browser tab.
- Step-0 99-language softmax detection — reads the 12-layer decoder's real
<|lang|>logit distribution at<|startoftranscript|>(id 50258) before decoding begins. - 5-input effortless audio capture — curated multilingual samples + 16 kHz Web Audio synths, file upload, capture-safe drag-drop, guarded Ctrl/Cmd+V paste, and live
createMicGuard()microphone recording. - Clickable timestamp cues & OWASP-safe exports — seek directly from timestamp chips or waveform clicks, and export OWASP formula-safe CSV, sanitized SRT/VTT, and structured JSON.
3 · Use-case ladder
Basics · Task Tokens, Resolution & Timing
Compare live transcribe vs translate, sweep timestamp resolution & chunk strides, and inspect encoder/decoder timing across 2s–11s slices.
Practical · Multi-File Podcast Transcriber
Cancellable FIFO queue with per-item Remove, multi-file upload/drop/paste/mic, live keyword filtering, inline edits, and SRT/VTT/TXT/OWASP CSV/JSON exports.
Wild · Acoustic & Code-Switching Stress
Run forced wrong-language prompt ablation plus 10 DSP degradations (SNR noise, reverberant room, clipping, bandpass, 1.25× speed, silence/tone hallucination traps).
Multi-model · Whisper-Small vs Whisper-Base
Pit 244M Whisper-Small (251.88 MB) against 72.6M Whisper-Base (79.68 MB) side-by-side for live WER/diff token comparison and capacity headroom.
4 · How the API works
import { pipeline } from "@huggingface/transformers@3.7.5";
const transcriber = await pipeline(
"automatic-speech-recognition",
"Xenova/whisper-small",
{
device: "wasm",
dtype: { encoder_model: "q8", decoder_model_merged: "q8" },
},
);
const out = await transcriber(pcm16k, {
language: "fr",
task: "translate", // "transcribe" (French) or "translate" (English)
return_timestamps: "word", // falls back to segment timestamps if cross-attn absent
chunk_length_s: 30,
stride_length_s: 5,
});