---
name: stems
description: Split any audio file into 4 stems (vocals, drums, bass, other) using Demucs. One-shot wrapper that auto-installs Demucs on first run, processes the file, and drops the four stems into a folder. Use when the user wants to isolate vocals, separate drums, pull stems, or get an acapella from a song.
---


# stems

Splits any audio into 4 stems via Facebook's htdemucs model.

## Run

```bash
python3 ~/.claude/skills/stems/scripts/stems.py track.mp3
# → ./stems/track/{vocals,drums,bass,other}.wav
```

Custom output:

```bash
python3 ~/.claude/skills/stems/scripts/stems.py track.mp3 --out ~/Desktop/my_stems --model htdemucs
```

## Models

- `htdemucs` (default) — best quality, 4 stems
- `htdemucs_ft` — fine-tuned, slightly better but slower
- `htdemucs_6s` — 6 stems (vocals, drums, bass, guitar, piano, other)
- `mdx_extra` — fastest, decent quality

## Notes

- First run pip-installs `demucs` (~500MB with torch).
- CPU-only is fine but slow (5-10x realtime). Apple Silicon uses MPS automatically.
- Outputs are 44.1kHz stereo WAV by default. Pass `--mp3` for compressed output.
