speech_asr
2023-03-10 bb6769647cf7e55c2d27ef79f3039cce00d11579
update unittest
1个文件已修改
17 ■■■■■ 已修改文件
tests/test_asr_inference_pipeline.py 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
tests/test_asr_inference_pipeline.py
@@ -6,6 +6,7 @@
logger = get_logger()
class TestConformerInferencePipelines(unittest.TestCase):
    def test_funasr_path(self):
        import funasr
@@ -28,6 +29,7 @@
            audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav')
        logger.info("asr inference result: {0}".format(rec_result))
class TestData2vecInferencePipelines(unittest.TestCase):
    def test_funasr_path(self):
        import funasr
@@ -51,5 +53,20 @@
        logger.info("asr inference result: {0}".format(rec_result))
class TestMfccaInferencePipelines(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_alimeeting(self):
        inference_pipeline = pipeline(
            task=Tasks.auto_speech_recognition,
            model='NPU-ASLP/speech_mfcca_asr-zh-cn-16k-alimeeting-vocab4950')
        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))
if __name__ == '__main__':
    unittest.main()