Need help with source_separation?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

231 Stars 34 Forks Apache License 2.0 19 Commits 2 Opened issues


Deep learning based speech source separation using Pytorch

Services available


Need anything else?

Contributors list

# 162,786
18 commits
# 5,970
1 commit

Source Separation

Python 3.6 Hits

Synthesis Example On Colab Notebook


Source Separation is a repository to extract speeches from various recorded sounds. It focuses to adapt more real-like dataset for training models.

Main components, different things

The latest model in this repository is basically built with spectrogram based models. In mainly, Phase-aware Speech Enhancement with Deep Complex U-Net are implemented with modifications. - Complex Convolution, Masking, Weighted SDR Loss

And then, To more stable inferences in real cases, below things are adopted.

  • Audioset data is used to augment noises.

Dataset source is opened on audioset_augmentor. See this link for finding explanations about audioset. This repo used Balanced train label dataset (Label balanced, non-human classes, 18055 samples)

  • Preemphasis is used to remove high-frequency noises on adapting real samples.

It's not official implementation by authors of paper.

Singing Voice Separation

Singing Voice Separation with DSD100 dataset!* This model is trained with larger model and higher sample rate (44.1k). So it gives more stable and high quality audio. Let's checkout Youtube Playlist with samples of my favorites!

Recent Updates

  • Add Synthesis Colab Notebook Example. You can check out this on the badge or here.


You can use pre-defined preprocessing and dataset sources on


  • Python > 3.6
  • pytorch 1.0
  • ubuntu 16.04
  • Brain Cloud (Kakaobrain Cluster) V2.XLARGE (2 V100 GPUs, 28 cores cpu, 244 GB memory)

External Repositories

There are three external repositories on this repository. These will be updated to setup with recursive clone or internal codes

  • pytorch_sound package

It is built with using pytorch_sound. So that, pytorch_sound is a modeling toolkit that allows engineers to train custom models for sound related tasks. Many of sources in this repository are based on pytorch_sound template.

  • audioset_augmentor

Explained it on above section. link

For evaluation, PESQ python wrapper repository is added.

Pretrained Checkpoint

  • General Voice Source Separation

    • Model Name : refineunetbase (see
    • Link : Google Drive
  • Singing Voice Separation

  • Current Tag : v0.1.1

Predicted Samples


  • Install above external repos

You should see first of audiosetaugmentor and pytorchsound, to prepare dataset and to train separation models.

$ pip install git+
$ pip install git+[email protected]
$ pip install git+  # for evaluation code
  • Install package
$ pip install -e .


  • Train
$ python source_separation/ [YOUR_META_DIR] [SAVE_DIR] [MODEL NAME, see] [SAVE_PREFIX] [[OTHER OPTIONS...]]
  • Joint Train (Voice Bank and DSD100)
  • Synthesize
    • Be careful the differences sample rate between general case and singing voice case!
    • If you run more than one, it can help to get better result.
    • Sapmles (voice bank, dsd) are ran twice.

Single sample

$ python source_separation/ separate [INPUT_PATH] [OUTPUT_PATH] [MODEL NAME] [PRETRAINED_PATH] [[OTHER OPTIONS...]]

Whole validation samples (with evaluation)

$ python source_separation/ validate [YOUR_META_DIR] [MODEL NAME] [PRETRAINED_PATH] [[OTHER OPTIONS...]]

All samples in given directory.

$ python source_separation/ test-dir [INPUT_DIR] [OUTPUT_DIR] [MODEL NAME] [PRETRAINED_PATH] [[OTHER OPTIONS...]]


Reproduce experiments

  • General Voice Separation

    • single train code
    • Pretrained checkpoint is trained on default options
    • Above option will be changed with curriculum learning and the other tries.
  • Singing Voice Separation

    • joint train code
    • Pretrained checkpoint is trained on 4 GPUs, double (256) batch size.

Parameters and settings :

It is tuned to find out good validation WSDR loss - refineunetbase : 75M - refineunetlarger : 95M

Evaluation Scores (on validation dataset)

PESQ score is evaluated all validation dataset, but wdsr loss is picked with best loss of small subset while training is going on.

Results may vary slightly depending on the meta file, random state.

  • The validation results tend to be different from the test results.
  • Original sample rate is 22050, but PESQ needs 16k. So audios are resampled for calculating PESQ.
  • General (voice bank), 200k steps

|training type|score name| value | |:------------:|:--------:|:-----:| |without audioset|PESQ|2.346| |without audioset|wsdr loss|-0.9389| |with audioset|PESQ|2.375| |with audioset|wsdr loss|-0.9078|

  • Singing Voice Separation, 200k steps, WSDR Loss
    • Got an error for calculating PESQ on this case.

|training type| value | |:------------:|:--------:| |dsd only|-0.9593| |joint with voice bank|-0.9325|

Loss curves (Voice Bank)


Train L1 Loss curve


Valid L1 Loss curve


This repository is developed by ILJI CHOI. It is distributed under Apache License 2.0.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.