赞
踩
import torch
torch.__version__
torch.cuda.is_available()
import modelscope
import funasr
modelscope.__version__
funasr.__version__
测试推理代码
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')
rec_result = inference_pipeline(audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav')
print(rec_result)
预期输出:
{'text': '欢迎大家来体验达摩院推出的语音识别模型'}
python=3.8 pytorch=1.12.1 cudatoolkit=11.3 modelscope=1.3.0 funasr=0.2.1
备注:如果克隆不下来FunAsr,
apt-get update
apt-get install libcurl4-openssl-dev
卸载
funasr pip uninstall funasr
更新
pip install “modelscope[audio]” --upgrade -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
pip install “funasr” --upgrade -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。