Stem splitter
Drop a song. A trained model splits it into vocals, drums, bass and other: listen to each, mute, solo, rebalance, save.
Nothing is uploaded. Everything runs in this tab with @audio/neural-separate, @audio/decode, @audio/encode.
Stems from a song, in the browser
This page runs SCNet, a music source separation network, through @audio/neural-separate and ONNX Runtime Web. Drop a song and it comes back as four tracks: vocals, drums, bass and everything else. Play them together, mute or solo any of them, move their levels, and save each stem or the new mix as WAV, FLAC or MP3. Nothing is uploaded.
What it is good for
- Karaoke from an MP3: mute the vocals and save the mix. For vocals only, the vocal remover does it in one step and offers a larger vocals model.
- Practice: solo the bass or the drums to learn a part, or mute your own instrument and play along.
- Remixing and sampling: an a cappella, a drum break, a bass line, each as its own file.
- Rebalancing: the vocals 3 dB up in a mix that buries them, the drums down for a quieter room.
- A voice from under the music: the vocals stem keeps singing or speech and drops the music behind it. For speech under traffic, wind or hum, the noise remover fits better.
Two models
SCNet splits the spectrum into bands and models the low ones in more detail than the high ones, with LSTMs running along time and frequency. Both sizes were trained on MUSDB18-HQ by SCNet's authors; @audio/neural-separate runs their checkpoints with 8-bit weights, within 0.05 dB of the originals' median scores. Median SDR on the 50 MUSDB18 test previews (higher is cleaner):
- SCNet (13 MB): vocals 9.88 dB, drums 9.43, bass 8.35, other 6.15.
- SCNet-large (45 MB): vocals 11.00 dB, drums 10.27, bass 8.21, other 6.87. On the same songs iZotope RX 12 Music Rebalance at its Best setting scores 10.89, 9.85, 9.66 and 6.45.
The model hears the song in 11-second parts, each overlapping the next by half, and blends them. It is not perfect: reverb tails and backing vocals can leak between stems, and an electronic bass may land in other.
References
- W. Tong et al., SCNet: Sparse Compression Network for Music Source Separation, ICASSP 2024. Code and weights: starrytong/SCNet (MIT; the weights' licence confirmed in issue #35), configs hosted by ZFTurbo/Music-Source-Separation-Training.
- S. Rouard, F. Massa, A. Défossez, Hybrid Transformers for Music Source Separation, ICASSP 2023 (HT Demucs); its weights' terms in demucs#327.
- Z. Rafii, A. Liutkus, F.-R. Stöter, S. I. Mimilakis, R. Bittner, The MUSDB18 corpus for music separation, 2017.
- F.-R. Stöter, A. Liutkus, N. Ito, The 2018 Signal Separation Evaluation Campaign, LVA/ICA 2018: SDR by BSSEval v4, the median over 1-second windows, then over songs.
- Every score above, and the 8-bit weights: @audio/neural-separate's README.
Questions
Is my song uploaded?
No. The song is decoded, separated and encoded in this tab. What travels over the network is the model: SCNet's weights (13 MB, or 45 MB for SCNet-large) from huggingface.co, fetched once and kept in the browser's cache, and ONNX Runtime from jsDelivr.
Is this Demucs?
No. It runs SCNet, a different network (Tong et al., ICASSP 2024). On the 50 MUSDB18 test previews, SCNet-large's median SDR is 11.00 dB for vocals, 10.27 drums, 8.21 bass and 6.87 other, against Hybrid Transformer Demucs's 8.86, 9.55, 9.30 and 5.69: cleaner on three stems, behind on bass. Demucs's weights are licensed for research only, so this page does not ship them.
How long does it take?
It depends on the graphics card more than anything. In Chromium on an Apple M4 Max, SCNet split a 4-minute song in 73 seconds on the GPU (WebGPU) and in 6 minutes 45 seconds on one CPU thread. SCNet-large took 2.1 seconds per second of audio on the GPU. The page shows an estimate before you start and the time left while it runs.
What if my browser has no WebGPU?
The model runs on the CPU through WebAssembly: the same result, several times slower. Firefox 148 and Chromium ran SCNet at the same pace on both paths. A browser without WebAssembly SIMD (before Chrome 91, Firefox 89, Safari 16.4) cannot run it, and the page says so.
Do the stems add back to the song?
Very nearly. SCNet takes the song's mean out before it listens and gives it to no stem, and nothing forces its four stems to add up: on the test files here they summed to the song less its DC offset, give or take 38 to 43 dB under it. The mix you save loses nothing: it is the song plus each stem's change, so with every stem at 0 dB it is the song itself.
How much memory does it need?
In Chromium, a 4-minute song took about 2 GB on top of the idle browser with SCNet on the GPU and 2.5 GB on the CPU; SCNet-large on the CPU took 3 GB for 10 seconds. Very long files can exhaust a tab: split them into parts.
Can I use the stems commercially?
The model weights are MIT-licensed: SCNet's author confirmed it for the released checkpoints. They were trained on MUSDB18-HQ, whose licence covers educational use, and whether that reaches a model trained on it is unsettled. The song's own copyright is unchanged by splitting it.
More audio utilities
- Extract audio from video
- Remove or replace video audio
- Audio converter
- Loudness meter and normalizer
- Noise remover
- Remove silence from audio
- Wow and flutter fixer
- Transcribe audio to text and subtitles
- Key and BPM finder
- Vocal remover
- Pitch and tempo changer
- MIDI to MP3
- Audio to MIDI converter
- Tuner
- Tone generator
- Speech prosody editor
- Audio recorder
- Lossless audio checker
- Spectrogram
- Room and speaker measurement
- Audio latency test