From 0e0d0345cdbde9e24de5b9eb6ed02032d81054dd Mon Sep 17 00:00:00 2001 From: Eren Golge Date: Tue, 29 Oct 2019 17:41:07 +0100 Subject: [PATCH] call truncated inference --- utils/synthesis.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/synthesis.py b/utils/synthesis.py index 80d5272f..f066228a 100644 --- a/utils/synthesis.py +++ b/utils/synthesis.py @@ -34,8 +34,12 @@ def run_model(model, inputs, CONFIG, truncated, speaker_id=None, style_mel=None) decoder_output, postnet_output, alignments, stop_tokens = model.inference( inputs, style_mel=style_mel, speaker_ids=speaker_id) else: - decoder_output, postnet_output, alignments, stop_tokens = model.inference( - inputs, speaker_ids=speaker_id) + if truncated: + decoder_output, postnet_output, alignments, stop_tokens = model.inference_truncated( + inputs, speaker_ids=speaker_id) + else: + decoder_output, postnet_output, alignments, stop_tokens = model.inference( + inputs, speaker_ids=speaker_id) return decoder_output, postnet_output, alignments, stop_tokens