Skip to content

Spleeter implementation using PyTorch with support for conversion to Core ML

License

Notifications You must be signed in to change notification settings

fwcd/spleeter-pytorch

Repository files navigation

spleeter-pytorch

A small implementation of the Spleeter stem separation model in PyTorch. Using this model, audio files can be demixed into vocals, instrumentation etc.

Example

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.

Conversion to Core ML

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 the Estimator. This is due to Core ML not supporting FFT operations yet.

Note

  • 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.

Reference

License

MIT.

About

Spleeter implementation using PyTorch with support for conversion to Core ML

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages