A small implementation of the Spleeter stem separation model in PyTorch. Using this model, audio files can be demixed into vocals, instrumentation etc.
Install the package using pip3 install .
, then run
spleeter-pytorch audio-example.mp3
to separate the example file. The output will be located in output/stems
.
The non-FFT parts of the Spleeter model can be converted to Core ML, for efficient inference on macOS/iOS devices. To perform the conversion, run
./convert-to-coreml
The .mlpackage
will be located under output/coreml
.
Note: The converted model corresponds to the
Separator
module and still requires the consumer of the model to manually perform the STFT conversion as performed in theEstimator
. This is due to Core ML not supporting FFT operations yet.
- Currently this is only tested with the 2stems model. Feel free to get one of the other models and test it on them.
- There might be some bugs, the quality of output isn't as good as the original. If someone found the reason, please open a pull request. Thanks.
MIT.