Skip to content

Commit

Permalink
Merge pull request #18 from oliveiracwb/master
Browse files Browse the repository at this point in the history
Update gen_tacotron.py
  • Loading branch information
cschaefer26 authored Jul 11, 2020
2 parents 2e37c70 + 6c549b9 commit 3d52e7d
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 3d52e7d

Please sign in to comment.