From babdd84f9125d3be45136d55dc2d34d45393ee99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Tue, 7 Dec 2021 13:28:49 +0000 Subject: [PATCH] Fix GST inference commit d3e477875a7e46a101fcf95a1794442823750fe2 Author: George Rousssos <25833833+george-roussos@users.noreply.github.com> Date: Wed Nov 3 10:16:12 2021 +0000 Read .wav for GST conditioning from CL commit 074e6d0874d3b34fb6a4991fc17d66dccd413fbb Author: George Rousssos <25833833+george-roussos@users.noreply.github.com> Date: Fri Oct 29 14:43:47 2021 +0100 Fix GST during inference in Tacotron2 commit fdece14585ab5a36eed1061a9a838d8e48aa6882 Author: George Rousssos <25833833+george-roussos@users.noreply.github.com> Date: Wed Nov 3 10:16:12 2021 +0000 Read .wav for GST conditioning from CL commit cd29e21b8d0a541ee298d2bf5f67223ad60be38f Author: George Rousssos <25833833+george-roussos@users.noreply.github.com> Date: Fri Oct 29 14:43:47 2021 +0100 Fix GST during inference in Tacotron2 commit 908ce39370eadcc9fa8510cdb26c9ead87305427 Author: George Rousssos <25833833+george-roussos@users.noreply.github.com> Date: Fri Oct 29 12:49:37 2021 +0100 Make trim_db value negative commit 1008a2e0f72fa7ca7f0307424f570386f2f16d42 Author: George Rousssos <25833833+george-roussos@users.noreply.github.com> Date: Fri Oct 29 12:22:24 2021 +0100 Set find_endpoint db threshold in config.json --- TTS/bin/synthesize.py | 2 +- TTS/tts/utils/synthesis.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TTS/bin/synthesize.py b/TTS/bin/synthesize.py index 3e69e1ad..fb2e41b4 100755 --- a/TTS/bin/synthesize.py +++ b/TTS/bin/synthesize.py @@ -254,7 +254,7 @@ def main(): print(" > Text: {}".format(args.text)) # kick it - wav = synthesizer.tts(args.text, args.speaker_idx, args.speaker_wav) + wav = synthesizer.tts(args.text, args.speaker_idx, args.speaker_wav, args.gst_style) # save the results print(" > Saving output to {}".format(args.out_path)) diff --git a/TTS/tts/utils/synthesis.py b/TTS/tts/utils/synthesis.py index 5185139e..578c26c0 100644 --- a/TTS/tts/utils/synthesis.py +++ b/TTS/tts/utils/synthesis.py @@ -250,11 +250,11 @@ def synthesis( # GST processing style_mel = None custom_symbols = None - if CONFIG.has("gst") and CONFIG.gst and style_wav is not None: - if isinstance(style_wav, dict): - style_mel = style_wav - else: - style_mel = compute_style_mel(style_wav, ap, cuda=use_cuda) + if style_wav: + style_mel = compute_style_mel(style_wav, ap, cuda=use_cuda) + elif CONFIG.has("gst") and CONFIG.gst and not style_wav: + if CONFIG.gst.gst_style_input_weights: + style_mel = CONFIG.gst.gst_style_input_weights if hasattr(model, "make_symbols"): custom_symbols = model.make_symbols(CONFIG) # preprocess the given text