1
0
mirror of https://github.com/malarinv/tacotron2 synced 2026-03-08 09:42:34 +00:00

3 Commits

Author SHA1 Message Date
rafaelvalle
8128e0e98f using waveglow, pillow, text changes 2018-11-26 16:42:07 -08:00
rafaelvalle
e0c7e0e928 adding changes to text 2018-11-26 16:41:21 -08:00
rafaelvalle
f03692c73d cleanup, new model and waveglow 2018-11-26 16:37:44 -08:00
6 changed files with 36 additions and 45 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "waveglow"]
path = waveglow
url = https://github.com/NVIDIA/waveglow

33
README.md Executable file → Normal file
View File

@@ -1,6 +1,6 @@
# Tacotron 2 (without wavenet)
PyTorch implementation of [Natural TTS Synthesis By Conditioning
Tacotron 2 PyTorch implementation of [Natural TTS Synthesis By Conditioning
Wavenet On Mel Spectrogram Predictions](https://arxiv.org/pdf/1712.05884.pdf).
This implementation includes **distributed** and **fp16** support
@@ -11,7 +11,9 @@ Distributed and FP16 support relies on work by Christian Sarofeen and NVIDIA's
![Alignment, Predicted Mel Spectrogram, Target Mel Spectrogram](tensorboard.png)
Visit our [website] for audio samples.
[Download demo audio](https://github.com/NVIDIA/tacotron2/blob/master/demo.wav) trained on LJS and using Ryuchi Yamamoto's [pre-trained Mixture of Logistics
wavenet](https://github.com/r9y9/wavenet_vocoder/)
"Scientists at the CERN laboratory say they have discovered a new particle."
## Pre-requisites
1. NVIDIA GPU + CUDA cuDNN
@@ -22,9 +24,11 @@ Visit our [website] for audio samples.
3. CD into this repo: `cd tacotron2`
4. Update .wav paths: `sed -i -- 's,DUMMY,ljs_dataset_folder/wavs,g' filelists/*.txt`
- Alternatively, set `load_mel_from_disk=True` in `hparams.py` and update mel-spectrogram paths
5. Install [PyTorch 1.0]
5. Install [pytorch 0.4](https://github.com/pytorch/pytorch)
6. Install python requirements or build docker image
- Install python requirements: `pip install -r requirements.txt`
- **OR**
- Build docker image: `docker build --tag tacotron2 .`
## Training
1. `python train.py --output_directory=outdir --log_directory=logdir`
@@ -33,22 +37,17 @@ Visit our [website] for audio samples.
## Multi-GPU (distributed) and FP16 Training
1. `python -m multiproc train.py --output_directory=outdir --log_directory=logdir --hparams=distributed_run=True,fp16_run=True`
## Inference demo
1. Download our published [Tacotron 2] model
2. Download our published [WaveGlow] model
3. `jupyter notebook --ip=127.0.0.1 --port=31337`
4. Load inference.ipynb
## Inference
When performing Mel-Spectrogram to Audio synthesis with a WaveNet model, make sure Tacotron 2 and WaveNet were trained on the same mel-spectrogram representation. Follow these steps to use a a simple inference pipeline using griffin-lim:
1. `jupyter notebook --ip=127.0.0.1 --port=31337`
2. load inference.ipynb
N.b. When performing Mel-Spectrogram to Audio synthesis, make sure Tacotron 2
and the Mel decoder were trained on the same mel-spectrogram representation.
## Related repos
[WaveGlow](https://github.com/NVIDIA/WaveGlow) Faster than real time Flow-based
Generative Network for Speech Synthesis
[nv-wavenet](https://github.com/NVIDIA/nv-wavenet/) Faster than real time
WaveNet.
[nv-wavenet](https://github.com/NVIDIA/nv-wavenet/): Faster than real-time
wavenet inference
## Acknowledgements
This implementation uses code from the following repos: [Keith
@@ -62,7 +61,3 @@ We are thankful to the Tacotron 2 paper authors, specially Jonathan Shen, Yuxuan
Wang and Zongheng Yang.
[WaveGlow]: https://drive.google.com/file/d/1cjKPHbtAMh_4HTHmuIGNkbOkPBD9qwhj/view?usp=sharing
[Tacotron 2]: https://drive.google.com/file/d/1c5ZTuT7J08wLUoVZ2KkUs_VdZuJ86ZqA/view?usp=sharing
[pytorch 1.0]: https://github.com/pytorch/pytorch#installation
[website]: https://nv-adlr.github.io/WaveGlow

View File

@@ -164,9 +164,9 @@ def apply_gradient_allreduce(module):
param._execution_engine.queue_callback(allreduce_params)
if param.requires_grad:
param.register_hook(allreduce_hook)
def set_needs_reduction(self, input, output):
self.needs_reduction = True
module.register_forward_hook(set_needs_reduction)
return module

39
inference.ipynb Normal file → Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,4 @@
torch==0.4.0
matplotlib==2.1.0
tensorflow
numpy==1.13.3

1
waveglow Submodule

Submodule waveglow added at 4b1001fa33