Merge pull request #15 from darai0512/develop

並列処理中のエラー情報の強化
This commit is contained in:
litagin02
2024-01-06 09:31:08 +09:00
committed by GitHub

View File

@@ -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