From c8d7a6a84e82bdc8f96ca6d31b407562e83b2d6e Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Sun, 6 Jan 2019 18:10:54 +0100 Subject: [PATCH] explicit slience removal after voice synthesis in case of wrong stop token --- utils/synthesis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/synthesis.py b/utils/synthesis.py index 1f36cfa3..4667335b 100644 --- a/utils/synthesis.py +++ b/utils/synthesis.py @@ -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 \ No newline at end of file