At a glance
| Source model |
arbazsiddiqui/voxlock
(Apache-2.0 · 27M params · causal 6-layer Band-Split RNN TSE_BSRNN_SPK fine-tuned from REAL-TSE with WeSpeaker ECAPA_TDNN_GLOB_c512 speaker encoder)
|
|---|---|
| Browser ONNX weights |
onnx/v2/enroll_fp16.onnx (10.89 MB = 10,893,975 B) +
onnx/v2/chunk_fp16.onnx (38.95 MB = 38,947,947 B) =
49.84 MB decimal (fp16 matches fp32 to >70 dB; 4.95% Krisp WER, 0.11 leaked background words/min)
|
| Task & runtime |
Catalogue task: audio-classification (upstream HF audio-to-audio target-speaker extraction) ·
CPU wasm via isolated onnxruntime-web@1.21.0 in a dedicated module Web Worker
|
| I/O contract |
16 kHz mono Float32Array PCM · Enrollment input [1, 48000] (3.0 s voiced span selected from 5.0 s capture) → { enroll_n, k, v } · Causal chunk input (512-pt window, 128-sample / 8 ms hop, persistent LSTM h/c [6, 32, 256]) + -0.5 polarity/gain calibration
|
| Web APIs |
WebAssembly, Module Web Workers, Cache Storage, Web Audio / AudioContext, MediaRecorder (optional mic enrollment), Canvas 2D — Baseline widely available
|
Why target-speaker isolation differs from generic denoisers:
Single-channel denoisers like GTCRN suppress
stationary noise (fans, hum, hiss) but keep every human voice in the room.
VoxLock v2 conditions its 32-band causal separator on a specific speaker's
ECAPA-TDNN voiceprint (enroll_n, k, v), silencing
interfering human bystanders while keeping the enrolled caller intact.
1 · 5-Second Enrollment & Target-Speaker Isolation
Reused ledgered repo audio only (zero duplicate audio files): Speaker A = JFK inaugural address
(20 Jan 1961, public domain, via models/whisper-speech-to-text/jfk.wav) and Speaker B =
LibriSpeech test-clean 61-70968-0000 (Paul-Gabriel Wiener,
CC BY 4.0 ·
credits),
mixed deterministically in-memory with calibrated crosstalk & ambience — or upload/record your own audio below.
Initialise VoxLock v2 (49.84 MB fp16 CPU WASM) above to enroll a target speaker and isolate crosstalk locally.
1 · Enrollment Sample (5s → loudest 3.0 s)
Loading speaker sample…
2 · Before · Room Mix (Caller + Bystander)
Preparing mixture…
3 · After · VoxLock Isolated Caller
Run VoxLock isolation to audition isolated output.
2 · See inside: Speaker Embedding Tensors & 50 ms Frame Energy
onnx/v2/enroll_fp16.onnx projects the loudest 3.0 s voiced window (48,000 samples) into three
voiceprint conditioning tensors: normalized spectral TF-map enroll_n [257, 376] plus ECAPA
cross-attention keys k [32, 2, 64, 298] and values v [32, 2, 298, 64]. Each
causal 100-frame chunk of chunk_fp16.onnx carries 6-layer Band-Split LSTM states
h/c [6, 32, 256] across time, attenuating frames where only the bystander speaks.
Why VoxLock v2 matters
Voice agents, live captions, and call transcribers break down whenever a colleague, television, or café
neighbor talks near the microphone. Running arbazsiddiqui/voxlock locally in 49.84 MB CPU
WebAssembly removes interfering speakers before ASR or turn-taking hears them — with zero audio
leaving the device and Apache-2.0 freedom.
- Clean speech-to-text front-end — drop background words leaked into local ASR (Moonshine Tiny / Whisper) without cloud APIs.
- 3-second speaker locking — capture 5 seconds of a caller, lock onto the loudest 3.0 s voiced span, and isolate continuously across 8 ms causal hops.
- Private meeting & voice-note isolation — batch-clean recorded clips offline and export uncompressed 16 kHz mono
.WAVfiles.
3 · Use-case ladder
Basics · Enrollment Window & Voiceprint Similarity
Compare 1.0 s, 3.0 s, and 5.0 s enrollment windows and measure live ONNX ECAPA cosine similarity across same-speaker vs different-speaker clips.
Practical · Multi-Clip Meeting Isolation Queue
Process a multi-clip meeting queue with Pause, Resume, and Cancel mid-batch, per-clip isolated .WAV downloads, and OWASP CSV/JSON export.
Wild · Cocktail-Party Bystander & SNR Stress Matrix
Stress-test +12 dB, +6 dB, 0 dB, -3 dB, HVAC hum, and bystander-only mixes to quantify real SI-SNR improvement and silence-gate stability.
Multi-model · 78.0 MB VoxLock → Moonshine Tiny ASR
Chain VoxLock v2 (49.84 MB fp16) into built Moonshine Tiny (28.18 MB q8) and compare Before vs After transcripts & WER live on-device.
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 enrollSess = await ort.InferenceSession.create(enrollFp16Bytes, { executionProviders: ["wasm"] });
const chunkSess = await ort.InferenceSession.create(chunkFp16Bytes, { executionProviders: ["wasm"] });
// 1. Extract voiceprint conditioning tensors from 3.0 s (48,000 samples @ 16 kHz)
const { enroll_n, k, v } = await enrollSess.run({
enroll: new ort.Tensor("float32", enroll3sPcm, [1, 48000]),
});
// 2. Stream causal 100-frame chunks with persistent LSTM states h, c [6, 32, 256]
const res = await chunkSess.run({ wav: chunkTensor, enroll_n, k, v, h, c });
// Overlap-add res.frames with Hann² window and multiply by -0.5 for exact polarity & level.