diff --git a/server/voice_changer/RVC/RVC.py b/server/voice_changer/RVC/RVC.py index 884663d5a..a59d535a3 100644 --- a/server/voice_changer/RVC/RVC.py +++ b/server/voice_changer/RVC/RVC.py @@ -144,7 +144,7 @@ def inference(self, data): 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 diff --git a/server/voice_changer/RVC/RVCModelSlotGenerator.py b/server/voice_changer/RVC/RVCModelSlotGenerator.py index d5cd536c0..1699a2960 100644 --- a/server/voice_changer/RVC/RVCModelSlotGenerator.py +++ b/server/voice_changer/RVC/RVCModelSlotGenerator.py @@ -100,6 +100,10 @@ def _setInfoByPytorch(cls, slot: ModelSlot): 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: