Skip voices that aren't installed yet in MaryTTS /voices endpoint

This commit is contained in:
Michael Hansen 2022-07-05 10:03:30 -05:00
commit 5baf814a7f
2 changed files with 7 additions and 1 deletions

View file

@ -141,6 +141,11 @@ def download_voice(
) from e
def is_voice_downloaded(voice_location: str) -> bool:
"""True if voice has been downloaded locally"""
return voice_location and Path(voice_location).exists()
# -----------------------------------------------------------------------------