mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
Update test_asr_inference_pipeline.py
This commit is contained in:
parent
ba3d455b21
commit
b1b087abd6
@ -119,20 +119,24 @@ class TestParaformerInferencePipelines(unittest.TestCase):
|
||||
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')
|
||||
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online',
|
||||
model_revision='v1.0.6',
|
||||
update_model=False)
|
||||
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))
|
||||
assert rec_result["text"] == "欢迎大 家来 体验达 摩院推 出的 语音识 别模 型"
|
||||
assert rec_result["text"] == "欢迎大家来体验达摩院推出的语音识别模型"
|
||||
|
||||
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')
|
||||
model='damo/speech_paraformer_asr_nat-zh-cn-16k-common-vocab8404-online',
|
||||
model_revision='v1.0.6',
|
||||
update_model=False)
|
||||
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))
|
||||
assert rec_result["text"] == "欢迎 大家来 体验达 摩院推 出的 语音识 别模 型"
|
||||
assert rec_result["text"] == "欢迎大家来体验达摩院推出的语音识别模型"
|
||||
|
||||
def test_paraformer_tiny_commandword(self):
|
||||
inference_pipeline = pipeline(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user