You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.4 KiB

  1. # Tacotron 2 (without wavenet)
  2. Tacotron 2 PyTorch implementation of [Natural TTS Synthesis By Conditioning
  3. Wavenet On Mel Spectrogram Predictions](https://arxiv.org/pdf/1712.05884.pdf).
  4. This implementation includes **distributed** and **fp16** support
  5. and uses the [LJSpeech dataset](https://keithito.com/LJ-Speech-Dataset/).
  6. Distributed and FP16 support relies on work by Christian Sarofeen and NVIDIA's
  7. [Apex Library](https://github.com/nvidia/apex).
  8. ![Alignment, Predicted Mel Spectrogram, Target Mel Spectrogram](tensorboard.png)
  9. [Demo audio](https://github.com/NVIDIA/tacotron2/blob/master/demo.wav) using Ryuchi Yamamoto's [pre-trained Mixture of Logistics
  10. wavenet](https://github.com/r9y9/wavenet_vocoder/)
  11. "Scientists at the CERN laboratory say they have discovered a new particle."
  12. ## Pre-requisites
  13. 1. NVIDIA GPU + CUDA cuDNN
  14. ## Setup
  15. 1. Download and extract the [LJ Speech dataset](https://keithito.com/LJ-Speech-Dataset/)
  16. 2. Clone this repo: `git clone https://github.com/NVIDIA/tacotron2.git`
  17. 3. CD into this repo: `cd tacotron2`
  18. 4. Update .wav paths: `sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' filelists/*.txt`
  19. - Alternatively, set `load_mel_from_disk=True` in `hparams.py` and update mel-spectrogram paths
  20. 5. Install [pytorch 0.4](https://github.com/pytorch/pytorch)
  21. 6. Install python requirements or build docker image
  22. - Install python requirements: `pip install -r requirements.txt`
  23. - **OR**
  24. - Build docker image: `docker build --tag tacotron2 .`
  25. ## Training
  26. 1. `python train.py --output_directory=outdir --log_directory=logdir`
  27. 2. (OPTIONAL) `tensorboard --logdir=outdir/logdir`
  28. ## Multi-GPU (distributed) and FP16 Training
  29. 1. `python -m multiproc train.py --output_directory=outdir --log_directory=logdir --hparams=distributed_run=True,fp16_run=True`
  30. ## Inference
  31. 1. `jupyter notebook --ip=127.0.0.1 --port=31337`
  32. 2. load inference.ipynb
  33. ## Related repos
  34. [nv-wavenet](https://github.com/NVIDIA/nv-wavenet/): Faster than real-time
  35. wavenet inference
  36. ## Acknowledgements
  37. This implementation uses code from the following repos: [Keith
  38. Ito](https://github.com/keithito/tacotron/), [Prem
  39. Seetharaman](https://github.com/pseeth/pytorch-stft) as described in our code.
  40. We are inspired by [Ryuchi Yamamoto's](https://github.com/r9y9/tacotron_pytorch)
  41. Tacotron PyTorch implementation.
  42. We are thankful to the Tacotron 2 paper authors, specially Jonathan Shen, Yuxuan
  43. Wang and Zongheng Yang.