Add files via upload

This commit is contained in:
liujing04
2023-04-16 18:56:20 +08:00
committed by GitHub
parent 5bcaa171ea
commit 0719b4aa5e
6 changed files with 18 additions and 5 deletions

View File

@@ -4,7 +4,8 @@ import torch.nn.functional as F
from config import x_pad, x_query, x_center, x_max
import scipy.signal as signal
import pyworld, os, traceback, faiss
from scipy import signal
bh, ah = signal.butter(N=5, Wn=48, btype='high', fs=16000)
class VC(object):
def __init__(self, tgt_sr, device, is_half):
@@ -189,6 +190,7 @@ class VC(object):
index = big_npy = None
else:
index = big_npy = None
audio = signal.filtfilt(bh, ah, audio)
audio_pad = np.pad(audio, (self.window // 2, self.window // 2), mode="reflect")
opt_ts = []
if audio_pad.shape[0] > self.t_max: