audio-classification · Whisper-Tiny prosody encoder (rc6-tiny) · 7 calibrated heads · WASM fp32 · 53.38 MB · BSD-2-Clause

Pipecat Voice Reader: Vocal Tone, Sarcasm & Prosody Classifier

pipecat-ai/voice-reader (53.38 MB fp32 ONNX, BSD-2-Clause) listens to how a speaker sounds — not just the words — scoring 4-class vocal tone (positive, neutral, sad, frustrated), sarcasm, arousal, laughter, sad, upset, and speech rate (syllables/s) entirely on CPU WebAssembly with zero server uploads.

At a glance

Pipecat Voice Reader model specifications and browser runtime contract
Hugging Face model pipecat-ai/voice-reader (release rc6-tiny · revision 268fea4e · initialized from laion/whisper-tiny-base-emotion-voice-burst)
Task & runtime audio-classification · onnxruntime-web via isolated onnxruntime-web@1.21.0 worker · CPU wasm
Browser artifact & dtype voice-reader-tiny/model.onnx (fp32 · 53.38 MB = 53,375,285 B · catalogue 53.4 MB) · License: BSD-2-Clause (bsd-2-clause)
I/O contract Input: input_features [1, 80, 400|600|800] float32 (Whisper 8 s Slaney log-mel @ 16 kHz, clip demeaned before trailing zero-pad; read_secs buckets 4 / 6 / 8 s) · 7 calibrated outputs: tone [1, 4] softmax (positive, neutral, sad, frustrated), sarcasm (shipped threshold 0.0679), laughter, sad, upset, arousal, and speech_rate (syllables/s)
Web APIs WebAssembly, Module Web Workers, Cache Storage, Web Audio API, MediaRecorder (optional mic), Canvas 2D — all Baseline widely available

Why voice-reader-tiny/model.onnx (53.38 MB fp32) instead of model.int8.onnx (14.15 MB): Stage 0 live Chrome verification proved that both voice-reader-tiny/model.int8.onnx and voice-reader-base/model.int8.onnx emit a ConvInteger(10) node (/exported/model/conv1/Conv_quant) that onnxruntime-web 1.21.0 WASM EP rejects with ERROR_CODE: 9. The verified fp32 export runs cleanly on CPU WASM in ~70–155 ms per 4–8 s window with 0 NaN and parity diff ≤ 1.32e-7 vs int8 per MANIFEST.json.

Experimental rc6 caveat (from HF model card): Outputs leave the ONNX graph already calibrated (temperature 0.8544, tone biases, Platt scaling on sarcasm/laughter). Treat scores as structured prosody cues for an LLM or human reviewer, never standalone verdicts.

1 · Live Vocal Prosody & Expressiveness Classifier

Reuses existing ledgered repository audio only (zero new binary audio files committed): JFK inaugural address (20 Jan 1961, public domain, ../whisper-speech-to-text/jfk.wav), LibriSpeech test-clean 61-70968-0000 (Paul-Gabriel Wiener, CC BY 4.0), and Jimmy Wales spoken English sample (CC0, ../korean-xlsr-asr/sample-en.wav), plus deterministic in-memory PCM probes, local .wav/audio upload, and user-initiated mic capture.

Initialise Pipecat Voice Reader (53.38 MB fp32 WASM) above to classify vocal tone, sarcasm, arousal, and speech rate locally.

Loading sample…

Dominant vocal tone

Awaiting inference

Initialise the model to score expressiveness, arousal, sarcasm, and cadence.

Expressiveness summary

Arousal – · Speech rate – · Margin –

Sarcasm cue: – · Valence proxy: –

RCS perception header: ([tone neutral=0.00])

Window-level prosody contour (click to seek playback)

Arousal (energy) Tone: Frustrated Tone: Positive Tone: Neutral Tone: Sad

4-Class Calibrated Tone Distribution

Run analysis above to inspect calibrated positive, neutral, sad, and frustrated scores.

5 Auxiliary Prosody & Subtext Heads

Dominant tone–
Mean arousal–
Speech rate–
Peak sarcasm–
Compute · Windows–
NaN audit–

2 · See inside: Raw logits, calibration constants & window tensor audit

Each window runs an exact 400-point Cooley-Tukey real-FFT and 80-bin Slaney mel filterbank ([1, 80, 400|600|800]) off the main thread before invoking voice-reader-tiny/model.onnx. Below are the calibrated probabilities, derived log-odds logits (ln(p / (1 - p))), zero-centered pre-temperature tone logits (inverting T = 0.8544 and in-graph tone biases sad: +0.5, frustrated: +0.5), and raw tensor finite checks.

Per-head calibrated scores & derived logits (0 NaN check)

Per-head calibrated probabilities, derived log-odds logits, and raw tensor bounds
Output head Kind Mean / Peak value Derived log-odds (logit) Pre-temp tone logit / Note
Run inference above to inspect raw head outputs and logits.

Raw tensor audit: awaiting live ONNX run…

Window-by-window prosody trace

Sliding-window prosody scores across time buckets
Window Bucket Dominant tone Margin Arousal Sarcasm Rate (syl/s) Feat / Infer ms
Window trace populates after inference.

Why Pipecat Voice Reader matters

Text transcripts strip away the acoustic delivery that decides whether "Oh, great." is genuine enthusiasm or icy frustration. Running pipecat-ai/voice-reader directly on CPU WebAssembly lets browser apps attach calibrated vocal prosody, arousal, sarcasm likelihood, and speech rate to every turn without sending raw user audio to a remote inference cluster.

3 · Use-case ladder

4 · How the ONNX Runtime Web API works

import * as ort from "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.21.0/dist/ort.wasm.min.mjs";

const session = await ort.InferenceSession.create(modelBytes, {
  executionProviders: ["wasm"],
});

// Whisper 8s Slaney log-mel features [1, 80, 400|600|800] (clip demeaned before zero-pad)
const input = new ort.Tensor("float32", logMel.data, logMel.dims);
const out = await session.run({ input_features: input });
// Calibrated outputs: tone [1,4], sarcasm, laughter, sad, upset, arousal, speech_rate
Show the code · worker.js — fetchModelBytes() (Cache Storage & clean per-file download events)
Show the code · worker.js — analyzeWindows() (Whisper log-mel + ORT Web fp32 + 0 NaN audit)
Show the code · vr-core.mjs — computeVoiceReaderLogMel() (exact 8 s Slaney mel extractor)

References