/ddsp-pytorch

Implementation of DDSP (PyTorch), Differentiable Digital Signal Processing (ICLR 2020)

Primary LanguagePythonMIT LicenseMIT

Pytorch version of DDSP

DDSP : Differentiable Digital Signal Processing

Original Authors : Jesse Engel, Lamtharn (Hanoi) Hantrakul, Chenjie Gu, Adam Roberts (Google)

This Repository is NOT an official implement of authors.

Demo Page

How to train with your own data

  1. Clone this repository
git clone https://github.com/sweetcocoa/ddsp-pytorch
  1. Prepare your own audio data. (wav, mp3, flac.. )
  2. Use ffmpeg to convert that audio's sampling rate to 16k
# example
ffmpeg -y -loglevel fatal -i $input_file -ac 1 -ar 16000 $output_file
  1. Use CREPE to precalculate the fundamental frequency of the audio.
# example
crepe directory-to-audio/ --output directory-to-audio/f0_0.004/  --viterbi --step-size 4
  1. MAKE config file. (See configuration config/violin.yaml to make appropriate config file.) And edit train/train.py
config = setup(default_config="../configs/your_config.yaml")
  1. Run train/train.py
cd train
python train.py

How to test your own model

cd train
python test.py\ 
--input input.wav\
--output output.wav\
--ckpt trained_weight.pth\
--config config/your-config.yaml\
--wave_length 16000

Download pretrained weight file

download

Contact

Equally contributed.