Merge pull request #36 from felixonmars/patch-1
Correct typos in preprocess_hubert_f0.py
This commit is contained in:
commit
1010334274
|
@ -24,9 +24,9 @@ def process_one(filename, hmodel):
|
||||||
wav, sr = librosa.load(filename, sr=sampling_rate)
|
wav, sr = librosa.load(filename, sr=sampling_rate)
|
||||||
soft_path = filename + ".soft.pt"
|
soft_path = filename + ".soft.pt"
|
||||||
if not os.path.exists(soft_path):
|
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 = 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)
|
c = utils.get_hubert_content(hmodel, wav_16k_tensor=wav16k)
|
||||||
torch.save(c.cpu(), soft_path)
|
torch.save(c.cpu(), soft_path)
|
||||||
f0_path = filename + ".f0.npy"
|
f0_path = filename + ".f0.npy"
|
||||||
|
|
Loading…
Reference in New Issue