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.

52 lines
1.9 KiB

6 years ago
  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. ## Pre-requisites
  10. 1. NVIDIA GPU + CUDA cuDNN
  11. ## Setup
  12. 1. Download and extract the [LJ Speech dataset](https://keithito.com/LJ-Speech-Dataset/)
  13. 2. Clone this repo: `git clone https://github.com/NVIDIA/tacotron2.git`
  14. 3. CD into this repo: `cd tacotron2`
  15. 4. Update .wav paths: `sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' *.txt`
  16. 5. Install [pytorch 0.4](https://github.com/pytorch/pytorch)
  17. 6. Install python requirements or use docker container (tbd)
  18. - Install python requirements: `pip install requirements.txt`
  19. - **OR**
  20. - Docker container `(tbd)`
  21. ## Training
  22. 1. `python train.py --output_directory=outdir --log_directory=logdir`
  23. 2. (OPTIONAL) `tensorboard --logdir=outdir/logdir`
  24. ## Multi-GPU (distributed) and FP16 Training
  25. 1. `python -m multiproc train.py --output_directory=/outdir --log_directory=/logdir --hparams=distributed_run=True`
  26. ## Inference
  27. 1. `jupyter notebook --ip=127.0.0.1 --port=31337`
  28. 2. load inference.ipynb
  29. ## Related repos
  30. [nv-wavenet](https://github.com/NVIDIA/nv-wavenet/): Faster than real-time
  31. wavenet inference
  32. ## Acknowledgements
  33. This implementation is inspired or uses code from the following repos:
  34. [Ryuchi Yamamoto](https://github.com/r9y9/tacotron_pytorch), [Keith
  35. Ito](https://github.com/keithito/tacotron/), [Prem Seetharaman](https://github.com/pseeth/pytorch-stft).
  36. We are thankful to the Tacotron 2 paper authors, specially Jonathan Shen,
  37. Yuxuan Wang and Zongheng Yang.