asahi417 commited on
Commit
ab81720
·
1 Parent(s): 68ad2f1
Files changed (1) hide show
  1. model_pyannote_embedding.py +1 -1
model_pyannote_embedding.py CHANGED
@@ -21,7 +21,7 @@ class PyannoteSE:
21
  self.inference = Inference(model, window="whole")
22
 
23
  def get_speaker_embedding(self, wav: np.ndarray, sampling_rate: Optional[int] = None) -> np.ndarray:
24
- wav = torch.as_tensor(wav.reshape(1, -1)).to(self.device)
25
  fix_reproducibility(self.inference.device)
26
  if self.inference.window == "sliding":
27
  return self.inference.slide(wav, sampling_rate, hook=None)
 
21
  self.inference = Inference(model, window="whole")
22
 
23
  def get_speaker_embedding(self, wav: np.ndarray, sampling_rate: Optional[int] = None) -> np.ndarray:
24
+ wav = torch.as_tensor(wav.reshape(1, -1), dtype=torch.float32).to(self.device)
25
  fix_reproducibility(self.inference.device)
26
  if self.inference.window == "sliding":
27
  return self.inference.slide(wav, sampling_rate, hook=None)