Today I found out about spleeter by Deezer and oh. my. GOD.
I am in LOVE with this tool.
So today we're gonna look at how you can create instrumentals of your favourite music using spleeter, let's go!
First of all, install spleeter.
You can do this by simply typing
pip install spleeter into your terminal and then hitting enter.
(You'll need to have Python 3.6/3.7 installed). Then you're ready to rock!
Now we need some music with vocals that we want an instrumental of.
In this example, we're gonna grab our music from YouTube, so go ahead and install
pip install youtube-dl.
youtube-dl [link to youtube video] and hit enter. This will download your video.
As an extra step, we'll convert the video file to an audio file.
This step is completely optinal and can be omitted as spleeter can handle mp4 and webm files just fine, but I like to do it that way.
ffmpeg -i video.mp4 -f ogg -ab 192000 -vn audio.ogg (You'll need to change the filenames,
at least the one of the video) into your terminal (as always, you'll need to have ffmpeg installed) and hit that
enter key. Done!
Now we're getting to the AI stuff!
To separate your music into vocal and accompaniment tracks, just type
spleeter separate -i audio.ogg -o
audio_output -p spleeter:2stems and wait a bit!
If you want more stems, just change the number at spleeter:2stems to either 2, 4 or 5.