From 979fba00f35532b14791724057851699e5b7a21b Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Tue, 28 Jun 2022 21:18:43 -0400 Subject: [PATCH] Recursively create directories when downloading --- mimic3_tts/VERSION | 2 +- mimic3_tts/download.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mimic3_tts/VERSION b/mimic3_tts/VERSION index 0c62199..ee1372d 100644 --- a/mimic3_tts/VERSION +++ b/mimic3_tts/VERSION @@ -1 +1 @@ -0.2.1 +0.2.2 diff --git a/mimic3_tts/download.py b/mimic3_tts/download.py index a92c75c..ffcf9f0 100644 --- a/mimic3_tts/download.py +++ b/mimic3_tts/download.py @@ -102,6 +102,7 @@ def download_voice( for voice_file in voice_files: file_url = f"{url_base}/{voice_file.relative_path}" file_path = voice_dir / voice_file.relative_path + file_path.parent.mkdir(parents=True, exist_ok=True) if (not redownload) and voice_file.sha256_sum and file_path.is_file(): # Check if file exists and has correct sha256