Unofficial PyTorch implementation of MelGAN vocoder (training in progress)
- MelGAN is lighter, faster, and better at generalizing to unseen speakers than WaveGlow.
- This repository use identical mel-spectrogram function from NVIDIA/tacotron2, so this can be directly used to convert output from NVIDIA's tacotron2 into raw-audio.
- TODO: Planning to publish pretrained model via PyTorch Hub.
Tested on Python 3.6
pip install -r requirements.txt
- Download dataset for training. This can be any wav files with sample rate 22050Hz. (e.g. LJSpeech was used in paper)
- preprocess:
python preprocess.py -c config/default.yaml -d [data's root path]
- Edit configuration
yaml
file
python trainer.py -c [config yaml file] -n [name of the run]
tensorboard --logdir logs/
python inference.py -p [checkpoint path] -i [input mel path]
See audio samples at: http://swpark.me/melgan/.
The loss curve of G/D may look weird at first. TODO: add tensorboard image here
- Seungwon Park @ MINDsLab Inc. (yyyyy@snu.ac.kr, swpark@mindslab.ai)
- Myunchul Joe @ MINDsLab Inc.
- Rishikesh @ DeepSync Technologies Pvt Ltd.
BSD 3-Clause License.
- utils/stft.py by Prem Seetharaman (BSD 3-Clause License)
- datasets/mel2samp.py from https://github.com/NVIDIA/waveglow (BSD 3-Clause License)
- utils/hparams.py from https://github.com/HarryVolek/PyTorch_Speaker_Verification (No License specified)
- How to Train a GAN? Tips and tricks to make GANs work by Soumith Chintala
- jaywalnut310/MelGAN-Pytorch by Jaehyeon Kim