At a glance
| 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.
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: –
([tone neutral=0.00])
Window-level prosody contour (click to seek playback)
4-Class Calibrated Tone Distribution
Run analysis above to inspect calibrated positive, neutral, sad, and frustrated scores.
5 Auxiliary Prosody & Subtext Heads
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)
| 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
| 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.
- Expressive voice agents — inject compact RCS prosody headers right beside transcripts so LLMs respond with the right empathy and pacing.
- Local QA & coaching — audit customer calls or presentation rehearsals for vocal tension, deadpan delivery, or rushed speech rate on-device.
- Composable audio pipelines — pair with 2.2 MB Silero VAD and 28.2 MB Moonshine Tiny ASR to compare what was said against how it sounded locally.
3 · Use-case ladder
Basics · Intensity & Chunk-Duration Sweep
Compare expressive rhetoric vs calm neutral speech across 2 s / 4 s / 6 s / 8 s slices and read_secs buckets with raw top-1 vs top-2 margin calibration.
Practical · Call-Tone & Customer Audit Queue
Run a Pause / Resume / Cancel multi-clip voice-tone audit queue with escalation/sarcasm thresholds and OWASP formula-safe CSV / JSON exports.
Wild · 5-Condition Acoustic Stress Matrix
Measure tone flip rate and confidence/arousal drift across +6 dB café noise, pitch shift, 0.8×/1.25× time-stretch, phone bandpass, and -18 dB gain attenuation.
Multi-model · 83.8 MB VAD → Voice Reader → Moonshine
Chain Stage 1 Silero VAD (2.2 MB) → Stage 2 Voice Reader (53.4 MB) + Stage 3 Moonshine Tiny ASR (28.2 MB) to compare what was said vs how it was delivered.
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