Separate vocals and background Music from an audio file using Python | Spleeter

Separate vocals and background Music from an audio file using Python | Spleeter
Hello folks!  Music streaming apps come with an option that plays only the background of a music file. We can see this mainly in the Karaoke apps. Spleeter is a library developed by Deezer using Tensorflow, that can be used to separate background, vocal from a music file.


Seperate vocals and background Music from an audio file using Python | Spleeter


Let us install spleeter using pip.
pip install spleeter
Now its time to work with an audio file. For now, we will use sample music from the repo.
wget https://github.com/deezer/spleeter/raw/master/audio_example.mp3

Its time to split the audio file
spleeter separate -i audio_example.mp3 -o output/
Now navigate to the output folder
ls output/audio_example
we will have two output music files
Vocals.wav

accompaniment.wav