diff --git a/mozilla_voice_tts/bin/synthesize.py b/mozilla_voice_tts/bin/synthesize.py index 1e2886b8..8fa27bf0 100644 --- a/mozilla_voice_tts/bin/synthesize.py +++ b/mozilla_voice_tts/bin/synthesize.py @@ -158,7 +158,7 @@ if __name__ == "__main__": # check if gst_style string is a dict, if is dict convert else use string try: gst_style = json.loads(args.gst_style) - except: + except ValueError: gst_style = args.gst_style wav = tts(model, vocoder_model, args.text, C, args.use_cuda, ap, use_griffin_lim, args.speaker_fileid, speaker_embedding=speaker_embedding, gst_style=gst_style) diff --git a/mozilla_voice_tts/tts/models/tacotron.py b/mozilla_voice_tts/tts/models/tacotron.py index bcc4a2a6..3837e63c 100644 --- a/mozilla_voice_tts/tts/models/tacotron.py +++ b/mozilla_voice_tts/tts/models/tacotron.py @@ -40,7 +40,7 @@ class Tacotron(TacotronAbstract): forward_attn, trans_agent, forward_attn_mask, location_attn, attn_K, separate_stopnet, bidirectional_decoder, double_decoder_consistency, - ddc_r, gst) + ddc_r, gst, gst_embedding_dim, gst_num_heads, gst_style_tokens) # init layer dims decoder_in_features = 256 diff --git a/mozilla_voice_tts/tts/models/tacotron2.py b/mozilla_voice_tts/tts/models/tacotron2.py index 2839cea7..9aeeb3d2 100644 --- a/mozilla_voice_tts/tts/models/tacotron2.py +++ b/mozilla_voice_tts/tts/models/tacotron2.py @@ -45,7 +45,7 @@ class Tacotron2(TacotronAbstract): forward_attn, trans_agent, forward_attn_mask, location_attn, attn_K, separate_stopnet, bidirectional_decoder, double_decoder_consistency, - ddc_r, gst) + ddc_r, gst, gst_embedding_dim, gst_num_heads, gst_style_tokens) # init layer dims decoder_in_features = 512