Merge pull request #311 from svc-develop-team/4.1-Latest

To Stable
This commit is contained in:
YuriHead 2023-07-16 23:42:53 +08:00 committed by GitHub
commit 72deb15df3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -223,11 +223,11 @@ class Svc(object):
if cluster_infer_ratio !=0:
if self.feature_retrieval:
speaker_id = self.spk2id.get(speaker)
if speaker_id is None:
raise RuntimeError("The name you entered is not in the speaker list!")
if not speaker_id and type(speaker) is int:
if len(self.spk2id.__dict__) >= speaker:
speaker_id = speaker
if speaker_id is None:
raise RuntimeError("The name you entered is not in the speaker list!")
feature_index = self.cluster_model[speaker_id]
feat_np = c.transpose(0,1).cpu().numpy()
if self.big_npy is None or self.now_spk_id != speaker_id: