Merge pull request #330 from LancherM/4.1-Stable

fixed the error when using feature retrieval
This commit is contained in:
YuriHead 2023-07-22 15:16:15 +08:00 committed by GitHub
commit 8b4d422457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ class Svc(object):
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()
feat_np = np.ascontiguousarray(c.transpose(0,1).cpu().numpy())
if self.big_npy is None or self.now_spk_id != speaker_id:
self.big_npy = feature_index.reconstruct_n(0, feature_index.ntotal)
self.now_spk_id = speaker_id