fix sv path

This commit is contained in:
RVC-Boss 2025-06-04 18:05:57 +08:00 committed by GitHub
parent 6d12a6a6cb
commit 298ebb03c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
import sys,os,torch
sys.path.append(f"{os.getcwd()}/GPT_SoVITS/eres2net")
sv_path = "GPT_SoVITS\pretrained_models\sv\pretrained_eres2netv2w24s4ep4.ckpt"
sv_path = "GPT_SoVITS/pretrained_models/sv/pretrained_eres2netv2w24s4ep4.ckpt"
from ERes2NetV2 import ERes2NetV2
import kaldi as Kaldi
class SV:
@ -16,7 +16,7 @@ class SV:
self.embedding_model=self.embedding_model.half().to(device)
self.is_half=is_half
def compute_embedding3(self,wav):#(1,x)#-1~1
def compute_embedding3(self,wav):
with torch.no_grad():
if self.is_half==True:wav=wav.half()
feat = torch.stack([Kaldi.fbank(wav0.unsqueeze(0), num_mel_bins=80, sample_frequency=16000, dither=0) for wav0 in wav])