home/ atoms/ demucs-cli-usage

Demucs separates any audio file from the command line with a single command

After pip install -U demucs, running demucs PATH_TO_FILE separates a track and writes four stereo wav files to separated/MODEL_NAME/TRACK_NAME/. Default output format is 44.1 kHz stereo int16 wav. Key flags: -n MODEL selects a model variant; --two-stems=vocals produces only vocal/accompaniment split (karaoke mode); --mp3 saves as compressed audio; --segment N reduces GPU memory by processing in N-second chunks; -d cpu forces CPU if no CUDA GPU is available; -j N parallelises across N CPU cores. The most common stumbling block: files with spaces in the path need quoting.

Examples

# Basic separation:
demucs mytrack.mp3

# Karaoke mode:
demucs --two-stems=vocals mytrack.mp3

# Best quality model, MP3 output:
demucs -n htdemucs_ft --mp3 --mp3-bitrate 320 mytrack.mp3

# Reduce GPU memory usage:
demucs --segment 8 mytrack.mp3

Assessment

Without looking at the docs: write the command to extract only drums from a file called acid-set.flac using the fine-tuned HTDemucs model, saving output as MP3 at 320 kbps.

“If you only want to separate vocals out of an audio, use `--two-stems=vocals` (You can also set to drums or bass)”
corpus · demucs-music-source-stem-separation · chunk 6