From 0ba75c6531d9bb2f70619ee76eeaa65be6ddacf0 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 6 May 2022 16:54:36 -0400 Subject: [PATCH] Print error for malformed voice keys in download --- mimic3_tts/download.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mimic3_tts/download.py b/mimic3_tts/download.py index 3c09081..2ef9288 100644 --- a/mimic3_tts/download.py +++ b/mimic3_tts/download.py @@ -221,6 +221,12 @@ def main(argv=None): voice_keys = [key_or_pattern] for voice_key in voice_keys: + if "/" not in voice_key: + _LOGGER.error( + "Voice not recognized or not in / format: %s", voice_key + ) + continue + voice_lang, voice_name = voice_key.split("/", maxsplit=1) voice_info = _VOICES[voice_key] voice_url = str.format(