Merge branch '4.0-Vec768-Layer12' into NT-v1.0

This commit is contained in:
YuriHead 2023-05-14 15:39:06 +08:00 committed by GitHub
commit ef568841a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -1,7 +1,6 @@
from modules.F0Predictor.F0Predictor import F0Predictor
import pyworld
import numpy as np
import scipy
class DioF0Predictor(F0Predictor):
def __init__(self,hop_length=512,f0_min=50,f0_max=1100,sampling_rate=44100):
@ -83,4 +82,4 @@ class DioF0Predictor(F0Predictor):
f0 = pyworld.stonemask(wav.astype(np.double), f0, t, self.sampling_rate)
for index, pitch in enumerate(f0):
f0[index] = round(pitch, 1)
return self.interpolate_f0(self.resize_f0(f0, p_len))
return self.interpolate_f0(self.resize_f0(f0, p_len))

View File

@ -1,7 +1,6 @@
from modules.F0Predictor.F0Predictor import F0Predictor
import pyworld
import numpy as np
import scipy
class HarvestF0Predictor(F0Predictor):
def __init__(self,hop_length=512,f0_min=50,f0_max=1100,sampling_rate=44100):
@ -79,4 +78,4 @@ class HarvestF0Predictor(F0Predictor):
frame_period=1000 * self.hop_length / self.sampling_rate,
)
f0 = pyworld.stonemask(wav.astype(np.double), f0, t, self.sampling_rate)
return self.interpolate_f0(self.resize_f0(f0, p_len))
return self.interpolate_f0(self.resize_f0(f0, p_len))

View File

@ -41,7 +41,6 @@ def process_one(filename, hmodel,f0p):
)
np.save(f0_path, np.asanyarray((f0,uv),dtype=object))
spec_path = filename.replace(".wav", ".spec.pt")
if not os.path.exists(spec_path):
# Process spectrogram