How to install Spleeter on macOS
The install guide on Spleeter's GitHub page does not go into much detail and doesn't work for most people. I have 7 years experience as a software developer and it took me a few hours and multiple attempts to get the new version of Spleeter running on macOS. I've done the hard part for you, just follow these steps and you will have Spleeter up and running in no time!
Follow each step exactly! One small mistake will result in failure.
Step 1 Install Anaconda
Download the macOS installer for Anaconda.
Once downloaded, run the installer and follow the prompts to finish the install process.
Step 2 Update Anaconda
Open the Terminal all which can be found in the Launch Pad on macOS.
Copy and paste the following command into Terminal and press enter:
conda update anaconda
Wait for the update to finish.
Step 3 Downgrade Python
Copy and paste the following command into Terminal and press enter:
conda install python=3.7
Type y for yes if prompted and wait for the install to finish.
Step 4 Install Spleeter
Copy and paste the following command into Terminal and press enter:
conda install -c conda-forge spleeter
Type y for yes if prompted and wait for the install to finish.
Step 5 Install tensorflow
Copy and paste the following command into Terminal and press enter:
pip install tensorflow==1.15
Type y for yes if prompted and wait for the install to finish.
Step 6 Update Spleeter
Copy and paste the following command into Terminal and press enter:
conda update spleeter
Type y for yes if prompted and wait for the install to finish.
Step 7 Confirm Install
Spleeter should now be installed! To test that is has been installed copy and paste the following command.
spleeter -h
This should display the help guide for Spleeter.
Now you have installed Spleeter on macOS. Congratulations! But we aren't there yet.
Sometimes even with a successful install Spleeter will still fail when you try to process a song due to missing Python modules
Step 8 Preparing to process a song
Find a song that you want to process in Finder.
In Terminal type the following command followed by a space but DON'T PRESS ENTER
cd
Now drag the containing folder of the song into Terminal
In terminal the command should now look something like this:
cd ~/Music/random_songs/my_song.mp3
Now press enter.
Step 9 Processing a song
Now that Terminal is pointing to the correct folder from step #5, we can run the Spleeter separate script.
Copy and paste the following command into Terminal but change 'my_song.mp3' to the song that you are using:
spleeter separate -i my_song.mp3 -p spleeter:2stems -o output
Let the script run. It will take a few minuets the first time. If it succeeds there will be a new folder created named 'output' in the same folder where your original song was located.