speech_asr 3 lat temu
rodzic
commit
dd4946a50d
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      funasr/bin/eend_ola_inference.py

+ 2 - 1
funasr/bin/eend_ola_inference.py

@@ -237,7 +237,8 @@ def inference_modelscope(
             results = speech2diar(**batch)
 
             # post process
-            a = medfilt(results[0], (11, 1))
+            a = results[0].cpu().numpy()
+            a = medfilt(a, (11, 1))
             rst = []
             for spkid, frames in enumerate(a.T):
                 frames = np.pad(frames, (1, 1), 'constant')