Skip to content

garyanewsome/audio_stem_splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Audio Stem Splitter

A simple command-line tool that uses Meta's Demucs AI model to separate mixed audio files (like MP3s or WAVs) into individual stems:

  • Vocals
  • Drums
  • Bass
  • Other (Melody/Instruments)

Prerequisites

  1. Python 3.8+
  2. ffmpeg: Required for handling various audio formats.
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: sudo apt install ffmpeg
    • Windows: Download from gyan.dev or use winget install ffmpeg

Installation

  1. Clone or download this repository.
  2. (Optional but recommended) Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install the required Python libraries:
    pip install -r requirements.txt

Usage

Run the script from your terminal, providing the path to your audio file.

Basic Usage

python split_stems.py path/to/your/song.mp3

By default, the separated stems will be saved into a separated folder in your current directory.

Advanced Usage

You can specify a custom output directory and choose which Demucs model to use:

python split_stems.py path/to/your/song.mp3 -o /path/to/output_folder -m htdemucs_ft

Available Models (-m flag):

  • htdemucs (Default)
  • htdemucs_ft (Fine-tuned, slightly better quality but takes longer)
  • htdemucs_6s (Separates into 6 stems: vocals, drums, bass, other, piano, guitar)
  • mdx_extra
  • mdx_extra_q (Quantized, faster but slightly lower quality)

Note: The first time you run the script, Demucs will download the pre-trained neural network weights. This may take a few minutes depending on your internet connection.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages