- 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 ?
Can I try it without installing it ?
Yes. You can give it a try using the dedicated notebook through Google Colab.
How get rid of warning messages ?
To remove such warning please check logging section.
Why produced stems are identical with the input sample ?
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
Why do I have no output produced ?
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.
Why do I have some stems not written to disk ?
For the same reason exposed before.
Why are there no high frequencies in the generated output files ?
The released models were trained on spectrograms up to 11kHz. The three base models (
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
Fparameter was set to
1024. 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 name
spleeter:5stems-16kHz. You can use them straightforwardly using the
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:
mask_extensionoption 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.
Foption define the frequency dimension in frequency bin of input/output spectrogram (see the wiki). The released models were trained with
F=1024, but it is actually possible to change it to any value smaller than
2048which is a multiple of
64for separation. So you can set it to
2048to 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 of
Fwill 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.
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
PATHso executable is not found). You can check that you have a valid ffmpeg installation by running the command
ffprobe <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
spleetercommand (i.e. the argument after the
-iin 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.mp3run the command
ls path/to/my_audio.mp3and it should work. On Windows, your command should look like
spleeter separate -i path\to\my_audio.mp3. If that's confusing, we recommend that you use absolute path, for instance
spleeter 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
python -m spleeter separate -i my_audio_file.mp3 -c spleeter:4stems -o /output/path
and it should work.
Using Models directly
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.