At a glance
| HF ONNX artifact |
Xenova/whisper-tiny
(q8 · 40.85 MB = 40,852,675 B: encoder_model_quantized.onnx 10.12 MB + decoder_model_merged_quantized.onnx 30.73 MB · apache-2.0)
|
|---|---|
| Upstream checkpoint |
openai/whisper-tiny
(apache-2.0 · 37.8M params · 4 encoder / 4 decoder layers, d_model: 384, 6 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
|
Unique capabilities vs whisper-tiny.en |
99-language <|lang|> detection softmax + task switching (task: "transcribe" in original language vs task: "translate" straight to English)
|
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, CC0), FLEURS (JA, CC BY 4.0), LibriSpeech (EN, CC BY 4.0) · English audio credits · multilingual credits.
Initialise Whisper-Tiny Multilingual (40.85 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 decoder with <|startoftranscript|>,
<|lang|>, and <|transcribe|> or <|translate|>.
99-language <|lang|> softmax
Run transcription or translation to inspect Whisper's 99-language softmax.
Why Whisper-Tiny Multilingual matters
In the same 40.85 MB q8 WebAssembly budget as whisper-tiny.en, multilingual
Whisper-Tiny trades English-only specialization for a 99-language spoken-language detector and
joint speech-translation decoder — letting browsers auto-detect incoming audio and transcribe or
translate directly to English without server round-trips.
- Single-pass 99-language detection — reads the decoder's real
<|lang|>logit softmax on step 0 before decoding. - Zero-server speech-to-English translation — switch
task: "translate"to emit English subtitles from French, Spanish, German, Italian, or Japanese audio. - Native SRT / VTT timestamps — segment cues stay aligned to audio playback even across translations.
3 · Use-case ladder
Basics · Multilingual Token Space & 30s Mel
Compare live transcribe vs translate with real <|lang|> prefix tokens and benchmark 2s–11s constant 30s Log-Mel latency.
Practical · Multilingual Localization Batcher
Queue French, Spanish, German, and English clips for sequential transcription or English subtitle localization with inline editing and SRT/VTT/MD/CSV/JSON export.
Wild · Acoustic Stress & Wrong-Language Ablation
Test 9-condition DSP degradation + silence traps AND force wrong <|lang|> prefix tokens (e.g. fr/es/ja on English) to inspect decoder conditioning.
Multi-model · 128.1 MB Voice → English Triage Router
Chain Whisper-Tiny Multilingual (40.85 MB, translating or transcribing) with DeBERTa-v3 NLI (87.3 MB) to triage multilingual voice tickets into English queues.
4 · How the API works
import { pipeline } from "@huggingface/transformers@3.7.5";
const transcriber = await pipeline(
"automatic-speech-recognition",
"Xenova/whisper-tiny",
{ 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,
});