Audio Separator is a Python package designed for easy audio stem separation, capable of splitting audio files into various stems (e.g., instrumental, vocals, drums, bass, etc.). It leverages a variety of pre-trained deep learning models, primarily from UVR (Ultimate Vocal Remover) and includes MDX-Net, VR Arch, Demucs, and MDXC models. The library offers both a Command Line Interface (CLI) for batch processing and a Python API for integration into other projects. It supports common audio formats like WAV, MP3, FLAC, and M4A.
pip install audio-separatorVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `Separator` class with an audio file path, a desired model name, and an output directory, then execute the separation process. The separated stems will be saved in the specified output directory. Models are automatically downloaded on first use. Replace `input_audio.wav` and `output_directory` with your actual paths.
pip uninstall torch onnxruntime; pip cache purge; pip install --force-reinstall torch torchvision torchaudio; pip install --force-reinstall onnxruntime-gpu (or "optimum[onnxruntime-gpu]" as per earlier docs). Refer to the official GitHub README for the most current recommended GPU installation steps.
Install FFmpeg for your operating system (e.g., via a package manager like `apt` or `brew`, or download from ffmpeg.org) and ensure its binaries are accessible via your system's PATH. You can verify installation by running `audio-separator --env_info`.
Ensure an active internet connection when using a new model for the first time. Subsequent runs with the same model will use the cached version.
Experiment with different models available through the library. Understand that separated stems are algorithms' best guesses, not perfectly isolated original recordings. Post-processing or manual cleanup may be required for professional applications.