speech_asr 3 years ago
parent
commit
dd4946a50d
1 changed files with 2 additions and 1 deletions
  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)
             results = speech2diar(**batch)
 
 
             # post process
             # post process
-            a = medfilt(results[0], (11, 1))
+            a = results[0].cpu().numpy()
+            a = medfilt(a, (11, 1))
             rst = []
             rst = []
             for spkid, frames in enumerate(a.T):
             for spkid, frames in enumerate(a.T):
                 frames = np.pad(frames, (1, 1), 'constant')
                 frames = np.pad(frames, (1, 1), 'constant')