speakerの自動検知

This commit is contained in:
nadare 2023-07-04 06:50:58 +09:00
parent 70956fafeb
commit d0224a5e50
2 changed files with 5 additions and 1 deletions

View File

@ -144,7 +144,7 @@ class RVC(VoiceChangerModel):
audio = torchaudio.functional.resample(audio, self.slotInfo.samplingRate, 16000, rolloff=0.99)
repeat = 1 if self.settings.rvcQuality else 0
sid = 0
sid = self.settings.dstId
f0_up_key = self.settings.tran
index_rate = self.settings.indexRatio
protect = self.settings.protect

View File

@ -100,6 +100,10 @@ class RVCModelSlotGenerator(ModelSlotGenerator):
if slot.embedder.endswith("768"):
slot.embedder = slot.embedder[:-3]
if "speaker_info" in cpt.keys():
for k, v in cpt["speaker_info"].items():
slot.speakers[int(k)] = str(v)
# if slot.embedder == EnumEmbedderTypes.hubert.value:
# slot.embedder = EnumEmbedderTypes.hubert
# elif slot.embedder == EnumEmbedderTypes.contentvec.value: