Inworld Voice Isolator (realtime) ONNX
ONNX builds of Inworld Voice Isolator (realtime), made by Moonbox for on-device use with ONNX Runtime (CPU, CUDA, DirectML). Each precision is one folder; what the graphs take and return, and the signal processing that goes around them, is under How to run.
Files
The last column is the benchmark on the VoiceBank-DEMAND test set (824 noisy utterances; details under How to run): each precision's speech-quality scores, and how far its output is from the original PyTorch model's.
| Precision | File | Size | sha256 | Benchmark |
|---|---|---|---|---|
| fp16 | fp16/model.onnx |
117.3 MB | 40e39ef5c9a7 |
fp16 weights, fp32 math, streamed in blocks of 16 frames: PESQ 2.932, STOI 0.9372, SI-SDR 19.54 dB (original 2.932 / 0.9373 / 19.54); output 84.1 dB from the original's (worst file 60.3), no file below it by more than 0.004 dB (CUDA, RTF 0.76) |
| fp16 | fp16/pipeline.py |
14.9 kB | 42cafebab42f |
fp16 weights, fp32 math, streamed in blocks of 16 frames: PESQ 2.932, STOI 0.9372, SI-SDR 19.54 dB (original 2.932 / 0.9373 / 19.54); output 84.1 dB from the original's (worst file 60.3), no file below it by more than 0.004 dB (CUDA, RTF 0.76) |
How to run
Inworld Voice Isolator v1, the realtime model (58M parameters: a causal band-split dual-path network with
transformers and Mamba along time and across bands; keeps the voice and removes noise, music and reverb from 48 kHz
mono audio as it arrives), as one ONNX graph of a streaming step and pipeline.py, a numpy runtime that does the
rest of the original's streaming:
model.onnx: one step of the network over a block of new STFT frames (n_fft 2048, hop 480, periodic Hann), with its state as inputs and outputs:spec[1, 1025, F, 2] (real and imaginary parts of F new frames),lookahead_index(0, 1, 2 for the trained look-aheads of 0, 2, 4 frames),past_len(frames this lane has seen), the time-attention cache of each of the 4 attention blocks (past_key.i/past_value.i[46, 8, 800, 64]: 800 frame slots, a lane's whole life) and the time Mamba's convolution tail and scan state of each of the 3 Mamba blocks (conv_state.j[46, 1024, 3],ssm_state.j[46, 1024, 16]) ->raw[1, 1025, F, 4], the decoder output per bin, and the updated state.pipeline.py: the rest of inworld-voice-isolation'sstreaming.Streamin numpy: frame analysis, the look-ahead (2 frames, 20 ms, by default), the 6 s attention windows with a second lane started 2 s before each boundary and the two outputs crossfaded, the correction applied to the spectrum, and the overlap-add. Needs numpy and onnxruntime (or onnxruntime-gpu); soundfile to read files.
import sys; sys.path.insert(0, "fp16")
import soundfile as sf
from pipeline import VoiceIsolator
iso = VoiceIsolator("fp16", providers=["CUDAExecutionProvider", "CPUExecutionProvider"])
audio, sr = sf.read("noisy.wav", dtype="float32") # mono, 48 kHz (resample other rates first)
sf.write("voice.wav", iso.isolate(audio), 48000) # a whole file, streamed through the model
stream = iso.stream(block_frames=8) # live audio: push pieces of any size
for piece in pieces: # 3840 samples (80 ms) at a time keeps up (see below)
out = stream.push(piece) # the samples that became final
out = stream.flush()
The output runs 63 ms behind the input (the 2048-sample analysis window plus the 20 ms look-ahead). Each frame sees only the past and the look-ahead, so a file streamed in blocks gives the same audio as the original's own stream.
Live use: push 80 ms or more at a time. Each network step has a fixed cost of about 50 ms in ONNX Runtime
(5,500 small nodes plus the Mamba scans over time), whatever the number of new frames, so the push size sets the
speed. Time per push, RTX 3080 Laptop GPU, fp16/ on CUDA, 20 s of audio:
| push (frames per step) | time per push (mean / p95) | real-time factor |
|---|---|---|
| 20 ms (2) | 47 / 72 ms | 2.33 (too slow) |
| 40 ms (4) | 50 / 76 ms | 1.26 (too slow) |
| 80 ms (8) | 59 / 88 ms | 0.74 |
So stream(block_frames=8) with 80 ms pieces runs live, about 210 ms behind the input (the 63 ms above, 70 ms of
buffering, the compute). The CPU provider is far from real time (40 ms pushes: 9.3).
Precision. fp16/: the weights stored in fp16 and cast to fp32 where they are read, so the arithmetic is fp32
(as for the offline model, fp16 activations are not used); 117 MB. Keep TF32 off on CUDA (use_tf32 "0", which
pipeline.py sets): with it the output moves 33 dB further from the original's.
Benchmark. VoiceBank-DEMAND test set (Valentini et al.: 824 utterances by two unseen speakers, 48 kHz), each file
streamed through the model in blocks of 16 frames. PESQ is wide-band (ITU-T P.862.2, at 16 kHz), STOI at 48 kHz,
SI-SDR against the clean speech; "vs original" is the SI-SDR of each output against the PyTorch model's output (mean /
worst file). The original is inworld-voice-isolation's VoiceIsolator in streaming mode (its stream defaults,
look-ahead 2 frames) in fp32 on CUDA; its own CUDA default, bf16 autocast, is shown too. Pass (speech enhancement): no
file more than 0.5 dB SI-SDR below the original's. Real-time factor (processing time / audio time) on an RTX 3080
Laptop GPU, whole pipeline.
| PESQ | STOI | SI-SDR (dB) | vs original (dB) | Real-time factor | |
|---|---|---|---|---|---|
| original (PyTorch fp32, CUDA, streaming) | 2.932 | 0.9373 | 19.54 | - | 1.40 |
| original, bf16 autocast (its CUDA default) | 2.948 | 0.9382 | 19.53 | 58.3 / 44.3 | - |
fp16/ (CUDA) |
2.932 | 0.9372 | 19.54 | 84.1 / 60.3 | 0.76 |
Weight-only int8 (61 MB) and 4-bit (39 MB) builds were measured and are not published: 2 and 8 of the 824 files were more than 0.5 dB below the original's (worst 0.71 and 1.21 dB; 51.8 and 34.6 dB from it on average).
The offline model (whole 8 s windows, slightly higher scores: PESQ 3.26, SI-SDR 19.9 dB on the same set) is in moonbox-dev/voice-isolator-ONNX.
How these were made
From Inworld Voice Isolator (realtime) at revision 9b0285b3fe, starting from an fp32 ONNX graph (where it came from is said above).
fp16: onnxconverter-common with inputs and outputs kept fp32, or, where the network's activations leave fp16's
range, fp16 weights with fp32 math (said above when so). int8: weight-only, every Conv / MatMul / GRU weight int8
with a per-output-channel scale behind DequantizeLinear and activations in fp32, so it runs on the CPU provider
without a calibration set. int4: ONNX Runtime's MatMulNBits (weight-only, block 32) on the MatMul weights, the rest
int8 as above, where the graph has enough MatMul weights to matter. No bf16: ONNX Runtime has no bf16 convolution or
GRU kernels. Every graph was benchmarked before upload; the sha256 column above is what the files must hash to.
License
Apache-2.0. These files are a derivative of the original model and carry its license: it is copied in this repository, and it governs your use of these files. The original model card follows unchanged.
Original model card
Voice Isolator
Open-license (Apache-2.0) 48 kHz voice isolation for noisy speech recordings and live audio.
TL;DR
Inworld Voice Isolator v1 ships as two models that share one architecture:
voice-isolator-v1 |
voice-isolator-v1-realtime |
|
|---|---|---|
| made for | recorded audio and anything not latency-sensitive, at the best quality | live audio, as a stream in your pipeline or production |
| how it runs | offline: every frame sees its whole 8 s chunk | a causal stream with 20 ms of look-ahead |
| parameters | 64M | 58M |
Use them for cleaning recordings before playback or publication, curating speech datasets and voice pipelines where the speaker's identity must survive. With the realtime model, use them for live calls and streams. Subtract the isolated voice from the input to extract background noise or a backing-track residual for vocals/music separation.
They are not a speaker selector or a restoration model. Restoration is planned for version 2 (see Plans).
Quick start
Using a coding agent? Point it at the setup section of AGENTS.md: it installs the package, checks the machine with voice-isolate-doctor and cleans a first file.
pip install inworld-voice-isolation
# or from a clone: git clone https://github.com/inworld-ai/voice-isolator && cd voice-isolator && pip install -e .
# a noisy example; a clone also has it at demo/examples/sample_14.wav
curl -LO https://raw.githubusercontent.com/inworld-ai/voice-isolator/main/demo/examples/sample_14.wav
# offline isolation (downloads the offline model on first use):
# the voice goes to sample_14_clean.wav and the removed background
# to sample_14_clean_background.wav, beside it
voice-isolate sample_14.wav sample_14_clean.wav
Both are float32 WAVs at 48 kHz, with their original levels preserved; together they reconstruct the aligned mono input.
Use --output-sr 0 to keep the input rate, --background noise.wav to choose the background path for one file, or --no-background to save only the voice.
from inworld import voice_isolation
# isolate a recording offline
offline = voice_isolation.VoiceIsolator("inworld/voice-isolator")
wav, sample_rate = voice_isolation.load_audio("sample_14.wav")
voice = offline.isolate(wav, sample_rate)
voice_isolation.save_audio("sample_14_clean.wav", voice, sample_rate, subtype="FLOAT")
voice_isolation.save_audio("sample_14_clean_background.wav", wav - voice, sample_rate, subtype="FLOAT") # what was removed
Streaming
The realtime model isolates the voice as the audio arrives, with 20 ms of look-ahead:
import torch
from inworld import voice_isolation
live = voice_isolation.VoiceIsolator("inworld/voice-isolator",
mode="streaming", lookahead_frames=2)
session = live.stream() # takes 48 kHz mono, in pieces of any size
wav, sample_rate = voice_isolation.load_audio("sample_14.wav") # 48 kHz mono, standing in for a live source
voice = []
for start in range(0, len(wav), 960): # 20 ms at a time, as a microphone delivers it
voice.append(session.push(wav[start:start + 960])) # the samples that are final: play or send them
voice.append(session.flush()) # the rest, once the source ends
voice_isolation.save_audio("sample_14_streamed.wav", torch.cat(voice), sample_rate)
The streaming CLI writes only the isolated voice, after the whole file has gone through:
voice-isolate sample_14.wav sample_14_streamed.wav --mode streaming --lookahead 2
The weights download on first use, and their checksums are verified.
The mode picks the checkpoint: voice-isolator-v1 offline, voice-isolator-v1-realtime for streaming.
CUDA is used when available, Apple's Metal backend (mps) on an Apple-silicon Mac with PyTorch 2.6 or later, and the CPU otherwise; --device picks one.
The code, the interactive demo and the benchmark are on GitHub: inworld-ai/voice-isolator. The demo loads both models at startup: Offline processes files and samples into voice and background audio; Online streams the microphone for up to 60 seconds with updating waveforms and spectrograms, pausing capture before playback.
Hardware
Tested on NVIDIA Ampere, Hopper and Blackwell GPUs (A100, H100, B200 and B300) and on CPU. Smaller GPUs are not tested yet (see Plans).
The VIBE benchmark
Inworld VIBE (Voice Isolation Benchmark and Evals) ranks 48 kHz voice isolators on two boards. The chart is the denoising board, which ranks every system except those that put more than 10 dB more energy above a band-limited input's band than inside it; those are ranked on restoration. Inworld scores every system on its internal evaluation set, which is not distributed.
How the systems are scored and what the scores mean.
Architecture
A band-split dual-path network over the STFT (n_fft 2048, hop 480 at 48 kHz, 10 ms frames). Each frame's spectrum is cut into 46 bands, narrow at low frequency and wide at the top, one token per band and frame, width 512. Seven blocks refine the tokens, alternating two kinds. Four blocks run time attention with rotary position and exclusive self attention, followed by attention across bands. Three blocks run Mamba along time, followed by Mamba across bands (state 16). Per-band heads produce a bounded complex mask and a bounded per-bin residual, added to the input spectrum. The offline model has 64.0M parameters. The realtime model has 58.2M; its blocks are causal and it carries a look-ahead embedding. Input is one channel at 48 kHz; nothing is separated or synthesized beforehand.
Two checkpoints
The offline model, voice-isolator-v1, is two-sided: every frame sees its whole 8 s chunk, and long inputs render in 8 s chunks overlapping by 2 s.
The realtime model, voice-isolator-v1-realtime, is causal, with a trained look-ahead of 0, 20 or 40 ms; its algorithmic latency is 63 ms at 20 ms of look-ahead.
Both keep the foreground voice: when two people speak at once, the louder voice is kept and one a few dB quieter is removed, while voices at similar levels are usually both kept.
In the speech-enhancement literature, version 1 does denoising (noise suppression): it removes what surrounds the voice and restores nothing the recording lost, such as missing bandwidth; restoration comes with version 2.
Training data
Inworld Voice Isolator v1 was trained on approximately 10,000 hours of unique audio. Paired examples built from recorded speech: read and conversational speech in many languages, expressive and character voices, whispered speech, singing, and the speaker's own non-verbal sounds such as laughter, breaths and sighs. The speech was mixed with environmental and household noise, traffic, rain and wind, music and crowd sound, isolated transient events and competing talkers, through measured and simulated room responses and telephony and codec degradations. Real recordings of the same speech, captured clean and in rooms, complete the set. The objective: return the voice as it was recorded, remove everything that is not the speaker (noise, music, other voices and the late room tail), keep the speaker's own non-verbal sounds, level and timing, and invent nothing.
Third-party datasets used in training are credited in NOTICE.
License
Code and weights are Apache-2.0 (LICENSE). Third-party notices are in NOTICE.
How to contribute
Everyone is welcome to use the model however they like and to make it better in any way they see fit! Development happens on GitHub: see CONTRIBUTING.md for setup, tests and bug reports.
Built for people with โค๏ธ by Inworld.
Model tree for moonbox-dev/voice-isolator-realtime-ONNX
Base model
inworld/voice-isolator