2026-02-15
last update: 2026-02-15
Installing and running Spleeter to separate audio files
Here are up-to-date installation instructions for running Deezer's Spleeter on Ubuntu 24.04.
Minimum requirements are around 16 GB of RAM.
(During the processing, it uses around 11 GB at the peak.)
I ran this on a temporary Hetzner server because my Apple Silicon system, after lots of fiddling with version, ran into AVX issues.
Install Conda.
conda create -n spleeter_env python=3.8 -y
conda activate spleeter_env
conda install -c conda-forge ffmpeg libsndfile numpy=1.19 -y
pip install spleeter
spleeter separate -o audio_output input.mp3
If your audio file is too long, Spleeter will truncate it. As a workaround, you can first split your files, then process, and then merge again via the following script.
#!/usr/bin/env bash
INPUT_FILE="myfile.m4a"
CHUNK_DURATION=300 # 5 minutes in seconds
OUTPUT_DIR="spleeter_chunks"
FINAL_OUTPUT="final_vocals.wav"
STEM="vocals" # Change to 'accompaniment' to get the background sound.
# 1. Split the file into 5-minute chunks
# 2. Process each chunk with Spleeter.
for; do
done
# 3. Create a list of the separated stems for merging.
for; do
done
# 4. Merge the chunks back together.