From 0d79bdc481e83309f4339ab1ce7e350957b0b868 Mon Sep 17 00:00:00 2001 From: Daiki Arai Date: Fri, 5 Jan 2024 23:23:38 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=A6=E5=88=97=E5=87=A6=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E3=81=AE=E3=82=A8=E3=83=A9=E3=83=BC=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=81=AE=E5=BC=B7=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style_gen.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/style_gen.py b/style_gen.py index 778a6a4..745c6c3 100644 --- a/style_gen.py +++ b/style_gen.py @@ -19,12 +19,13 @@ device = torch.device(config.style_gen_config.device) inference.to(device) -def extract_style_vector(wav_path): - return inference(wav_path) - - def save_style_vector(wav_path): - style_vec = extract_style_vector(wav_path) + try: + style_vec = inference(wav_path) + except Exception as e: + print(f"\nIncluding any problems: {wav_path}") + print(e) + raise np.save(f"{wav_path}.npy", style_vec) # `test.wav` -> `test.wav.npy` return style_vec From cba208505e6d308c1d82cb5f22646e567ff98aac Mon Sep 17 00:00:00 2001 From: litagin02 Date: Sat, 6 Jan 2024 09:33:55 +0900 Subject: [PATCH 2/3] Fix English --- style_gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style_gen.py b/style_gen.py index 745c6c3..7f74243 100644 --- a/style_gen.py +++ b/style_gen.py @@ -23,7 +23,7 @@ def save_style_vector(wav_path): try: style_vec = inference(wav_path) except Exception as e: - print(f"\nIncluding any problems: {wav_path}") + print(f"\nError occurred with file: {wav_path}") print(e) raise np.save(f"{wav_path}.npy", style_vec) # `test.wav` -> `test.wav.npy` From e61ec59580188891072dfaf5e57d1836da146bd8 Mon Sep 17 00:00:00 2001 From: litagin02 Date: Sat, 6 Jan 2024 09:48:02 +0900 Subject: [PATCH 3/3] Fix impotabile setting yaml error --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 0acfe76..ad2676c 100644 --- a/config.py +++ b/config.py @@ -263,7 +263,7 @@ args, _ = parser.parse_known_args() try: config = Config(args.yml_config) -except TypeError: +except (TypeError, KeyError): logger.warning("Old config.yml found. Replace it with default_config.yml.") shutil.copy(src="default_config.yml", dst="config.yml") config = Config("config.yml")