Audio-to-Audio
MLX
Safetensors
moonbox
inworld
voice-isolation
speech-enhancement
denoising
noise-suppression
48khz
full-band
Run this model with HF Jobs
Run moonbox-dev/voice-isolator-MLX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/moonbox-dev/voice-isolator-MLX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/moonbox-dev/voice-isolator-MLX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use moonbox-dev/voice-isolator-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use moonbox-dev/voice-isolator-MLX with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download moonbox-dev/voice-isolator-MLX --local-dir voice-isolator-MLX
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 18,685 Bytes
b98220a 2d779a6 de5c772 b914ebd 265dbd0 b98220a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | ---
base_model: inworld/voice-isolator
base_model_relation: quantized
license: apache-2.0
pipeline_tag: audio-to-audio
library_name: mlx
tags:
- mlx
- moonbox
- mlx
- inworld
- voice-isolation
- speech-enhancement
- denoising
- noise-suppression
- 48khz
- full-band
---
# Inworld Voice Isolator MLX
MLX builds of [Inworld Voice Isolator](https://huggingface.co/inworld/voice-isolator), made by Moonbox for Apple Silicon Macs. Each precision is a folder; keep a folder's
files together. Only the parts listed below are converted: the rest of the pipeline comes from the original
repository unless the section below says otherwise.
## Files
The last column is how far each build is from the original PyTorch model on the same inputs (see the section below
for what was measured).
| Precision | File | Size | sha256 | Checked against the original |
|---|---|---|---|---|
| bf16 | [`bf16/config.json`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/bf16/config.json) | 1.0 kB | `87631df984bb` | PESQ 3.226, STOI 0.9485, SI-SDR 20.38 dB (original 3.207 / 0.9486 / 20.38); output 55.9 dB from the original's (worst file 48.2), no file below it by more than 0.03 dB |
| bf16 | [`bf16/mlx_model.py`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/bf16/mlx_model.py) | 23.2 kB | `c4e15497cb17` | PESQ 3.226, STOI 0.9485, SI-SDR 20.38 dB (original 3.207 / 0.9486 / 20.38); output 55.9 dB from the original's (worst file 48.2), no file below it by more than 0.03 dB |
| bf16 | [`bf16/model.safetensors`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/bf16/model.safetensors) | 128.9 MB | `bc877deaadcb` | PESQ 3.226, STOI 0.9485, SI-SDR 20.38 dB (original 3.207 / 0.9486 / 20.38); output 55.9 dB from the original's (worst file 48.2), no file below it by more than 0.03 dB |
| fp16 | [`fp16/config.json`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/fp16/config.json) | 1.0 kB | `b7054e152997` | fp16 storage, fp32 math (fp16 math overflows): PESQ 3.207, STOI 0.9486, SI-SDR 20.38 dB; 84.0 dB from the original's (worst 79.3), no file below it by more than 0.00 dB |
| fp16 | [`fp16/mlx_model.py`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/fp16/mlx_model.py) | 23.2 kB | `c4e15497cb17` | fp16 storage, fp32 math (fp16 math overflows): PESQ 3.207, STOI 0.9486, SI-SDR 20.38 dB; 84.0 dB from the original's (worst 79.3), no file below it by more than 0.00 dB |
| fp16 | [`fp16/model.safetensors`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/fp16/model.safetensors) | 129.1 MB | `21a63d98f2c7` | fp16 storage, fp32 math (fp16 math overflows): PESQ 3.207, STOI 0.9486, SI-SDR 20.38 dB; 84.0 dB from the original's (worst 79.3), no file below it by more than 0.00 dB |
| 8bit | [`8bit/config.json`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/8bit/config.json) | 16.5 kB | `fbe2a0cc4de5` | PESQ 3.227, STOI 0.9487, SI-SDR 20.38 dB; 52.2 dB from the original's (worst 39.9), no file below it by more than 0.12 dB |
| 8bit | [`8bit/mlx_model.py`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/8bit/mlx_model.py) | 23.2 kB | `c4e15497cb17` | PESQ 3.227, STOI 0.9487, SI-SDR 20.38 dB; 52.2 dB from the original's (worst 39.9), no file below it by more than 0.12 dB |
| 8bit | [`8bit/model.safetensors`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/8bit/model.safetensors) | 70.7 MB | `4deeb8f09612` | PESQ 3.227, STOI 0.9487, SI-SDR 20.38 dB; 52.2 dB from the original's (worst 39.9), no file below it by more than 0.12 dB |
| 6bit | [`6bit/config.json`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/6bit/config.json) | 16.5 kB | `913c687b00ab` | PESQ 3.235, STOI 0.9488, SI-SDR 20.36 dB; 46.3 dB from the original's (worst 41.0), no file below it by more than 0.08 dB |
| 6bit | [`6bit/mlx_model.py`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/6bit/mlx_model.py) | 23.2 kB | `c4e15497cb17` | PESQ 3.235, STOI 0.9488, SI-SDR 20.36 dB; 46.3 dB from the original's (worst 41.0), no file below it by more than 0.08 dB |
| 6bit | [`6bit/model.safetensors`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/6bit/model.safetensors) | 55.2 MB | `86d7f947ccec` | PESQ 3.235, STOI 0.9488, SI-SDR 20.36 dB; 46.3 dB from the original's (worst 41.0), no file below it by more than 0.08 dB |
| 4bit | [`4bit/config.json`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/4bit/config.json) | 16.6 kB | `a35f9f13211d` | decoder heads and time-axis Mamba at 8 bits: PESQ 3.228, STOI 0.9483, SI-SDR 20.37 dB; 44.5 dB from the original's (worst 30.8), no file below it by more than 0.23 dB |
| 4bit | [`4bit/mlx_model.py`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/4bit/mlx_model.py) | 23.2 kB | `c4e15497cb17` | decoder heads and time-axis Mamba at 8 bits: PESQ 3.228, STOI 0.9483, SI-SDR 20.37 dB; 44.5 dB from the original's (worst 30.8), no file below it by more than 0.23 dB |
| 4bit | [`4bit/model.safetensors`](https://huggingface.co/moonbox-dev/voice-isolator-MLX/blob/main/4bit/model.safetensors) | 52.4 MB | `10264d0816b1` | decoder heads and time-axis Mamba at 8 bits: PESQ 3.228, STOI 0.9483, SI-SDR 20.37 dB; 44.5 dB from the original's (worst 30.8), no file below it by more than 0.23 dB |
## How to run
Inworld Voice Isolator (offline, 64M parameters): removes noise, music and other voices from speech at 48 kHz,
full band, keeping the speaker's timbre. Each folder is the whole pipeline for `mlx_model.py`, the one-file MLX
runtime in the folder (mlx and numpy; no PyTorch): `model.safetensors`, `config.json`, `mlx_model.py`.
```bash
pip install mlx numpy soundfile
hf download moonbox-dev/voice-isolator-MLX --include "8bit/*" --local-dir voice-isolator
```
```python
import sys, soundfile as sf
sys.path.insert(0, "voice-isolator/8bit")
from mlx_model import VoiceIsolator
iso = VoiceIsolator("voice-isolator/8bit")
noisy, sr = sf.read("noisy.wav", dtype="float32") # mono, 48 kHz
sf.write("clean.wav", iso.isolate(noisy), 48000)
```
Clips longer than 8 s run in 8 s windows overlapping by 2 s, as the original does. `mlx_model.py` sets
`MLX_ENABLE_TF32=0` before importing mlx, because the M5's reduced-precision float32 matrix products move the output
by tens of dB. If your process has already used MLX, set that variable yourself before the first MLX call.
The runtime follows Inworld's code (inworld-voice-isolation @c73b3fa, Apache-2.0) operation for operation; the Mamba
layers' selective scan is the original's own Metal kernel. The STFT, norms, scan and complex correction run in float32
in every build. `fp16/` stores the weights in float16 and computes in float32 (float16 arithmetic overflows);
`bf16/` computes the matrix products in bfloat16. `8bit/`, `6bit/` and `4bit/` MLX-quantize Linear layers (affine,
group size 64); the band encoders, the decoder's condition layer and the Mamba `dt_proj` layers stay float, and
`4bit/` keeps the decoder heads and the time-axis Mamba layers at 8 bits (all-4-bit failed the check below).
**How they were checked.** VoiceBank-DEMAND test (every 4th file, 206 of 824, 48 kHz) through the original PyTorch
model (fp32, CPU) and every build: PESQ (wide-band), STOI and SI-SDR against the clean speech, and each output's
distance from the original's output. Pass: no file more than 0.5 dB SI-SDR below the original's. The float32 port is
130 dB from the original on average.
| Precision | Size | PESQ | STOI | SI-SDR | From the original's output, mean / worst | Worst file vs the original |
|---|---|---|---|---|---|---|
| original (PyTorch fp32) | 256 MB | 3.207 | 0.9486 | 20.38 dB | - | - |
| `bf16/` | 129 MB | 3.226 | 0.9485 | 20.38 dB | 55.9 / 48.2 dB | -0.03 dB |
| `fp16/` | 129 MB | 3.207 | 0.9486 | 20.38 dB | 84.0 / 79.3 dB | -0.00 dB |
| `8bit/` | 71 MB | 3.227 | 0.9487 | 20.38 dB | 52.2 / 39.9 dB | -0.12 dB |
| `6bit/` | 55 MB | 3.235 | 0.9488 | 20.36 dB | 46.3 / 41.0 dB | -0.08 dB |
| `4bit/` | 52 MB | 3.228 | 0.9483 | 20.37 dB | 44.5 / 30.8 dB | -0.23 dB |
(The noisy input scores PESQ 1.99, STOI 0.909, SI-SDR 8.0 dB.) On an Apple M5, `bf16/` processes audio about 3 times
faster than real time.
Licence: Apache-2.0, as Inworld's original.
## How these were made
From [Inworld Voice Isolator](https://huggingface.co/inworld/voice-isolator) at revision `9b0285b3fe`: the original weights loaded in MLX and stored as bf16 or fp16, or
quantized with MLX's affine quantization (`8bit`, `6bit`, `4bit`, group size 64; layers MLX can't quantize, such as
convolutions and norms, stay bf16). Every build was checked against the original 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
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/voice-isolator/resolve/main/docs/assets/inworld-logo-white.svg">
<img src="https://huggingface.co/inworld/voice-isolator/resolve/main/docs/assets/inworld-logo-black.svg" alt="Inworld" width="220">
</picture>
</p>
<h1 align="center">Voice Isolator</h1>
<p align="center">
Open-license (Apache-2.0) 48 kHz voice isolation for noisy speech recordings and live audio.
</p>
<p align="center">
<a href="https://github.com/inworld-ai/voice-isolator"><img src="https://img.shields.io/badge/GitHub-inworld--ai%2Fvoice--isolator-181717?logo=github" alt="GitHub: inworld-ai/voice-isolator"></a>
</p>
---
## 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](https://github.com/inworld-ai/voice-isolator#plans)).
## Quick start
Using a coding agent? Point it at the [setup section of AGENTS.md](https://github.com/inworld-ai/voice-isolator/blob/main/AGENTS.md#setting-up-the-voice-isolator-for-a-user): it installs the package, checks the machine with `voice-isolate-doctor` and cleans a first file.
```bash
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.
```python
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:
```python
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:
```bash
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](https://github.com/inworld-ai/voice-isolator/blob/main/demo/README.md) and the [benchmark](https://github.com/inworld-ai/voice-isolator/blob/main/bench/README.md) are on GitHub: [inworld-ai/voice-isolator](https://github.com/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](https://github.com/inworld-ai/voice-isolator#plans)).
## The VIBE benchmark
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/voice-isolator/resolve/main/docs/assets/board-dark.svg">
<img src="https://huggingface.co/inworld/voice-isolator/resolve/main/docs/assets/board-light.svg" alt="Inworld VIBE full-band tier: denoising score per system" width="100%">
</picture>
</p>
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](https://github.com/inworld-ai/voice-isolator/blob/main/bench/README.md).
## Architecture
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/inworld/voice-isolator/resolve/main/docs/assets/architecture-dark.svg">
<img src="https://huggingface.co/inworld/voice-isolator/resolve/main/docs/assets/architecture-light.svg" alt="The network: STFT, band split, seven dual-path blocks, per-band heads, iSTFT; the two checkpoints" width="100%">
</picture>
</p>
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](NOTICE).
## License
Code and weights are Apache-2.0 ([LICENSE](LICENSE)).
Third-party notices are in [NOTICE](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](https://github.com/inworld-ai/voice-isolator/blob/main/CONTRIBUTING.md) for setup, tests and bug reports.
---
<p align="center">Built for people with ❤️ by Inworld.</p>
|