[!WARNING] Public release, with caveats. This is an independent community port, not an Inworld product. The port itself is verified against PyTorch. The model it runs is Turbo-5d, whose quality relative to the original is not conclusive. Read Caveats.
Which repository do I want?
| You are on | Use |
|---|---|
| A Mac with Apple silicon, and you want the fastest path | This repository |
Linux, Windows, NVIDIA, or you already use the inworld-voice-isolation package | Turbo5d-Model (drop-in PyTorch checkpoint) |
| Retraining or auditing the adaptation | Turbo5d-LoRA (developer kit) |
Quick start
pip install mlx numpy soundfile scipy huggingface_hub
hf download cowWhySo/Inworld-Voice-Isolator-v1-Turbo5d-MLX --local-dir turbo5d-mlx
python turbo5d-mlx/turbo5d_mlx.py noisy.wav clean.wav
The output is 48 kHz float32 mono. Any input sample rate and channel count is accepted (downmixed and resampled). Add --background removed.wav to also save what was taken out.
From Python:
from turbo5d_mlx import VoiceIsolatorMLX, load_mono_48k, resolve_weights
model = VoiceIsolatorMLX(resolve_weights()) # local model.safetensors, else downloads it
audio = load_mono_48k("noisy.wav") # float32 numpy, 48 kHz mono
voice = model.isolate(audio) # float32 numpy, same length
Long audio is processed in 8 s chunks with a 2 s crossfade, the same schedule as the original.
Speed
| 48 kHz synthetic input | Original v1, PyTorch MPS | Turbo-5d, PyTorch MPS | Turbo-5d, MLX | MLX vs original | MLX vs PyTorch Turbo-5d |
|---|---|---|---|---|---|
| 2 seconds | 0.189 s | 0.139 s | 0.126 s | 1.50x | 1.10x |
| 8 seconds | 0.874 s | 0.660 s | 0.518 s | 1.69x | 1.27x |
| 15 seconds | 2.662 s | 1.953 s | 1.549 s | 1.72x | 1.26x |
Apple M4 Max, FP32, offline mode, median of 5 warm runs after one warm-up. PyTorch figures use the stock inworld-voice-isolation 1.0.0 package on the mps device (PyTorch 2.15), which already ships its own Metal kernel, so this is a comparison against a tuned baseline. MLX 0.32.5.
Peak MLX memory was about 1.2 GB for a 2 s clip and 3.0 GB for clips of 8 s or longer.
Correctness
The port is checked against the upstream PyTorch network running the same weights on CPU in float32:
| Input | Max sample difference | Match |
|---|---|---|
| 1 s of noisy speech | 2.4e-7 | 125.8 dB |
| 3 s of noisy speech | 3.0e-7 | 126.2 dB |
| 10.8 s of noisy speech (two chunks, crossfaded) | 4.5e-7 | 125.1 dB |
"Match" is the ratio of the reference signal's energy to the energy of the difference. At these levels the two implementations differ only by float32 rounding. Every tensor in the checkpoint is read by the forward pass; none are ignored.
The weights file is byte-for-byte the PyTorch checkpoint from Turbo5d-Model, renamed. MLX reads it directly, so there is no conversion step that could drift.
How the port works
- One file.
turbo5d_mlx.pyholds the STFT, the band-split encoder, the transformer and Mamba blocks, the decoder and the chunked renderer. It reads the architecture from the checkpoint's own config. - Custom Metal kernel for the state-space scan. Each Mamba layer is a recurrence over time (or over bands). A plain array-framework loop builds one graph node per step and writes every intermediate state to memory. The port instead runs one GPU thread per sequence and channel that keeps the 16 states in registers for the whole scan, the same approach the upstream package uses on
mps. A pure-MLX loop is included as a fallback and gives the same output, but it is much slower and was not benchmarked. - Fused attention. Time and band attention use
mx.fast.scaled_dot_product_attention.
Caveats
- Model quality is inherited. This runs Turbo-5d. Its average SI-SDR change against the original is +0.384 dB with a 95% interval of -0.451 to +1.272 dB, which crosses zero, and it regresses on mixed speech-plus-environment noise, on French in the test set, and in mean STOI. Details and charts are in the model card.
- One machine. Speed was measured on a single M4 Max. Smaller or older Apple silicon will be slower, and the ratio to PyTorch may differ.
- Offline only. The realtime (streaming) path, look-ahead and dual-mode checkpoints are not ported and are refused at load time.
- FP32 only. No half-precision or quantized variant has been built or tested.
- Memory. About 3 GB at peak for a full 8 s chunk. Not tested on 8 GB machines.
- Apple silicon only. The fast path needs Metal.
- Tested with MLX 0.32.5. Other versions are untested.
- Data licensing not formally reviewed. The Turbo-5d adaptation used additional speech data whose licensing has not been through a formal review for redistribution of derived weights. Evaluate this for your own use.
- Unofficial. Not produced, endorsed or supported by Inworld AI or by the MLX team.
Files
| File | Purpose | SHA-256 |
|---|---|---|
model.safetensors | Turbo-5d FP32 weights, identical to the PyTorch checkpoint | 533207718f79412bb5c12e1ff83b4d57f1c1f83d97cd2304bf3d26ae580ece93 |
turbo5d_mlx.py | The MLX implementation and command-line tool | |
assets/ | Charts used in this card |
License and attribution
Apache-2.0. See LICENSE and NOTICE, which keeps Inworld's notices and records what was changed.
turbo5d_mlx.py is a port of the network in Inworld's voice-isolator (commit c73b3fab), including a Metal scan kernel modeled on theirs. All credit for the architecture, the original training and the reference implementation goes to Inworld AI: inworld/voice-isolator.