From cf5a8fb94c9e708a43fdd61040aca443d3613eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AC=AC=E7=B4=97=E7=89=B9?= <66856838+Miuzarte@users.noreply.github.com> Date: Sat, 18 Mar 2023 09:49:24 +0800 Subject: [PATCH] Update preprocess_hubert_f0.py --- preprocess_hubert_f0.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preprocess_hubert_f0.py b/preprocess_hubert_f0.py index e815d82..66bac7e 100644 --- a/preprocess_hubert_f0.py +++ b/preprocess_hubert_f0.py @@ -24,9 +24,9 @@ def process_one(filename, hmodel): wav, sr = librosa.load(filename, sr=sampling_rate) soft_path = filename + ".soft.pt" if not os.path.exists(soft_path): - devive = torch.device("cuda" if torch.cuda.is_available() else "cpu") + device = torch.device("cuda" if torch.cuda.is_available() else "cpu") wav16k = librosa.resample(wav, orig_sr=sampling_rate, target_sr=16000) - wav16k = torch.from_numpy(wav16k).to(devive) + wav16k = torch.from_numpy(wav16k).to(device) c = utils.get_hubert_content(hmodel, wav_16k_tensor=wav16k) torch.save(c.cpu(), soft_path) f0_path = filename + ".f0.npy"