wavenet_vocoder icon indicating copy to clipboard operation
wavenet_vocoder copied to clipboard

Tacotron2 TTS demo: Adapt to the latest tensorflow

Open r9y9 opened this issue 5 years ago • 13 comments

It seems there's no clean way to downgrade tensorflow on google colab, so we might need to update https://github.com/r9y9/Tacotron-2 to make it run on the latest tensorflow.

r9y9 avatar Sep 29 '18 08:09 r9y9

Up vote!

sandeepnedeng avatar Sep 30 '18 09:09 sandeepnedeng

Actually for me adding ! pip install "tensorflow<=1.9.0" worked.

But I agree about the "clean" thing ;)

m-toman avatar Sep 30 '18 09:09 m-toman

If you want to use GPU in mel generation in COLAB, eliminate current tensorflow 1.12r0x and re-install tensorflow-gpu==1.9.0 However, it requires to install exactly matching CUDA libraries. so below script you could some CUDA libraries which COLAB didn't included such as cublas-9.0

before git clone the files run below script. it take 10 minutes to prepare jupyter each time. It's temporal solution before current tf tacotron2 implementation support tensorflow 1.12.x,

%%bash
nvidia-smi
pip3 uninstall -y tensorflow tensorflow-gpu pytorch torch
rm -rf cuda-repo*
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb
apt-get install dirmngr
dpkg -i cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64-deb
apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
apt-get update
apt-get install  -y --no-install-recommends  \
 cuda-core-9-0 \
 cuda-cublas-9-0 cuda-cublas-dev-9-0 cuda-cudart-9-0 cuda-cudart-dev-9-0 \
 cuda-cufft-9-0 cuda-cufft-dev-9-0 cuda-curand-9-0 cuda-curand-dev-9-0 \
 cuda-cusolver-9-0 cuda-cusolver-dev-9-0 cuda-cusparse-9-0 \
 cuda-cusparse-dev-9-0 \
 cuda-libraries-9-0 cuda-libraries-dev-9-0 \
 cuda-misc-headers-9-0 cuda-npp-9-0 cuda-npp-dev-9-0 \
 cuda-nvgraph-9-0 cuda-nvgraph-dev-9-0 cuda-nvml-dev-9-0 cuda-nvrtc-9-0 \
 cuda-nvrtc-dev-9-0
rm -rf cuda-repo*
rm -rf wget-log*
pip3 install -q tensorflow-gpu==1.9.0  
pip3 install -q torch

it takes about 17 min x 2 to generate 'good job wavenet'
0%| | 3/26624 [00:00<15:42, 28.26it/s] 0 good job wavenet 100%|██████████| 26624/26624 [16:01<00:00, 27.70it/s]

yhgon avatar Oct 29 '18 17:10 yhgon

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 30 '19 01:05 stale[bot]

somebody get working the google colab notebook?

japita-se avatar Aug 22 '19 11:08 japita-se

Didn't it work?

r9y9 avatar Aug 22 '19 13:08 r9y9

btw I'm unlikely to have time to do this for a while... pretty busy recently.

r9y9 avatar Aug 22 '19 13:08 r9y9

! pip install tensorflow==1.6 ! pip install keras==2.2.0

@japita-se I've tried this and it works.

MohammadJavadD avatar Apr 18 '20 00:04 MohammadJavadD

Hi @r9y9, I almost have done this. How do you want to update that? I mean a new branch or what?

MohammadJavadD avatar Apr 22 '20 04:04 MohammadJavadD

@MohammadJavadD HI, thank you for working on this. If the changes are only for the notebook, I would appreciate it if you make a PR to https://github.com/r9y9/Colaboratory.

Did you make changes to Tacotron2 code as well?

r9y9 avatar Apr 22 '20 12:04 r9y9

@MohammadJavadD HI, thank you for working on this. If the changes are only for the notebook, I would appreciate it if you make a PR to https://github.com/r9y9/Colaboratory.

Did you make changes to Tacotron2 code as well?

@r9y9 The problem is tf.compat which have used on both Tacotron2 and WaveNet_vocoder so I followed what was done on WaveNet_vocoder newest version (Copying module) so all three repos need to change a bit. Also, the params.py file has changed in the different versions of WaveNet_vocoder (builder parameter).

MohammadJavadD avatar Apr 22 '20 17:04 MohammadJavadD

The current codelab demo is not working, any updates here?

do-web avatar May 05 '21 21:05 do-web

https://colab.research.google.com/drive/1EPoNkTHIyYeLq_fZZY5HS1ecjCUQEGvg?usp=sharing

That one works on my end, but it uses TF 1.x instead of TF 2.x. I just removed/adjusted the code where it needed to.

qwertyuu avatar Oct 13 '21 21:10 qwertyuu