1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-07 10:10:23 +08:00

some change precision audio processing (#94)

* some change precision audio processing

* fix clipping problem in resample

resample sometimes causes signal clipping, not just librosa.resample

* fix error
This commit is contained in:
autumnmotor
2023-04-22 20:39:47 +09:00
committed by GitHub
parent c423f77a16
commit 297d92bf5d
4 changed files with 32 additions and 9 deletions

View File

@@ -33,7 +33,9 @@ class FeatureInput(object):
self.f0_mel_max = 1127 * np.log(1 + self.f0_max / 700)
def compute_f0(self, path, f0_method):
x, sr = librosa.load(path, self.fs)
# default resample type of librosa.resample is "soxr_hq".
# Quality: soxr_vhq > soxr_hq
x, sr = librosa.load(path, self.fs, res_type='soxr_vhq')
p_len = x.shape[0] // self.hop
assert sr == self.fs
if f0_method == "pm":