Spleeter: AI Audio Source Separation for Music Producers

Jul 9, 2025

Introduction

Isolating a specific instrument or vocal track from a finished song is often described as “unbaking a cake”—a nearly impossible task for traditional audio engineering. Spleeter, an open-source library developed by Deezer, solves this by using deep learning to separate audio sources with incredible speed. With thousands of GitHub stars and a legacy of powering many commercial stem separation services, Spleeter allows developers and music producers to extract vocals, drums, and bass from any audio file.

What Is Spleeter?

Spleeter is a source separation library that uses pretrained models to isolate individual audio components (stems) from a mixed audio track. Written in Python and built on TensorFlow, it treats audio separation as an image segmentation problem by operating on magnitude spectrograms. It is released under the MIT License, making it free for both personal and commercial use.

The project is maintained by Deezer Research, Deezer’s AI research arm, and provides a variety of pretrained models that can split audio into 2, 4, or 5 stems, depending on the level of detail required for the project.

Why Spleeter Matters

Before Spleeter, high-quality source separation was largely confined to forensic labs or expensive, proprietary software. The release of Spleeter in 2019 revolutionized the field by providing a high-performance, open-source alternative that could process audio 100x faster than real-time on a GPU. This democratized access to stem extraction for DJs, remixers, and music students.

Spleeter’s primary value lies in its efficiency. While newer models may offer slightly higher fidelity, Spleeter remains one of the fastest tools for batch processing large libraries of music. For many users, the tradeoff between a slight increase in artifacts and a massive gain in processing speed is the ideal choice for rapid prototyping and remix prep.

Key Features

  • Multi-Stem Separation: Spleeter offers three primary pretrained models. The 2-stem model separates vocals from accompaniment; the 4-stem model isolates vocals, drums, and bass; and the 5-stem model provides a more granular separation including piano.
  • High-Speed Processing: By utilizing TensorFlow and GPU acceleration, Spleeter can separate audio files in a fraction of the time it takes to play the song. This makes it ideal for large-scale batch processing.
  • Flexible Integration: The tool is available as both a command-line interface (CLI) for quick tasks and a Python library for integration into larger audio processing pipelines.
  • Pretrained Model Availability: Users do not need to train their own neural networks; the library comes with high-quality models trained on Deezer’s proprietary dataset.
  • MIT License: The open-source nature of the project allows for the creation of third-party GUIs and commercial services built on top of Spleeter.
  • Spectrogram-Based Approach: Spleeter uses a U-Net convolutional neural network to create soft masks for each time-frequency pixel, effectively “masking out” the unwanted audio components.

How Spleeter Compares

Spleeter is often compared to other open-source tools like Demucs (by Meta) and Open-Unmix. While Spleeter was the first to bring high-quality separation to the masses, the landscape has evolved.

Feature Spleeter Demucs Open-Unmix
Processing Speed Very Fast Slower Moderate
Audio Quality Good (with artifacts) Excellent Good
Hardware Needs Moderate (CPU/GPU) High (GPU recommended) Moderate
Setup Complexity Simple Moderate Moderate

The primary tradeoff is speed versus quality. Spleeter is significantly faster than Demucs, making it the better choice for users who need to process hundreds of songs quickly. However, Demucs uses a waveform-based approach (rather than spectrograms), which typically results in fewer audible artifacts and better phase information. Spleeter is a legacy tool that is highly efficient, while Demucs is the current state-of-the-art for high-fidelity audio separation.

Getting Started: Installation

Spleeter requires a few system-level dependencies before the Python package can be installed. Ensure you have Python 3.6+ installed on your system.

Prerequisites

You must install ffmpeg and libsndfile. The easiest way to do this via conda is:

conda install -c conda-forge ffmpeg libsndfile

Pip Installation

Once the prerequisites are met, you can install Spleeter directly via pip:

pip install spleeter

Docker Installation

For those who prefer containerized environments to avoid dependency conflicts, Spleeter provides an official Docker image:

docker pull deezer/spleeter

How to Use Spleeter

The most common way to use Spleeter is through its command-line interface. To separate a song into two components (vocals and accompaniment), run the following command:

spleeter separate -p spleeter:2stems -o output audio_example.mp3

This command tells Spleeter to use the 2-stem model (-p), specifies the output directory (-o), and provides the input audio file. On the first run, Spleeter will automatically download the pretrained models from the Deezer servers.

If you need more detailed separation, you can change the model to spleeter:4stems or spleeter:5stems. The output will be saved as separate WAV files in a folder named after the song.

Code Examples

For developers integrating Spleeter into a Python application, you can use the Separator class. Here is a basic example of how to isolate vocals from an audio file programmatically:

from spleeter.separator import Separator

# Initialize the separator with the 2-stem model
separator = Separator('spleeter:2stems')

# Perform the separation
separator.separate_to_file('input.mp3', 'output_folder/')

This snippet initializes the separator with the specific model and processes the audio file, saving the result to the specified output directory. This allows for the creation of custom audio processing tools or automated workflows.

Real-World Use Cases

  • Remixing and Sampling: Producers can extract clean acapellas (vocals only) and instrumentals from old recordings where the original multi-tracks are unavailable.
  • Karaoke Creation: By isolating the accompaniment track, users can create high-quality backing tracks for singers without the original lead vocals.
  • Music Education: Students can isolate a specific instrument (like the bass line or drums) to study the performance and transcribe the notes more clearly.
  • DJing: DJs can create custom edits and mashups by separating stems in real-time or pre-processing their library for stem-based mixing.

Contributing to Spleeter

Spleeter is an open-source project and welcomes contributions from the community. You can contribute by reporting bugs through GitHub Issues or by submitting a Pull Request to improve the core library. If you are an AI researcher, you can also contribute by improving the pretrained models or providing better training datasets.

The project follows the standard GitHub flow for contributions. New contributors should review the CONTRIBUTING.md file in the repository to ensure their code follows the project’s coding standards and style guidelines.

Community and Support

Spleeter has a massive community of audio engineers and developers. Support is primarily handled through GitHub Discussions and the project’s Wiki. The official documentation is hosted on the GitHub Wiki, which provides detailed guides on installation, and API reference, and common troubleshooting steps.

Many third-party tools and GUIs have been developed around Spleeter, such as SpleeterGUI, which makes the tool more accessible to non-technical users. The community is active in music production forums and music AI research circles.

Conclusion

Spleeter is a powerful and efficient tool for anyone needing to isolate audio sources from a mixed track. While newer models like Demucs may offer higher fidelity, Spleeter’s speed and efficiency make it the right choice for batch processing and rapid prototyping. It is the ideal tool for producers who prioritize speed over absolute perfection.

If you are a music producer, DJ, or developer, we recommend starting with the 2-stem model for quick results. Star the repo, try the quickstart, and join the community to explore the same technology that powers many of the world’s most popular stem separation services.

What is Spleeter and what problem does it solve?

Spleeter is an AI-driven source separation library that allows users to isolate vocals and instruments from a mixed audio track. It solves the problem of extracting individual stems from songs where the original multi-tracks are not available.

How do I install Spleeter?

You can install Spleeter using pip (pip install spleeter) after installing the system dependencies ffmpeg and libsndfile. Alternatively, you can use the official Docker image for a faster setup.

Spleeter vs Demucs: Which one should I use?

Use Spleeter if you need high processing speed and the ability to batch process large libraries of music. Use Demucs if you need the highest possible audio quality and the most natural-sounding stems with fewer artifacts.

Can I use Spleeter for commercial projects?

Yes, Spleeter is released under the MIT License, which allows for commercial use, modification, and distribution of the library and its pretrained models.

Can I use Spleeter for isolating a specific instrument like piano?

Spleeter’s 5-stem model can specifically isolate the piano track from a mixed audio track, which is a highly useful feature for music students and transcription artists.

Can I use Spleeter for live audio separation?

Spleeter is primarily designed for offline processing of audio files. While it is very fast, it is not designed for low-latency live audio separation in a DAW.

Spleeter: Does it require a GPU to run?

Spleeter is built on TensorFlow, and while it can run on a CPU, it is highly recommended to use a GPU for significantly faster processing speeds.