Phase and magnitude aware model for music source separation
separator
‒ main source code with model and dataset implementations and code to train model.streaming
‒ source code inference tf-lite version model.
If you don't have Docker installed, please follow the links to find installation instructions for Ubuntu, Mac or Windows.
Build docker image:
docker build -t pmunet .
Run docker image:
bash run_docker.sh
Used dataset MUSDB18-HQ.
The dataset consists of 150 full-length stereo tracks sampled at 44.1 kHz. providing a complete audio mix and four main elements: ”vocal”, ”bass”, ”drums” and ”other” for each sample, which can be considered as a target in the context of source separation. The kit structure offers 100 training compositions and 50 validation compositions
- Configure arguments in
separator/config/config.py
. cd separator
.- Run
python3 separator/pl_model.py
.
- Configure arguments in
separator/config/config.py
. cd separator
.python3 inference.py [-IO]
-I
specify path to mixture,-O
output dir, both of them optional.
By default script loads .pt
file with weights and sample.wav
from google drive.
python3 inference.py -I path/to/mix -O out_dir
With successful script run four audio files (vocals.wav
and drums.wav
, bass.wav
, other.wav
) will be in out_dir
. By default in separator/inference/output
.
You can download weights manually
Download one the .pt file below:
In streaming section located scripts for: convert model to tflite
format and run tflite
model in "stream mode"
.
- Configure arguments in
streaming/config/config.py
. cd streaming
.python3 runner.py