From 8957799e4557a56b3ac5e1222ee67e42b0431ad4 Mon Sep 17 00:00:00 2001 From: ChaseC <13863948+ChaseCares@users.noreply.github.com> Date: Tue, 4 Jul 2023 05:32:00 -0400 Subject: [PATCH] fix loading of model and vocoder configs (#2698) --- TTS/server/server.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/TTS/server/server.py b/TTS/server/server.py index 7324e801..3d1f81bd 100644 --- a/TTS/server/server.py +++ b/TTS/server/server.py @@ -162,11 +162,19 @@ def index(): @app.route("/details") def details(): - model_config = load_config(args.tts_config) - if args.vocoder_config is not None and os.path.isfile(args.vocoder_config): - vocoder_config = load_config(args.vocoder_config) + if args.config_path is not None and os.path.isfile(args.config_path): + model_config = load_config(args.config_path) else: - vocoder_config = None + if args.model_name is not None: + model_config = load_config(config_path) + + if args.vocoder_config_path is not None and os.path.isfile(args.vocoder_config_path): + vocoder_config = load_config(args.vocoder_config_path) + else: + if args.vocoder_name is not None: + vocoder_config = load_config(vocoder_config_path) + else: + vocoder_config = None return render_template( "details.html",