mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
add paraformer online UnitTest
This commit is contained in:
parent
1f2a51be98
commit
589b115a1f
@ -112,6 +112,22 @@ class TestParaformerInferencePipelines(unittest.TestCase):
|
|||||||
audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav')
|
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))
|
logger.info("asr inference result: {0}".format(rec_result))
|
||||||
|
|
||||||
|
def test_paraformer_large_online_common(self):
|
||||||
|
inference_pipeline = pipeline(
|
||||||
|
task=Tasks.auto_speech_recognition,
|
||||||
|
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online')
|
||||||
|
rec_result = inference_pipeline(
|
||||||
|
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))
|
||||||
|
|
||||||
|
def test_paraformer_online_common(self):
|
||||||
|
inference_pipeline = pipeline(
|
||||||
|
task=Tasks.auto_speech_recognition,
|
||||||
|
model='damo/speech_paraformer_asr_nat-zh-cn-16k-common-vocab8404-online')
|
||||||
|
rec_result = inference_pipeline(
|
||||||
|
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))
|
||||||
|
|
||||||
def test_paraformer_tiny_commandword(self):
|
def test_paraformer_tiny_commandword(self):
|
||||||
inference_pipeline = pipeline(
|
inference_pipeline = pipeline(
|
||||||
task=Tasks.auto_speech_recognition,
|
task=Tasks.auto_speech_recognition,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user