Merge pull request #392 from nadare881/autospeaker

speakerの自動検知
This commit is contained in:
w-okada 2023-07-04 17:08:32 +09:00 committed by GitHub
commit adb8371089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -162,7 +162,7 @@ class RVC(VoiceChangerModel):
audio = torch.from_numpy(audio).to(device=device, dtype=torch.float32)
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: