From ce538641c190f00df562ce7c46b9b95b1f64fee9 Mon Sep 17 00:00:00 2001 From: Florian Quirin Date: Sun, 3 Jul 2022 19:13:49 +0200 Subject: [PATCH] Skip voices that are not installed in MaryTTS '/voices' endpoint Programs that use Mary-TTS API will likely get confused by the large number of uninstalled voices. --- mimic3_http/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mimic3_http/app.py b/mimic3_http/app.py index 0f82bdc..006a21d 100644 --- a/mimic3_http/app.py +++ b/mimic3_http/app.py @@ -317,6 +317,9 @@ def get_app(args: argparse.Namespace, request_queue: Queue, temp_dir: str): tech = "vits" for voice in sorted_voices: + if not voice.location or voice.location.startswith("https://"): + # Skip voices that are not yet installed + continue if voice.is_multispeaker: # List each speaker separately for speaker in voice.speakers: