From 28ccfbfc51068a663a80764e14074df5edf2b5ba Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang960204@163.com>
Date: 星期五, 13 三月 2026 17:41:41 +0800
Subject: [PATCH] 提交

---
 tests/test_vad_inference_pipeline.py |   66 ++++++++++++++++++++++++++-------
 1 files changed, 52 insertions(+), 14 deletions(-)

diff --git a/tests/test_vad_inference_pipeline.py b/tests/test_vad_inference_pipeline.py
index 50b8db3..7fb0ce4 100644
--- a/tests/test_vad_inference_pipeline.py
+++ b/tests/test_vad_inference_pipeline.py
@@ -11,6 +11,7 @@
     def test_funasr_path(self):
         import funasr
         import os
+
         logger.info("run_dir:{0} ; funasr_path: {1}".format(os.getcwd(), funasr.__file__))
 
     def test_8k(self):
@@ -19,15 +20,41 @@
             model="damo/speech_fsmn_vad_zh-cn-8k-common",
         )
         rec_result = inference_pipeline(
-            audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example_8k.wav')
+            audio_in="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example_8k.wav"
+        )
         logger.info("vad inference result: {0}".format(rec_result))
-        assert rec_result["text"] == [[0, 1960], [2870, 6730], [7960, 10180], [12140, 14830], [15740, 19400],
-                                      [20220, 24230], [25540, 27290], [30070, 30970], [32070, 34280], [35990, 37050],
-                                      [39400, 41020], [41810, 47320], [48120, 52150], [53560, 58310], [59290, 62210],
-                                      [63110, 66420], [67300, 68280], [69670, 71770], [73100, 75550], [76850, 78500],
-                                      [79380, 83280], [85000, 92320], [93560, 94110], [94990, 95620], [96940, 97590],
-                                      [98400, 100530], [101600, 104890], [108780, 110900], [112020, 113460],
-                                      [114210, 115030]]
+        assert rec_result["text"] == [
+            [0, 1960],
+            [2870, 6730],
+            [7960, 10180],
+            [12140, 14830],
+            [15740, 19400],
+            [20220, 24230],
+            [25540, 27290],
+            [30070, 30970],
+            [32070, 34280],
+            [35990, 37050],
+            [39400, 41020],
+            [41810, 47320],
+            [48120, 52150],
+            [53560, 58310],
+            [59290, 62210],
+            [63110, 66420],
+            [67300, 68280],
+            [69670, 71770],
+            [73100, 75550],
+            [76850, 78500],
+            [79380, 83280],
+            [85000, 92320],
+            [93560, 94110],
+            [94990, 95620],
+            [96940, 97590],
+            [98400, 100530],
+            [101600, 104890],
+            [108780, 110900],
+            [112020, 113460],
+            [114210, 115030],
+        ]
 
     def test_16k(self):
         inference_pipeline = pipeline(
@@ -35,13 +62,24 @@
             model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch",
         )
         rec_result = inference_pipeline(
-            audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example.wav')
+            audio_in="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/vad_example.wav"
+        )
         logger.info("vad inference result: {0}".format(rec_result))
-        assert rec_result["text"] == [[70, 2340], [2620, 6200], [6480, 23670], [23950, 26250], [26780, 28990],
-                                      [29950, 31430], [31750, 37600], [38210, 46900], [47310, 49630], [49910, 56460],
-                                      [56740, 59540], [59820, 70450]]
+        assert rec_result["text"] == [
+            [70, 2340],
+            [2620, 6200],
+            [6480, 23670],
+            [23950, 26250],
+            [26780, 28990],
+            [29950, 31430],
+            [31750, 37600],
+            [38210, 46900],
+            [47310, 49630],
+            [49910, 56460],
+            [56740, 59540],
+            [59820, 70450],
+        ]
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
-

--
Gitblit v1.9.1