From 6c549b97d500e0e4192698f935ba512eece780c7 Mon Sep 17 00:00:00 2001 From: oliveiracwb <2875049+oliveiracwb@users.noreply.github.com> Date: Sat, 11 Jul 2020 03:34:28 -0300 Subject: [PATCH] Update gen_tacotron.py for compatibility purposes, with pull # 17 (melgan) --- gen_tacotron.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gen_tacotron.py b/gen_tacotron.py index 93d9009..083a005 100644 --- a/gen_tacotron.py +++ b/gen_tacotron.py @@ -112,8 +112,8 @@ tts_model.load(tts_load_path) if input_text: - input_text = clean_text(input_text.strip()) - inputs = [text_to_sequence(input_text)] + text = clean_text(input_text.strip()) + inputs = [text_to_sequence(text)] else: with open('sentences.txt') as f: inputs = [clean_text(l.strip()) for l in f] @@ -142,9 +142,6 @@ print(f'\n| Generating {i}/{len(inputs)}') _, m, attention = tts_model.generate(x) - # Fix mel spectrogram scaling to be from 0 to 1 - m = (m + 4) / 8 - np.clip(m, 0, 1, out=m) if args.vocoder == 'griffinlim': v_type = args.vocoder