Musical concept image

Machine Learning in Linux: Spleeter – source separation library

With the availability of huge amounts of data for research and powerful machines to run your code on with distributed cloud computing and parallelism across GPU cores, Deep Learning has helped to create self-driving cars, intelligent voice assistants, pioneer medical advancements, machine translation, and much more. Deep Learning has become an indispensable tool for countless industries.

This series looks at highly promising machine learning and deep learning software for Linux.

Spleeter is a source separation library with pre-trained models. It’s written in Python and uses Tensorflow for its computation.

What is music separation? Music recordings are usually a mix of several individual instrument tracks (lead vocal, drums, bass, piano etc..). The task of music source separation is to recover these separate tracks (known as stems). This has many potential use-cases such as remixes, upmixing, active listening, educational purposes, but also pre-processing for other tasks such as transcription. Even karaoke!

This is free and open source software.


The project doesn’t recommend using conda for installing Spleeter although there’s no explanation as to why.

To avoid polluting our system, we installed Spleeter with Anaconda, a distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment. Alternatively, you may prefer using miniconda.

Download and install Anaconda using wget.

$ wget

Run the shell script:

$ bash

You’ll be asked to accept Anaconda’s license and whether to initialize Anaconda3 by running conda init. For changes to take effect, close and re-open your current shell.

Create a conda environment, and activate it.

$ conda create --name spleeter
$ conda activate spleeter

Now we install Spleeter into our conda environment with the command:

$ python3 -m pip install -U spleeter

While everything appeared to install fine, spleeter refused to use our GPU. We tried installing using Docker. There is a GPU Docker image available but this didn’t help us to resolve the issue. As an aside, the documentation for the Docker is pretty bad. For example, the project’s readme still hasn’t been updated to reflect that deezer/spleeter:3.8 still needs to be used, as the image isn’t tagged with latest.

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Jumping Jeremy
Jumping Jeremy
10 months ago

I can’t get my GPU working either with Spleeter although my 13th gen processor is still pretty speedy at processing.

It’s great for creating karaoke tracks.