deezer / deezer/spleeter

[Discussion] Separate using original training models

Open
#633 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
28.4k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

Hi! Spleeter is very useful repository! Thx!

You can refer to [the official spleeter wiki](https://github.com/deezer/spleeter/wiki/2.-Getting-started#train-model) to proceed with the training.
In this issue, I will show you the next step, how I use original models to separate test sounds.

I used the spleeter system for audio source separation of field recordings.
Specifically, I tried to classify them into **3 stems: Human / Bird / Car**.

```fish
# Train
spleeter train -p configs/***_config.json -d
# You may be get ***_model folder including checkpoint / model.ckpt-200000.data-00000-of-00001 / model.ckpt-200000.index / model.ckpt-200000.meta.
```

Move the original models to the pretrained_model folder.
```fish
# Create pretrained_model folder
mkdir pretrained_models
mkdir pretrained_models/3stems
# Move model files
mv ***_model/checkpoint pretrained_models/3stems
mv ***_model/model.ckpt-200000.data-00000-of-00001 pretrained_models/3stems
mv ***_model/model.ckpt-200000.index pretrained_models/3stems
mv ***_model/model.ckpt-200000.meta pretrained_models/3stems
mv ***_model/.probe pretrained_models/3stems
```

Embed [3stems.json](https://github.com/makobouzu/spleeter/blob/master/train/3stems.json) into the spleeter.
```fish
# Move 3stems.json
mv 3stems.json $HOME/.pyenv/versions/3.7.7/lib/python3.7/site-packages/spleeter/resources/
```

You can separate test sounds using original models.
```fish
# Separate
spleeter separate -p spleeter:3stems -o output audio_example.mp3
# You can get human.wav / bird.wav / car.wav
```

---

I couldn't find any information on how to embed it in spleeter or how to use models other than musdb, so I had to share this issue.
For detail -> [makobouzu / spleeter](https://github.com/makobouzu/spleeter)
thank you!!

> [PC Settings]
> Mac OS: Catalina
> fish
> pyenv (pyenv-virtualenv)
> python 3.7.7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.