fixed the error when using feature retrieval

This commit is contained in:
Lancher 2023-07-22 12:18:24 +08:00 committed by GitHub
parent 225f7fdfa5
commit 5e91b889df
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