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

feat: normalize audio

This commit is contained in:
源文雨
2024-06-04 22:29:39 +09:00
parent c5d06bd2ec
commit b3215d126c
4 changed files with 7 additions and 10 deletions

View File

@@ -16,7 +16,6 @@ import pyworld
import torch
import torch.nn.functional as F
import torchcrepe
import pathlib
from scipy import signal
now_dir = os.getcwd()
@@ -385,12 +384,8 @@ class Pipeline(object):
filter_radius,
inp_f0,
)
"""
np.savez_compressed(pathlib.Path(__file__).parent / "lgdsng_f0.npz", pitch=pitch, pitchf=pitchf)
"""
elif if_f0 == 2:
pitchz = np.load(pathlib.Path(__file__).parent / "lgdsng_f0.npz")
pitch, pitchf = pitchz["pitch"], pitchz["pitchf"]
pitch, pitchf = f0_method
pitch = pitch[:p_len]
pitchf = pitchf[:p_len]
if "mps" not in str(self.device) or "xpu" not in str(self.device):