At a glance
| HF ONNX artifact |
Xenova/whisper-base
(q8 · 76.91 MB ONNX = 76,908,389 B: encoder_model_quantized.onnx 23.20 MB + decoder_model_merged_quantized.onnx 53.71 MB; +2.77 MB config/tokenizer = 79.68 MB total · apache-2.0)
|
|---|---|
| Upstream checkpoint |
openai/whisper-base
(apache-2.0 · 72.6M params · 6 encoder / 6 decoder layers, d_model: 512, 8 heads, 51,865 multilingual BPE tokens, 99 <|lang|> tokens)
|
| Task & runtime |
automatic-speech-recognition · shared @huggingface/transformers@3.7.5 via lib/webai.js · CPU wasm
|
| Whisper-Base vs Tiny capacity |
72.6M params (6+6 layers, d_model=512, 8 heads, 76.91 MB) vs Whisper-Tiny 37.8M (4+4 layers, d_model=384, 6 heads, 40.85 MB) — step-0 99-language softmax + transcribe / translate
|
1 · Transcribe or translate multilingual speech
Bundled ledgered clips: 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) · English audio credits · multilingual credits.
Initialise Whisper-Base Multilingual (76.91 MB q8 WASM) above to transcribe or translate locally.
Live output & clickable timestamp chunks
2 · See inside: 99-language softmax, decoder prefix & 80-bin Log-Mel
Decoder prompt prefix tokens
Every multilingual run conditions the 6-layer decoder with <|startoftranscript|>,
<|lang|>, and <|transcribe|> or <|translate|>.
99-language <|lang|> softmax
Run transcription or translation to inspect Whisper-Base's 99-language softmax.
Why Whisper-Base Multilingual matters
Scaling from Whisper-Tiny (37.8M params, 4+4 layers, d_model=384) to
Whisper-Base (72.6M params, 6+6 layers, d_model=512, 8 heads)
keeps the model comfortably under 80 MB in quantized WebAssembly while materially improving
non-English recognition, accented speech robustness, and direct speech-to-English translation.
- Step-0 99-language softmax detection — reads the 6-layer decoder's real
<|lang|>logit distribution at<|startoftranscript|>(id 50258) before decoding begins. - Direct speech-to-English translation — toggle
task: "translate"to emit English transcripts and captions from French, Spanish, German, Italian, Dutch, or Japanese speech. - Clickable timestamp cues & open exports — seek directly from timestamp chips or waveform clicks, and export clean TXT, SRT, VTT, and structured JSON.
3 · Use-case ladder
Basics · d_model=512, 30s Mel & Chunk Stride
Compare live transcribe vs translate, benchmark 2s–11s 30s-padded encoder latency, and run a chunk-stride sensitivity sweep.
Practical · Multilingual Subtitle Batcher
Queue French, German, Spanish, and English clips (or multi-file uploads), edit transcripts inline, and export sanitized SRT/VTT/MD/CSV/JSON.
Wild · Prompt Ablation & 9-Condition Stress Lab
Force wrong <|lang|> prompts (en/fr/es/de/ja) and run 9 DSP degradations (noise, bandpass, clipping, quiet, time-stretch, silence & tone traps).
Multi-model · 164.2 MB Voice → Topic / Action Router
Chain Whisper-Base Multilingual (76.91 MB, translating or transcribing) with DeBERTa-v3 NLI (87.3 MB) to classify spoken topics and action items.
4 · How the API works
import { pipeline } from "@huggingface/transformers@3.7.5";
const transcriber = await pipeline(
"automatic-speech-recognition",
"Xenova/whisper-base",
{ device: "wasm", dtype: "q8" },
);
const out = await transcriber(pcm16k, {
language: "fr",
task: "translate", // "transcribe" (French) or "translate" (English)
return_timestamps: true,
chunk_length_s: 30,
stride_length_s: 5,
});