From f55a6a6724f2931e1e2f7518df75767ca217d981 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Tue, 19 Jul 2022 11:42:05 -0500 Subject: [PATCH] Fix empty voices download dir --- mimic3_tts/download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mimic3_tts/download.py b/mimic3_tts/download.py index ccf0421..b15f78f 100644 --- a/mimic3_tts/download.py +++ b/mimic3_tts/download.py @@ -70,8 +70,8 @@ def download_voice( voice_key: str, url_base: str, voice_files: typing.Iterable[VoiceFile], - voices_dir: typing.Union[str, Path], voice_version: str, + voices_dir: typing.Optional[typing.Union[str, Path]] = None, chunk_bytes: int = 4096, redownload: bool = False, ): @@ -82,6 +82,7 @@ def download_voice( # Remove final slash url_base = url_base[:-1] + voices_dir = voices_dir or DEFAULT_VOICES_DOWNLOAD_DIR voice_dir = Path(voices_dir) / voice_key voice_dir.mkdir(parents=True, exist_ok=True)