This commit is contained in:
zwa73 2023-03-31 01:34:10 +08:00
parent 0098c87d1e
commit 061d3b46a5
1 changed files with 1 additions and 5 deletions

View File

@ -179,6 +179,7 @@ class Svc(object):
auto_predict_f0=False, auto_predict_f0=False,
noice_scale=0.4, noice_scale=0.4,
f0_filter=False): f0_filter=False):
speaker_id = self.spk2id.__dict__.get(speaker) speaker_id = self.spk2id.__dict__.get(speaker)
if not speaker_id and type(speaker) is int: if not speaker_id and type(speaker) is int:
if len(self.spk2id.__dict__) >= speaker: if len(self.spk2id.__dict__) >= speaker:
@ -266,11 +267,6 @@ class RealTimeVC:
noice_scale=0.4, noice_scale=0.4,
f0_filter=False): f0_filter=False):
cluster_infer_ratio = cluster_infer_ratio
auto_predict_f0 = auto_predict_f0
noice_scale = noice_scale
f0_filter = f0_filter
import maad import maad
audio, sr = torchaudio.load(input_wav_path) audio, sr = torchaudio.load(input_wav_path)
audio = audio.cpu().numpy()[0] audio = audio.cpu().numpy()[0]