speech_asr hace 3 años
padre
commit
dd4946a50d
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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')