Files
spleeter/README.md

130 lines
7.9 KiB
Markdown
Raw Normal View History

2020-03-31 01:00:21 +02:00
<img src="https://github.com/deezer/spleeter/raw/master/images/spleeter_logo.png" height="80" />
2019-09-26 17:44:18 +02:00
[![Github actions](https://github.com/deezer/spleeter/workflows/pytest/badge.svg)](https://github.com/deezer/spleeter/actions) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/spleeter) [![PyPI version](https://badge.fury.io/py/spleeter.svg)](https://badge.fury.io/py/spleeter) [![Conda](https://img.shields.io/conda/vn/deezer-research/spleeter)](https://anaconda.org/deezer-research/spleeter) [![Docker Pulls](https://img.shields.io/docker/pulls/deezer/spleeter)](https://hub.docker.com/deezer/spleeter) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/deezer/spleeter/blob/master/spleeter.ipynb) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/spleeter/community) [![status](https://joss.theoj.org/papers/259e5efe669945a343bad6eccb89018b/status.svg)](https://joss.theoj.org/papers/259e5efe669945a343bad6eccb89018b)
2019-11-14 13:16:14 -05:00
2021-01-08 18:27:42 +01:00
> :warning: [Spleeter 2.1.0](https://pypi.org/project/spleeter/) release introduces some breaking changes, including new CLI option naming for input, and the drop
> of dedicated GPU package. Please read [CHANGELOG](CHANGELOG.md) for more details.
2019-10-28 14:12:13 +01:00
## About
2019-09-26 17:44:18 +02:00
2020-10-09 17:53:14 +02:00
**Spleeter** is [Deezer](https://www.deezer.com/) source separation library with pretrained models
2019-11-02 20:05:00 +01:00
written in [Python](https://www.python.org/) and uses [Tensorflow](https://tensorflow.org/). It makes it easy
2019-10-28 14:12:13 +01:00
to train source separation model (assuming you have a dataset of isolated sources), and provides
already trained state of the art model for performing various flavour of separation :
* Vocals (singing voice) / accompaniment separation ([2 stems](https://github.com/deezer/spleeter/wiki/2.-Getting-started#using-2stems-model))
* Vocals / drums / bass / other separation ([4 stems](https://github.com/deezer/spleeter/wiki/2.-Getting-started#using-4stems-model))
* Vocals / drums / bass / piano / other separation ([5 stems](https://github.com/deezer/spleeter/wiki/2.-Getting-started#using-5stems-model))
2020-05-25 23:05:40 +02:00
2 stems and 4 stems models have [high performances](https://github.com/deezer/spleeter/wiki/Separation-Performances) on the [musdb](https://sigsep.github.io/datasets/musdb.html) dataset. **Spleeter** is also very fast as it can perform separation of audio files to 4 stems 100x faster than real-time when run on a GPU.
2019-10-28 14:27:20 +01:00
We designed **Spleeter** so you can use it straight from [command line](https://github.com/deezer/spleeter/wiki/2.-Getting-started#usage)
2021-03-05 14:31:20 +01:00
as well as directly in your own development pipeline as a [Python library](https://github.com/deezer/spleeter/wiki/4.-API-Reference#separator). It can be installed with [pip](https://github.com/deezer/spleeter/wiki/1.-Installation#using-pip) or be used with
2019-10-28 14:12:13 +01:00
[Docker](https://github.com/deezer/spleeter/wiki/2.-Getting-started#using-docker-image).
2020-10-09 17:53:14 +02:00
### Projects and Softwares using **Spleeter**
Since it's been released, there are multiple forks exposing **Spleeter** through either a Guided User Interface (GUI) or a standalone free or paying website. Please note that we do not host, maintain or directly support any of these initiatives.
That being said, many cool projects have been built on top of ours. Notably the porting to the *Ableton Live* ecosystem through the [Spleeter 4 Max](https://github.com/diracdeltas/spleeter4max#spleeter-for-max) project.
**Spleeter** pre-trained models have also been used by professionnal audio softwares. Here's a non-exhaustive list:
* [iZotope](https://www.izotope.com/en/shop/rx-8-standard.html) in its *Music Rebalance* feature within **RX 8**
* [SpectralLayers](https://new.steinberg.net/spectralayers/) in its *Unmix* feature in **SpectralLayers 7**
* [Acon Digital](https://acondigital.com/products/acoustica-audio-editor/) within **Acoustica 7**
* [VirtualDJ](https://www.virtualdj.com/stems/) in their stem isolation feature
* [Algoriddim](https://www.algoriddim.com/apps) in their **NeuralMix** and **djayPRO** app suite
2020-03-31 00:56:14 +02:00
## Quick start
2020-10-09 17:53:14 +02:00
Want to try it out but don't want to install anything ? We have set up a [Google Colab](https://colab.research.google.com/github/deezer/spleeter/blob/master/spleeter.ipynb).
2019-10-28 14:12:13 +01:00
2021-03-05 14:31:20 +01:00
Ready to dig into it ? In a few lines you can install **Spleeter** and separate the vocal and accompaniment parts from an example audio file.
You need first to install `ffmpeg` and `libsndfile`. It can be done on most platform using [Conda](https://github.com/deezer/spleeter/wiki/1.-Installation#using-conda):
2019-10-28 14:12:13 +01:00
```bash
2021-03-05 14:31:20 +01:00
# install dependencies using conda
conda install -c conda-forge ffmpeg libsndfile
# install spleeter with pip
pip install spleeter
2020-04-01 22:29:46 +02:00
# download an example audio file (if you don't have wget, use another tool for downloading)
2020-03-31 00:56:14 +02:00
wget https://github.com/deezer/spleeter/raw/master/audio_example.mp3
2020-04-01 17:09:42 +02:00
# separate the example audio into two components
2021-01-08 18:27:42 +01:00
spleeter separate -p spleeter:2stems -o output audio_example.mp3
2019-10-28 14:12:13 +01:00
```
2021-03-05 14:31:20 +01:00
> :warning: Note that we no longer recommend using `conda` for installing spleeter.
2019-10-28 14:12:13 +01:00
2020-03-31 00:56:14 +02:00
You should get two separated audio files (`vocals.wav` and `accompaniment.wav`) in the `output/audio_example` folder.
2019-12-18 15:32:13 +01:00
For a detailed documentation, please check the [repository wiki](https://github.com/deezer/spleeter/wiki/1.-Installation)
2019-12-18 15:32:13 +01:00
2020-10-09 17:53:14 +02:00
## Development and Testing
2019-10-28 14:12:13 +01:00
2021-01-08 18:27:42 +01:00
This project is managed using [Poetry](https://python-poetry.org/docs/basic-usage/), to run test suite you
can execute the following set of commands:
2019-11-05 22:21:53 +01:00
2020-03-31 00:56:14 +02:00
```bash
2021-01-08 18:27:42 +01:00
# Clone spleeter repository
git clone https://github.com/Deezer/spleeter && cd spleeter
2021-01-08 18:27:42 +01:00
# Install poetry
pip install poetry
# Install spleeter dependencies
poetry install
# Run unit test suite
poetry run pytest tests/
2020-03-31 00:56:14 +02:00
```
2020-03-31 00:56:14 +02:00
## Reference
2020-03-31 00:56:14 +02:00
* Deezer Research - Source Separation Engine Story - deezer.io blog post:
* [English version](https://deezer.io/releasing-spleeter-deezer-r-d-source-separation-engine-2b88985e797e)
* [Japanese version](http://dzr.fm/splitterjp)
* [Music Source Separation tool with pre-trained models / ISMIR2019 extended abstract](http://archives.ismir.net/ismir2019/latebreaking/000036.pdf)
2019-10-28 14:12:13 +01:00
If you use **Spleeter** in your work, please cite:
2019-10-28 16:20:27 +01:00
```BibTeX
@article{spleeter2020,
doi = {10.21105/joss.02154},
url = {https://doi.org/10.21105/joss.02154},
year = {2020},
publisher = {The Open Journal},
volume = {5},
number = {50},
pages = {2154},
author = {Romain Hennequin and Anis Khlif and Felix Voituret and Manuel Moussallam},
title = {Spleeter: a fast and efficient music source separation tool with pre-trained models},
journal = {Journal of Open Source Software},
note = {Deezer Research}
2019-10-28 14:12:13 +01:00
}
```
## License
2020-03-31 00:56:14 +02:00
2020-05-24 23:06:25 +02:00
The code of **Spleeter** is [MIT-licensed](LICENSE).
2019-10-28 14:12:13 +01:00
2019-11-04 10:32:29 +01:00
## Disclaimer
2020-03-31 00:56:14 +02:00
2020-10-09 17:53:14 +02:00
If you plan to use **Spleeter** on copyrighted material, make sure you get proper authorization from right owners beforehand.
2020-03-31 00:56:14 +02:00
## Troubleshooting
2020-10-09 17:53:14 +02:00
**Spleeter** is a complex piece of software and although we continously try to improve and test it you may encounter unexpected issues running it. If that's the case please check the [FAQ page](https://github.com/deezer/spleeter/wiki/5.-FAQ) first as well as the list of [currently open issues](https://github.com/deezer/spleeter/issues)
2020-03-31 00:56:14 +02:00
### Windows users
It appears that sometimes the shortcut command `spleeter` does not work properly on windows. This is a known issue that we will hopefully fix soon. In the meantime replace `spleeter separate` by `python -m spleeter separate` in command line and it should work.
## Contributing
2020-10-09 17:53:14 +02:00
If you would like to participate in the development of **Spleeter** you are more than welcome to do so. Don't hesitate to throw us a pull request and we'll do our best to examine it quickly. Please check out our [guidelines](.github/CONTRIBUTING.md) first.
2020-03-31 00:56:14 +02:00
2019-10-28 14:12:13 +01:00
## Note
2020-03-31 00:56:14 +02:00
2019-10-28 14:12:13 +01:00
This repository include a demo audio file `audio_example.mp3` which is an excerpt
from Slow Motion Dream by Steven M Bryant (c) copyright 2011 Licensed under a Creative
2020-03-31 00:56:14 +02:00
Commons Attribution (3.0) [license](http://dig.ccmixter.org/files/stevieb357/34740)
2019-10-28 14:12:13 +01:00
Ft: CSoul,Alex Beroza & Robert Siekawitch