Rayhane-mamah / Tacotron-2

DeepMind's Tacotron-2 Tensorflow implementation
MIT License
2.28k stars 904 forks source link

Tacotron-2 mandrain-new branch demo wrong #341

Open unikcc opened 5 years ago

unikcc commented 5 years ago

Traceback (most recent call last): File "demo_server.py", line 86, in synth.load(checkpoint_path, modified_hp) File "//PycharmProjects/Tacotron-2/tacotron/synthesizer.py", line 28, in load self.model.initialize(inputs, input_lengths) File "/PycharmProjects/Tacotron-2/tacotron/models/tacotron.py", line 64, in initialize p_inputs = tf.py_func(split_func, [inputs, split_infos[:, 0]], lout_int) TypeError: 'NoneType' object is not subscriptable @begeekmyfriend Hi, I get trouble with run your mandarin-new demo_server.py, I pull the lateset code, but It doesn't work. Seems hard to execute

begeekmyfriend commented 5 years ago

I have changed something with this model, did you train with this fork from scratch?

unikcc commented 5 years ago

I have changed something with this model, did you train with this fork from scratch? Yes, I train it from scratch.. Since the default value of split_info is None, how can it be subscripted when the model is initialized. Or there's sth not committed

begeekmyfriend commented 5 years ago

I am using griffin-lim branch which does not contain split_infos and have implemented batch synthesis on it and merged into mandarin-new branch. I am afraid there is something in code not compitable with that branch. Sorry about it.

superhg2012 commented 5 years ago

on branch mandarin-world-vocoder, if I change max_frame_num to 800, what effect will cause? I am using Biaobei 10000 corpus. 750 can only keep less than 5000 wav files. @begeekmyfriend

begeekmyfriend commented 5 years ago

It depends on the frame period that equals to frame shift you are setting. The time length equals frame number multiply frame period.

superhg2012 commented 5 years ago

many thanks !!

superhg2012 commented 5 years ago

Hi, @begeekmyfriend , accouding to your explaination, in corpus : max_time length = max_frame_num frame_period, max_time_length = 750 0.015 = 11.25, but according to my statistics, the longest wav is 8.3s,is there something wrong?

begeekmyfriend commented 5 years ago

max_frame_num is just a threshold, not the actual length of your wav clip.

superhg2012 commented 5 years ago

all right! I get it. Another issue, I use the latest pysptk package, occurs an error : mgc2sp() got an unexpected keyword argument 'order, so which version of pysptk you used in the mandarin-world-vocoder branch? The latest pysptk mgc2sp function does not contain the order parameter. And I did not found the pysptk in requirement.txt config file. @begeekmyfriend

begeekmyfriend commented 5 years ago

@superhg2012 You need to copy the built so library into the python environment path manually.

python setup.py build
superhg2012 commented 5 years ago

@superhg2012 You need to copy the built so library into the python environment path manually. python setup.py build

Hi, @begeekmyfriend I am runing your code on mandarin-world-vocoder branch, In this branch, the pysptk package used as below as : def sp_denormalize(x, hparams): sp = pysptk.sptk.mgc2sp(x.astype(np.float64), order=hparams.num_mgc - 1, alpha=hparams.mcep_alpha, gamma=0.0, fftlen=hparams.fft_size) return np.square(sp / int16_max) there is parameter order. I use pip install pysptk to install the latest pysptk, and run into error : mgc2sp() got an unexpected keyword argument 'order, which mean you use an old version of pysptk. That's what I mean.

begeekmyfriend commented 5 years ago

Is your branch of pysptk right?

superhg2012 commented 5 years ago

Is your branch of pysptk right?

sorry, I use the https://github.com/r9y9/pysptk this master branch

begeekmyfriend commented 5 years ago

I mean https://github.com/begeekmyfriend/pysptk

superhg2012 commented 5 years ago

I mean https://github.com/begeekmyfriend/pysptk

I pulled this branch and run python setup.py build, but encouned a complition error: pysptk/_sptk.c:523:18: fatal error: SPTK.h: No such file or directory compilation terminated. no idea to fix this...

begeekmyfriend commented 5 years ago
git submodule update --init
superhg2012 commented 5 years ago

git submodule update --init

it works, thanks!!

ZLZ-Nancy commented 5 years ago

I have changed something with this model, did you train with this fork from scratch? Yes, I train it from scratch.. Since the default value of split_info is None, how can it be subscripted when the model is initialized. Or there's sth not committed

I have a question about 'I train it from scratch' ,what does this mean? thanks for your apply!!!!

tongchangD commented 5 years ago

I have changed something with this model, did you train with this fork from scratch? Yes, I train it from scratch.. Since the default value of split_info is None, how can it be subscripted when the model is initialized. Or there's sth not committed

For this question, how do you deal with it in the end?

begeekmyfriend commented 5 years ago

The model of my fork is different from this upstream project and therefore we hold different training parameters. The pretrained model can not be run on my fork.

chmh19961030 commented 5 years ago

I also met this problem when I was trying to do tacotron GTA Synthesis to create data needed for Wavenet Training. It seems that it can not load the checkpoint properly during synthesis. I'm trying to fix this problem by retraining Tacotron using training_data and T2 code by Rayhane-mamah.

chmh19961030 commented 5 years ago

I think I've found a problem here. I tried to fix the error in tacotron GTA Synthesis. After fixing some small errors I found a bigger one. before mel out it is OK, but:

mel out: (?, ?, 80)

out: (?, ?) Tacotron Parameters 27.321 Million. Loading checkpoint: logs-Tacotron-2/taco_pretrained/tacotron_model.ckpt-105000 Traceback (most recent call last): File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call return fn(*args) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1317, in _run_fn self._extend_graph() File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1352, in _extend_graph tf_session.ExtendSession(self._session) tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation model/inference/decoder/TensorArray_2: Could not satisfy explicit device specification '' because the node {{colocation_node model/inference/decoder/TensorArray_2}} was colocated with a group of nodes that required incompatible device '/device:GPU:0' Colocation Debug Info: Colocation group had the following types and devices: TensorArrayGatherV3: GPU CPU XLA_CPU XLA_GPU Const: GPU CPU XLA_CPU XLA_GPU TensorArraySizeV3: CPU XLA_CPU XLA_GPU TensorArrayWriteV3: CPU XLA_CPU XLA_GPU Range: GPU CPU XLA_CPU XLA_GPU Tile: GPU CPU XLA_CPU XLA_GPU Enter: CPU XLA_CPU XLA_GPU TensorArrayV3: CPU XLA_CPU XLA_GPU Colocation members and user-requested devices: model/inference/decoder/TensorArray_2 (TensorArrayV3) model/inference/decoder/while/CustomDecoderStep/Tile (Tile) /device:GPU:0 model/inference/decoder/while/TensorArrayWrite_2/TensorArrayWriteV3/Enter (Enter) /device:GPU:0 model/inference/decoder/while/TensorArrayWrite_2/TensorArrayWriteV3 (TensorArrayWriteV3) /device:GPU:0 model/inference/decoder/TensorArrayStack_2/TensorArraySizeV3 (TensorArraySizeV3) model/inference/decoder/TensorArrayStack_2/range/start (Const) model/inference/decoder/TensorArrayStack_2/range/delta (Const) model/inference/decoder/TensorArrayStack_2/range (Range) model/inference/decoder/TensorArrayStack_2/TensorArrayGatherV3 (TensorArrayGatherV3) [[{{node model/inference/decoder/TensorArray_2}}]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "train.py", line 138, in main() File "train.py", line 132, in main train(args, log_dir, hparams) File "train.py", line 67, in train input_path = tacotron_synthesize(args, hparams, checkpoint) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/synthesize.py", line 119, in tacotron_synthesize return run_synthesis(args, checkpoint_path, output_dir, hparams) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/synthesize.py", line 82, in run_synthesis synth.load(checkpoint_path, hparams, gta=GTA) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/synthesizer.py", line 55, in load self.session.run(tf.global_variables_initializer()) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run run_metadata) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation model/inference/decoder/TensorArray_2: Could not satisfy explicit device specification '' because the node node model/inference/decoder/TensorArray_2 (defined at /home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/models/tacotron.py:170) having device No device assignments were active during op 'model/inference/decoder/TensorArray_2' creation. was colocated with a group of nodes that required incompatible device '/device:GPU:0' Colocation Debug Info: Colocation group had the following types and devices: TensorArrayGatherV3: GPU CPU XLA_CPU XLA_GPU Const: GPU CPU XLA_CPU XLA_GPU TensorArraySizeV3: CPU XLA_CPU XLA_GPU TensorArrayWriteV3: CPU XLA_CPU XLA_GPU Range: GPU CPU XLA_CPU XLA_GPU Tile: GPU CPU XLA_CPU XLA_GPU Enter: CPU XLA_CPU XLA_GPU TensorArrayV3: CPU XLA_CPU XLA_GPU Colocation members and user-requested devices: model/inference/decoder/TensorArray_2 (TensorArrayV3) model/inference/decoder/while/CustomDecoderStep/Tile (Tile) /device:GPU:0 model/inference/decoder/while/TensorArrayWrite_2/TensorArrayWriteV3/Enter (Enter) /device:GPU:0 model/inference/decoder/while/TensorArrayWrite_2/TensorArrayWriteV3 (TensorArrayWriteV3) /device:GPU:0 model/inference/decoder/TensorArrayStack_2/TensorArraySizeV3 (TensorArraySizeV3) model/inference/decoder/TensorArrayStack_2/range/start (Const) model/inference/decoder/TensorArrayStack_2/range/delta (Const) model/inference/decoder/TensorArrayStack_2/range (Range) model/inference/decoder/TensorArrayStack_2/TensorArrayGatherV3 (TensorArrayGatherV3) [[node model/inference/decoder/TensorArray_2 (defined at /home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/models/tacotron.py:170) ]] No node-device colocations were active during op 'model/inference/decoder/TensorArray_2' creation. No device assignments were active during op 'model/inference/decoder/TensorArray_2' creation. Caused by op 'model/inference/decoder/TensorArray_2', defined at: File "train.py", line 138, in main() File "train.py", line 132, in main train(args, log_dir, hparams) File "train.py", line 67, in train input_path = tacotron_synthesize(args, hparams, checkpoint) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/synthesize.py", line 119, in tacotron_synthesize return run_synthesis(args, checkpoint_path, output_dir, hparams) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/synthesize.py", line 82, in run_synthesis synth.load(checkpoint_path, hparams, gta=GTA) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/synthesizer.py", line 27, in load self.model.initialize(inputs, input_lengths, targets, gta=gta, split_infos=split_infos) File "/home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/models/tacotron.py", line 170, in initialize swap_memory=hp.tacotron_swap_with_cpu) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/contrib/seq2seq/python/ops/decoder.py", line 242, in dynamic_decode decoder.output_dtype) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/util/nest.py", line 381, in map_structure structure[0], [func(*x) for x in entries]) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/util/nest.py", line 381, in structure[0], [func(*x) for x in entries]) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/contrib/seq2seq/python/ops/decoder.py", line 239, in _create_ta element_shape=_shape(decoder.batch_size, s)) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/ops/tensor_array_ops.py", line 1026, in __init__ name=name) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/ops/tensor_array_ops.py", line 163, in __init__ self._handle, self._flow = create() File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/ops/tensor_array_ops.py", line 160, in create name=scope) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/ops/gen_data_flow_ops.py", line 7571, in tensor_array_v3 tensor_array_name=tensor_array_name, name=name) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op op_def=op_def) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1801, in __init__ self._traceback = tf_stack.extract_stack() InvalidArgumentError (see above for traceback): Cannot assign a device for operation model/inference/decoder/TensorArray_2: Could not satisfy explicit device specification '' because the node node model/inference/decoder/TensorArray_2 (defined at /home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/models/tacotron.py:170) having device No device assignments were active during op 'model/inference/decoder/TensorArray_2' creation. was colocated with a group of nodes that required incompatible device '/device:GPU:0' Colocation Debug Info: Colocation group had the following types and devices: TensorArrayGatherV3: GPU CPU XLA_CPU XLA_GPU Const: GPU CPU XLA_CPU XLA_GPU TensorArraySizeV3: CPU XLA_CPU XLA_GPU TensorArrayWriteV3: CPU XLA_CPU XLA_GPU Range: GPU CPU XLA_CPU XLA_GPU Tile: GPU CPU XLA_CPU XLA_GPU Enter: CPU XLA_CPU XLA_GPU TensorArrayV3: CPU XLA_CPU XLA_GPU Colocation members and user-requested devices: model/inference/decoder/TensorArray_2 (TensorArrayV3) model/inference/decoder/while/CustomDecoderStep/Tile (Tile) /device:GPU:0 model/inference/decoder/while/TensorArrayWrite_2/TensorArrayWriteV3/Enter (Enter) /device:GPU:0 model/inference/decoder/while/TensorArrayWrite_2/TensorArrayWriteV3 (TensorArrayWriteV3) /device:GPU:0 model/inference/decoder/TensorArrayStack_2/TensorArraySizeV3 (TensorArraySizeV3) model/inference/decoder/TensorArrayStack_2/range/start (Const) model/inference/decoder/TensorArrayStack_2/range/delta (Const) model/inference/decoder/TensorArrayStack_2/range (Range) model/inference/decoder/TensorArrayStack_2/TensorArrayGatherV3 (TensorArrayGatherV3) [[node model/inference/decoder/TensorArray_2 (defined at /home/xxx/Tacotron-2-mandarin-new/Tacotron-2-mandarin-new/tacotron/models/tacotron.py:170) ]] No node-device colocations were active during op 'model/inference/decoder/TensorArray_2' creation. No device assignments were active during op 'model/inference/decoder/TensorArray_2' creation. my tensorflow is the latest version 1.13.1, running on GPU would you please be so kind to help me on this problem?
begeekmyfriend commented 5 years ago

I do not recommend wavenet of this project. Please synthesize in GTA mode with mandarin-griffin-lim branch and then train with WaveRNN.

chmh19961030 commented 5 years ago

Thank you so much for your help! When I try to load the checkpoint in mandarin-griffin-lim branch, it seems that there is something different in the checkpoints of mandarin-griffin-lim branch and mandarin-new branch , and an error occured.

Traceback (most recent call last): File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call return fn(*args) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.NotFoundError: Key model/inference/decoder/Location_Sensitive_Attention/attention_bias not found in checkpoint [[{{node save/RestoreV2}}]] [[{{node save/RestoreV2}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1276, in restore {self.saver_def.filename_tensor_name: save_path}) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run run_metadata) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: Key model/inference/decoder/Location_Sensitive_Attention/attention_bias not found in checkpoint [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]] [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]]

Caused by op 'save/RestoreV2', defined at: File "synthesize.py", line 65, in main() File "synthesize.py", line 61, in main tacotron_synthesize(args, hparams, taco_checkpoint, sentences) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesize.py", line 122, in tacotron_synthesize return run_synthesis(args, checkpoint_path, output_dir, hparams) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesize.py", line 85, in run_synthesis synth.load(checkpoint_path, hparams, gta=GTA) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py", line 54, in load saver = tf.train.Saver() File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 832, in init self.build() File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 844, in build self._build(self._filename, build_save=True, build_restore=True) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 881, in _build build_save=build_save, build_restore=build_restore) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 513, in _build_internal restore_sequentially, reshape) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 332, in _AddRestoreOps restore_sequentially) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 580, in bulk_restore return io_ops.restore_v2(filename_tensor, names, slices, dtypes) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1572, in restore_v2 name=name) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op op_def=op_def) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1801, in init self._traceback = tf_stack.extract_stack()

NotFoundError (see above for traceback): Key model/inference/decoder/Location_Sensitive_Attention/attention_bias not found in checkpoint [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]] [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1286, in restore names_to_keys = object_graph_key_mapping(save_path) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1591, in object_graph_key_mapping checkpointable.OBJECT_GRAPH_PROTO_KEY) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 370, in get_tensor status) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in exit c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: Key _CHECKPOINTABLE_OBJECT_GRAPH not found in checkpoint

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "synthesize.py", line 65, in main() File "synthesize.py", line 61, in main tacotron_synthesize(args, hparams, taco_checkpoint, sentences) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesize.py", line 122, in tacotron_synthesize return run_synthesis(args, checkpoint_path, output_dir, hparams) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesize.py", line 85, in run_synthesis synth.load(checkpoint_path, hparams, gta=GTA) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py", line 55, in load saver.restore(self.session, checkpoint_path) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1292, in restore err, "a Variable name or other graph key that is missing") tensorflow.python.framework.errors_impl.NotFoundError: Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key model/inference/decoder/Location_Sensitive_Attention/attention_bias not found in checkpoint [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]] [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]]

Caused by op 'save/RestoreV2', defined at: File "synthesize.py", line 65, in main() File "synthesize.py", line 61, in main tacotron_synthesize(args, hparams, taco_checkpoint, sentences) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesize.py", line 122, in tacotron_synthesize return run_synthesis(args, checkpoint_path, output_dir, hparams) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesize.py", line 85, in run_synthesis synth.load(checkpoint_path, hparams, gta=GTA) File "/home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py", line 54, in load saver = tf.train.Saver() File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 832, in init self.build() File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 844, in build self._build(self._filename, build_save=True, build_restore=True) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 881, in _build build_save=build_save, build_restore=build_restore) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 513, in _build_internal restore_sequentially, reshape) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 332, in _AddRestoreOps restore_sequentially) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 580, in bulk_restore return io_ops.restore_v2(filename_tensor, names, slices, dtypes) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/ops/gen_io_ops.py", line 1572, in restore_v2 name=name) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func return func(*args, **kwargs) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3300, in create_op op_def=op_def) File "/home/xxx/anaconda3/envs/tacotron2/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1801, in init self._traceback = tf_stack.extract_stack()

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Key model/inference/decoder/Location_Sensitive_Attention/attention_bias not found in checkpoint [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]] [[node save/RestoreV2 (defined at /home/xxx/Tacotron-2-mandarin-griffin-lim/tacotron/synthesizer.py:54) ]]

It is clear that model/inference/decoder/Location_Sensitive_Attention/attention_bias is not included in the checkpoint. If this problem is caused by different variable name, the checkpoint may be saved. If not, it would be a good choice to retrain it. T_T

begeekmyfriend commented 5 years ago

Of course they are different. And I am focusing on mandarin-griffin-lim and WaveRNN now.

chmh19961030 commented 5 years ago

Thank you very much!

alokprasad commented 5 years ago

I have changed something with this model, did you train with this fork from scratch? Yes, I train it from scratch.. Since the default value of split_info is None, how can it be subscripted when the model is initialized. Or there's sth not committed

@nkhouse where able to proceed with this issue as split_infos is set to None

begeekmyfriend commented 5 years ago

Here is my WaveRNN demo. Use mandarin-griffin-lim branch, set linear_prediction as False, synthesize GTA results and feed them into WaveRNN which is really faster than WaveNet. So I do not want to maintain mandarin-new branch anymore. wavernn_mandarin_male_22050.zip

chen849157649 commented 5 years ago

hello, @begeekmyfriend ,tacotron2 Use mandarin-griffin-lim branch, set linear_prediction as False, synthesize GTA results ,shape of gta is 160 channels, when training WaveRNN , occur RuntimeError: Given groups=1, weight of size [128, 80, 5], expected input[32, 160, 9] to have 80 channels, but got 160 channels instead , but in https://github.com/fatchord/WaveRNN/blob/master/hparams.py, set num_mels = 80 to Settings for all models, if i change WaveRNN at hparams.py num_mels = 160 ,Are there other parameters that need to be modified? Is this reasonable?

begeekmyfriend commented 5 years ago

Once it runs it is all right for you.

xinzheshen commented 4 years ago

@begeekmyfriend I synthesis audio with pretrained model from BiaoBei, but there is abnormal sentence breaking, for example: "chang2 cheng2 shi4 gu3 dai4 zhong1 guo2 zai4 bu4 tong2 shi2 qi1", it break the "gu3" and "dai4", do you have any suggestion? Thank you. 2th sentence: "gang1 yi4 hao2 mai4 zhi2 zhuo2 pin1 bo2 de5 hai3 yang2 wen2 hua4 jing1 shen2"

wavs.tar.gz

begeekmyfriend commented 4 years ago

Do not use any pretrained model since it might well be outdated.

begeekmyfriend commented 4 years ago

By the way, please use mandarin-mel-prediction branch plus WaveRNN

xinzheshen commented 4 years ago

Thank you.