Split a song into four stems on your Mac
Pull a song apart so you can listen to its vocal, drum, bass or remaining instrumental part. This Terminal recipe uses the free speech CLI and HTDemucs on an Apple Silicon Mac. Each stem becomes a separate stereo WAV file that you can open in an audio editor.
1. Install the tools
You need an Apple Silicon Mac, macOS 15 or later, and Homebrew. Open Terminal and run the installation command. This is a local Mac workflow: it does not need a Soniqo account or an audio upload.
brew install speech
The first separation downloads the HTDemucs model from Hugging Face, so allow an internet connection and extra time. The model stays cached on your Mac. Later separations can run offline with the cached model.
2. Try the music sample
Use a fresh working folder to keep the input and results together. Download the stereo WAV sample, or play the examples first. These players use the same recording so you can compare what stays in each output.
curl -fL https://soniqo.audio/audio/samples/music/sample.wav -o sample.wav
Download the sample WAV · Sample credits and license
Core ’ngrato (1995) · Singing Sergeants, United States Air Force Band. These are illustrative outputs from the commands below, not a separation-quality benchmark.
3. Separate the recording
Run this command in the folder containing sample.wav. It writes vocals.wav, drums.wav, bass.wav and other.wav into stems. The original recording stays in place.
speech separate sample.wav --engine htdemucs --htdemucs-precision int8 --output-dir stems
4. Listen to each stem
Open the four WAV files in your preferred player or editor. They share the same duration and sample rate so you can place them on aligned tracks. Solo a part to study it, or mute it and play along with the others.
Choose the result you need
The vocal file is the isolated singing part. The other.wav file collects the remaining instruments; it is not a dedicated guitar or piano stem. For a backing track without vocals, follow the vocal-removal recipe to combine the other three files.
Use your own song
Replace the example input with the path to your stereo WAV file. Keep quotes around filenames containing spaces, and choose a different output folder for each song. This recipe uses 44.1 kHz stereo WAV audio; prepare other file formats as WAV first.
speech separate "/path/to/Your Song.wav" --engine htdemucs --htdemucs-precision int8 --output-dir my-song-stems
What to expect
A short sample is not a benchmark for a three-minute song or for a phone. Processing time and memory use depend on the track and model. Begin with a short clip, keep the original, and check the result by ear before using it in a practice session or edit.
For model settings and the Swift API, read Source Separation. See Getting Started for installation help and the CLI reference for command options.