init
Browse files
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)
|