Merge pull request #11 from makaveli10/fix_pytorch_warn

copy np array to make tensor writable.
This commit is contained in:
Marcus Edel
2023-07-03 17:10:56 -04:00
committed by GitHub
+1 -1
View File
@@ -109,7 +109,7 @@ class ServeClient:
def add_frames(self, frame_np): def add_frames(self, frame_np):
try: try:
speech_prob = self.vad_model(torch.from_numpy(frame_np), self.RATE).item() speech_prob = self.vad_model(torch.from_numpy(frame_np.copy()), self.RATE).item()
if speech_prob < self.vad_threshold: if speech_prob < self.vad_threshold:
return return