At a glance
| Upstream checkpoint |
superb/wav2vec2-base-superb-er
(apache-2.0 · 94.6M params · 7-layer CNN + 12 Transformer layers, 12 heads, hidden_size: 768, use_weighted_layer_sum: true → classifier_proj_size: 256)
|
|---|---|
| Browser ONNX artifact |
onnx-community/wav2vec2-base-superb-er-ONNX
(q4 · 89.86 MB = 89,863,840 B total: onnx/model_q4.onnx + configs · apache-2.0)
|
| Task & runtime |
audio-classification · shared @huggingface/transformers@3.7.5 via lib/webai.js · CPU wasm
|
| 4 IEMOCAP classes |
0: neu (Neutral), 1: hap (Happy), 2: ang (Angry), 3: sad (Sad) · 16 kHz mono Float32Array PCM (do_normalize: false, return_attention_mask: true)
|
| Web APIs |
WebAssembly, Module Web Workers, Web Audio / OfflineAudioContext, MediaRecorder (optional mic), Canvas 2D — all Baseline widely available
|
Distinct from sibling built Wav2Vec2 audio models:
Unlike speech-emotion-recognition
(onnx-community/wav2vec2-base-Speech_Emotion_Recognition-ONNX, 6 classes
SAD/ANGRY/DISGUST/FEAR/HAPPY/NEUTRAL — distinct from 8-class RAVDESS — using last-layer
pooling and do_normalize: true) and unlike
wav2vec2-base-superb-ks
(same SUPERB weighted-layer-sum backbone fine-tuned on 12-class Google Speech Commands keyword spotting),
wav2vec2-base-superb-er implements the canonical S3PRL
SUPERB IEMOCAP 4-class Emotion Recognition head (neu, hap,
ang, sad) with use_weighted_layer_sum: true and unnormalized
16 kHz waveforms (do_normalize: false).
Honest interpretation note: IEMOCAP consists of scripted and improvised acted dyadic
English speech. High-energy rhetorical delivery (such as public speeches) can score strongly as
ang or hap; read the full 4-class probability distribution and entropy as an
acoustic prosody signal, never as a clinical diagnosis or lie detector.
1 · 4-Class IEMOCAP Vocal Affect Meter
Reused ledgered audio (zero duplicate WAV assets): JFK inaugural address (20 Jan 1961, public domain, via
models/speech-emotion-recognition/speech-sample.wav) and LibriSpeech test-clean
61-70968-0000 (Paul-Gabriel Wiener,
CC BY 4.0 ·
credits),
plus deterministic in-memory JS PCM prosody probes, local file upload, and optional live microphone capture.
Initialise Wav2Vec2-Base SUPERB ER (89.86 MB q4 WASM) above to classify 4-class IEMOCAP vocal affect locally.
Live 4-class SUPERB IEMOCAP affect meter
Ranked probability distribution
Run classification above to inspect all 4 SUPERB IEMOCAP probabilities.
2 · See inside: 20 ms CNN frame envelope & acoustic telemetry
Wav2Vec2's 7-layer 1D CNN feature encoder ingests raw 16 kHz samples using a 25 ms receptive field
(400 samples) and a 20 ms stride (320 samples → 50 frames/s). Because do_normalize: false
is active in SUPERB ER's feature extractor, raw amplitude, crest factor, and voicing cadence feed directly
into the 12 Transformer blocks before S3PRL's learned weighted layer sum mean-pools over time.
Why Wav2Vec2-Base SUPERB ER matters
Voice prosody conveys urgency, enthusiasm, and frustration that plain text transcripts erase. Running the standard 4-class SUPERB IEMOCAP benchmark checkpoint in 89.86 MB q4 WASM keeps sensitive call audio, voice notes, and coaching takes strictly on-device with zero cloud egress.
- Privacy-preserving call QA — triage heated or distressed customer calls in-browser without uploading voice recordings to third-party servers.
- Turn-by-turn prosody timelines — slide 2-second windows over long speech clips to pinpoint where tone escalates or settles.
- Voice-note journaling & research — pair vocal affect directly with local Whisper transcripts in a single 130.7 MB offline workflow.
3 · Use-case ladder
Basics · Sliding-Window Emotion Timeline
Compare full-clip mean pooling against 2.0 s overlapping windows across speech turns and click any window to audition the shift.
Practical · Call & Dialogue-Take Batch Grader
Grade multi-clip queues with Pause, Resume, and Cancel controls, live alert gates, and OWASP formula-safe CSV / JSON export.
Wild · Acoustic Stress Diagnostic
Inject +12/+20 dB gain clipping, 3 kHz telephone bandpass, 0.82×/1.20× pitch/tempo shifts, babble noise, and silence traps.
Multi-model · 130.7 MB Affect + Whisper Pipeline
Chain SUPERB ER (89.86 MB q4) with built Whisper-Tiny EN (40.85 MB q8) for side-by-side vocal affect and punctuated English transcripts.
4 · How the API works
import { pipeline } from "@huggingface/transformers@3.7.5";
const classifier = await pipeline(
"audio-classification",
"onnx-community/wav2vec2-base-superb-er-ONNX",
{ device: "wasm", dtype: "q4" },
);
const scores = await classifier(pcm16k, { top_k: 4 });
// → [{ label: "ang", score: 0.859 }, { label: "hap", score: 0.070 }, ...]