Skip to content

Commit

Permalink
speakerの自動検知
Browse files Browse the repository at this point in the history
  • Loading branch information
nadare881 committed Jul 3, 2023
1 parent 70956fa commit d0224a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/voice_changer/RVC/RVC.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions server/voice_changer/RVC/RVCModelSlotGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d0224a5

Please sign in to comment.