TensorSpeech / TensorFlowTTS

:stuck_out_tongue_closed_eyes: TensorFlowTTS: Real-Time State-of-the-art Speech Synthesis for Tensorflow 2 (supported including English, French, Korean, Chinese, German and Easy to adapt for other languages)
https://tensorspeech.github.io/TensorFlowTTS/
Apache License 2.0
3.85k stars 815 forks source link

Failed to run decode_parallel_wavegan.py #417

Closed monhoney closed 3 years ago

monhoney commented 3 years ago

I trained parallel wavegan model with the latest version(d3b1bc5a52f095dac9855d789d27b8cfc0ee4856) of the source. The following error occurred while decoding the model:

Traceback (most recent call last):
  File "examples/parallel_wavegan/decode_parallel_wavegan.py", line 140, in <module>
    main()
  File "examples/parallel_wavegan/decode_parallel_wavegan.py", line 117, in main
    parallel_wavegan.load_weights(args.checkpoint)
  File "/home2/mhlee/anaconda3/envs/tensortts/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 2211, in load_weights
    hdf5_format.load_weights_from_hdf5_group(f, self.layers)
  File "/home2/mhlee/anaconda3/envs/tensortts/lib/python3.7/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 677, in load_weights_from_hdf5_group
    g = f[name]
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/home2/mhlee/anaconda3/envs/tensortts/lib/python3.7/site-packages/h5py/_hl/group.py", line 264, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'tf_conv_in_upsample_net_work' doesn't exist)"

For reference, there is no problem with the model trained on the old source version(8f421003f10f61ed017d47380d034f9c3fbcae7c).

dathudeptrai commented 3 years ago

@monhoney seem the weights you are loading is wrong, it should be ok since I didn't change any code related to Parallelwavegan for a long time.

dathudeptrai commented 3 years ago

@monhoney can you try again? It should fix now.

monhoney commented 3 years ago

I received the latest version(93396e7961973b7bbe16d3beee374a988e125b9e), trained again, and I confirmed that it works. Thanks :)