Skip to content

Commit

Permalink
Update gen_tacotron.py
Browse files Browse the repository at this point in the history
for compatibility purposes, with pull # 17 (melgan)
  • Loading branch information
oliveiracwb authored Jul 11, 2020
1 parent 2e37c70 commit 6c549b9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gen_tacotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6c549b9

Please sign in to comment.