explicit slience removal after voice synthesis in case of wrong stop token

This commit is contained in:
Eren Golge 2019-01-06 18:10:54 +01:00
parent 14ba3a1a30
commit c8d7a6a84e
1 changed files with 1 additions and 1 deletions

View File

@ -20,5 +20,5 @@ def synthesis(m, s, CONFIG, use_cuda, ap):
mel_spec = mel_spec[0].data.cpu().numpy()
alignment = alignments[0].cpu().data.numpy()
wav = ap.inv_spectrogram(linear_spec.T)
# wav = wav[:ap.find_endpoint(wav)]
wav = wav[:ap.find_endpoint(wav)]
return wav, alignment, linear_spec, mel_spec, stop_tokens