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.
This commit is contained in:
Florian Quirin 2022-07-03 19:13:49 +02:00 committed by GitHub
commit ce538641c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: