-
Notifications
You must be signed in to change notification settings - Fork 2.9k
5. FAQ
- Can I try Spleeter without installing it ?
- How get rid of warning messages ?
- Why produced stems are identical with the input sample ?
- Why do I have some stems not written to disk ?
- Why do I have no output produced ?
- Why are there no high frequencies in the generated output files ?
- I have an ffprobe error
- I have an Fatal error in launcher
- Can I use the models directly ?
- I have a Tensorflow error
- Does Spleeter work in Python 3.9 ?
- I have a "Can't load save_path when it is None" error
- Does Spleeter work with new Apple M1 chips ?
Yes. You can give it a try using the dedicated notebook through Google Colab.
Used dependencies, especially Numpy and Tensorflow are frozen version that we won't update for the moment, resulting in warning messages displayed while running Spleeter.
To remove such warning please check logging section.
If produced stems are identical to the input, you may think that no separation has been performed. The problem is that the library didn't found a model for performing separation and thus, do not apply any transformation to the provided sample, resulting in identical output stems.
As mentioned in the dedicated model page, model files are downloaded automatically from GitHub associated release if not found on disk. So if you have identical stems at the end it probably means that the downloading step didn't went well.
We are currently working on this to make model download associated error more reliable. Meanwhile if you can not get rid of the issue a workaround consists in downloading model archive manually from the release page
If no output is produced neither log record indicating that stems has been written to disk, it means that your separation process has been killed or crashed. The most common reason involved is a lack of memory, indeed the used model is memory intensive and requires lot of RAM available. If you can not increase your free memory a workaround is to perform separation on smaller segments of your input file and join resulting stems for each segments.
You can do that by splitting manually your input file with any library or software that allows you to edit audio file. Or you can use -d
option for setting duration :
spleeter separate -i ... -o ... -d your_duration
Which will process first your_duration
second(s) only of your sample. We will soon add a parameter for setting starting offset.
For the same reason exposed before.
The released models were trained on spectrograms up to 11kHz. The three base models (spleeter:2stems
, spleeter:4stems
and spleeter:5stems
) discard frequencies above 11kHz in the separated files.
However, there are several ways of performing separation up to 16kHz or even 22kHz:
- We released alternate config files for which the
F
parameter was set to1536
instead of1024
. The same pretrained model is used (trained with spectrograms up to 11kHz), but spectrogram estimation at separation time is then done until 16kHz. This may result in unexpected artefacts, but so far, it is the easiest and best performing way of doing separation above 11kHz. The config files are packaged under the namespleeter:2stems-16kHz
,spleeter:4stems-16kHz
andspleeter:5stems-16kHz
. You can use them straightforwardly using the-c
option:
spleeter separate -i my_audio_file.mp3 -c spleeter:4stems-16kHz -o /output/path
- You can modify some parameters in the config json file. There are actually two parameters that will affect the maximum frequency of the separated files:
- the
mask_extension
option can be set to zeros (default) or to average (see the wiki). The latter extends the mask values to the average value of the masks under 11kHz. This is a very basic way of modelling the content above 11kHz so be wary that it generates some interferences in the high frequencies. - the
F
option define the frequency dimension in frequency bin of input/output spectrogram (see the wiki). The released models were trained withF=1024
, but it is actually possible to change it to any value smaller than2048
which is a multiple of64
for separation. So you can set it to2048
to perform separation until 22kHz. Just be aware that models were not trained above 11kHz so spectrogram estimation may lead to unexpected results in this frequency range (while usually much better than basic mask extension) and that doubling the value ofF
will results in double RAM usage (and then may results in Out Of Memory errors).F=1536
(16kHz) is a good compromise between frequency bandwidth and memory usage and was chosen for the alternate config files presented above.
- the
If you run a spleeter
command and end up with an error looking like this:
WARNING:spleeter:ffprobe error (see stderr output for detail)
Then it means that the audio file could not be loaded. There are three possible reasons for that:
-
FFmpeg binary is not found (not installed, or not in OS
PATH
so executable is not found). You can check that you have a valid ffmpeg installation by running the commandffprobe <your-file.mp3>
and you should get no errors. - Your track path is not valid (meaning ffmpeg does not find your file). The input parameter of the
spleeter
command (i.e. the argument after the-i
in the command) need to be a valid relative or absolute path. Make sure your file exist and is that your input path is valid1. - Your track could not be read by ffmpeg (because it's corrupted, codec not supported, or whatever reason). Try opening your file with an audio player to check it's format and eventually try to re-encode it in another format.
1 For instance, on UNIX system (i.e Linux distribution or MacOS), if your command is
spleeter separate -i path/to/my_audio.mp3
run the commandls path/to/my_audio.mp3
and it should work. On Windows, your command should look likespleeter separate -i path\to\my_audio.mp3
. If that's confusing, we recommend that you use absolute path, for instancespleeter separate -i C:\audio\my_audio.mp3
.
It appears that sometimes the installation with conda
on Windows system has some issues that result in an error looking like this:
Fatal error in launcher: unable to create process using '"d:\bld\spleeter_XXX ...
We are aware of this and will try to fix it in upcoming versions. In the meantime you can just replace the spleeter
shortcut by python -m spleeter
in your command. For instance intead of:
spleeter separate -i my_audio_file.mp3 -c spleeter:4stems -o /output/path
try:
python -m spleeter separate -i my_audio_file.mp3 -c spleeter:4stems -o /output/path
and it should work.
Spleeter relies on Tensorflow for most of its computation. Depending on your setup (e.g. GPU availability, CPU type and Operating System) tensorflow may or may not be easy to install and have running.
If the spleeter separate
command fails with a Failed to load the native tensorflow runtime
you will probably need to adapt the installation to your system as described here.
If you want to use the pre-trained models directly (that is, without using the python code of spleeter
) there are some steps to follow summarized in this discussion. If you want to run the inference in C++, you can take a look at this repo.
As of current version (2.2.x) Spleeter relies on tensorflow 2, which has not been ported to Python 3.9. Therefore you can't run Spleeter in python 3.9. If you encounter installation issues, please check that you're using a compatible version of python (3.6, 3.7 or 3.8) and consider using a virtualenv.
Sometimes the pretrained
model are not correctly downloaded or found by spleeter which leads to a Can't load save_path when it is None
error. This can happen for instance if the folder pretrained_models/2stems/
(or 4stems or 5stems) exists but does not contain a file named pretrained_models/2stems/model.data-00000-of-00001
. If that's your case, just remove completely the folder pretrained_models
and run spleeter. it will download everything again and hopefully solve your issue.
Some users have reported issues when trying to run Spleeter on mac computers with M1 chips. For now we can recommend you this workaround