From 85a2f5f81097539778b287c7b50c079fc549378a Mon Sep 17 00:00:00 2001
From: speech_asr <wangjiaming.wjm@alibaba-inc.com>
Date: 星期五, 10 三月 2023 16:35:40 +0800
Subject: [PATCH] update unittest

---
 tests/test_asr_inference_pipeline.py |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/tests/test_asr_inference_pipeline.py b/tests/test_asr_inference_pipeline.py
index ba1625f..8ff40a5 100644
--- a/tests/test_asr_inference_pipeline.py
+++ b/tests/test_asr_inference_pipeline.py
@@ -62,11 +62,27 @@
     def test_alimeeting(self):
         inference_pipeline = pipeline(
             task=Tasks.auto_speech_recognition,
-            model='NPU-ASLP/speech_mfcca_asr-zh-cn-16k-alimeeting-vocab4950')
+            model='NPU-ASLP/speech_mfcca_asr-zh-cn-16k-alimeeting-vocab4950',
+            model_revision='v3.0.0')
         rec_result = inference_pipeline(
             audio_in='16:32https://pre.modelscope.cn/api/v1/models/NPU-ASLP/speech_mfcca_asr-zh-cn-16k-alimeeting-vocab4950/repo?Revision=master&FilePath=example/asr_example_mc.wav')
         logger.info("asr inference result: {0}".format(rec_result))
 
 
+class TestParaformerInferencePipelines(unittest.TestCase):
+    def test_funasr_path(self):
+        import funasr
+        import os
+        logger.info("run_dir:{0} ; funasr_path: {1}".format(os.getcwd(), funasr.__file__))
+
+    def test_paraformer_large_contextual_common(self):
+        inference_pipeline = pipeline(
+            task=Tasks.auto_speech_recognition,
+            model='damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404')
+        rec_result = inference_pipeline(
+            audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_hotword.wav')
+        logger.info("asr inference result: {0}".format(rec_result))
+
+
 if __name__ == '__main__':
     unittest.main()

--
Gitblit v1.9.1