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.

56 lines
2.1 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. ## 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' filelists/*.txt`
  16. - Alternatively, set `load_mel_from_disk=True` in `hparams.py` and update mel-spectrogram paths
  17. 5. Install [pytorch 0.4](https://github.com/pytorch/pytorch)
  18. 6. Install python requirements or build docker image
  19. - Install python requirements: `pip install -r requirements.txt`
  20. - **OR**
  21. - Build docker image: `docker build --tag tacotron2 .`
  22. ## Training
  23. 1. `python train.py --output_directory=outdir --log_directory=logdir`
  24. 2. (OPTIONAL) `tensorboard --logdir=outdir/logdir`
  25. ## Multi-GPU (distributed) and FP16 Training
  26. 1. `python -m multiproc train.py --output_directory=outdir --log_directory=logdir --hparams=distributed_run=True,fp16_run=True`
  27. ## Inference
  28. 1. `jupyter notebook --ip=127.0.0.1 --port=31337`
  29. 2. load inference.ipynb
  30. ## Related repos
  31. [nv-wavenet](https://github.com/NVIDIA/nv-wavenet/): Faster than real-time
  32. wavenet inference
  33. ## Acknowledgements
  34. This implementation uses code from the following repos: [Keith
  35. Ito](https://github.com/keithito/tacotron/), [Prem
  36. Seetharaman](https://github.com/pseeth/pytorch-stft) as described in our code.
  37. We are inspired by [Ryuchi Yamamoto's](https://github.com/r9y9/tacotron_pytorch)
  38. Tacotron PyTorch implementation.
  39. We are thankful to the Tacotron 2 paper authors, specially Jonathan Shen, Yuxuan
  40. Wang and Zongheng Yang.