At a glance
| HF ONNX artifact |
Xenova/whisper-tiny.en
(q8 · 40.85 MB = 40,852,295 B: encoder_model_quantized.onnx 10.12 MB + decoder_model_merged_quantized.onnx 30.73 MB · apache-2.0)
|
|---|---|
| Upstream checkpoint |
openai/whisper-tiny.en
(apache-2.0 · 37.8M params · 4 encoder / 4 decoder layers, d_model: 384, 6 heads, 51,864 English BPE tokens)
|
| Task & runtime |
automatic-speech-recognition · shared @huggingface/transformers@3.7.5 via lib/webai.js · CPU wasm
|
| Input & features |
16 kHz mono Float32Array PCM (direct WAV + browser AudioContext decode + live mic) → 80-bin Log-Mel spectrogram padded to 30.0 s (3,000 frames)
|
1 · Transcribe audio or live microphone
Bundled audio: JFK inaugural excerpt (20 Jan 1961, public domain U.S. government work) and LibriSpeech
test-clean 61-70968-0000 (Paul-Gabriel Wiener; Panayotov et al., OpenSLR SLR12,
CC BY 4.0) ·
audio credits.
Initialise Whisper-Tiny EN (40.85 MB q8 WASM) above to transcribe locally.
Live transcript & clickable timestamp chunks
2 · See inside: 80-bin Log-Mel spectrogram & 30s encoder window
Whisper's feature extractor resamples input to 16 kHz, computes an 80-bin Log-Mel spectrogram (25 ms Hann window, 10 ms hop = 100 frames/s), and zero-pads every chunk to 30.0 seconds (3,000 frames) before the 4-layer encoder runs.
Why Whisper-Tiny EN matters
English-only Whisper-Tiny dedicates its entire 51,864-token vocabulary and 37.8M parameters to English
acoustics and orthography, avoiding language-detection overhead while fitting cleanly into a 40.85 MB
q8 WebAssembly download cached locally in the browser.
- Zero-server voice dictation — mic capture, decoding, and timestamps run completely on-device.
- Native SRT / VTT captioning — timestamp tokens align sentences directly to timeline cues.
- Predictable memory footprint — fixed 30s encoder buffer keeps WASM heap usage bounded.
3 · Use-case ladder
Basics · 30s Log-Mel Window & Slice Lab
Inspect the 80-bin Log-Mel spectrogram and benchmark 2s, 5s, 8s, and 11s slices to see Whisper's constant 30s-padded encoder latency.
Practical · Multi-Clip Batch Subtitler
Queue multiple audio files sequentially with mid-batch cancel, inline transcript editing, and sanitized SRT, VTT, Markdown, JSON, and formula-safe CSV export.
Wild · Acoustic Stress & Hallucination Lab
Inject +10 dB/0 dB noise, 300–3400 Hz telephone bandpass, 0.85×/1.25× speed, -18 dB gain, or pure silence/tone traps and measure live WER.
Multi-model · 128.1 MB Voice → Ticket Router
Chain Whisper-Tiny EN (40.85 MB) with DeBERTa-v3 Zero-Shot NLI (87.3 MB) in two isolated workers to route spoken issues into custom departments.
4 · How the API works
import { pipeline } from "@huggingface/transformers@3.7.5";
const transcriber = await pipeline(
"automatic-speech-recognition",
"Xenova/whisper-tiny.en",
{ device: "wasm", dtype: "q8" },
);
const out = await transcriber(pcm16k, {
return_timestamps: true,
chunk_length_s: 30,
stride_length_s: 5,
});