开发者社区 > ModelScope模型即服务 > 自然语言处理 > 正文

modelscope-funasr这个报错怎么处理?

modelscope-funasr这个报错怎么处理?Docker version (e.g., funasr-runtime-sdk-cpu-0.4.4)

华为npu,uname -a信息:Linux localhost.localdomain 5.10.0-60.18.0.50.oe2203.aarch64 #1 SMP Wed Mar 30 02:43:08 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

在我docker pull funasr-runtime-sdk-cpu-0.4.4镜像后,run镜像,进入容器后启动python 自行编写了几句脚本测试推理

from funasr import AutoModel
model = AutoModel(model="paraformer-zh", vad_model="fsmn-vad", punc_model="ct-punc")
res = model.generate(input="/workspace/test_202407.wav")

该音频是16k单声道
报错:

res = model.generate(input="/workspace/test_202407.wav")
0%| | 0/1 [00:00<?, ?it/s]Traceback (most recent call last):
File "", line 1, in
File "/workspace/FunASR/funasr/auto/auto_model.py", line 215, in generate
return self.inference_with_vad(input, input_len=input_len, cfg)
File "/workspace/FunASR/funasr/auto/auto_model.py", line 281, in inference_with_vad
res = self.inference(input, input_len=input_len, model=self.vad_model, kwargs=self.vad_kwargs,
cfg)
File "/workspace/FunASR/funasr/auto/auto_model.py", line 248, in inference
results, meta_data = model.inference(batch, kwargs)
File "/workspace/FunASR/funasr/models/fsmn_vad_streaming/model.py", line 580, in inference
audio_sample_list = load_audio_text_image_video(data_in,
File "/workspace/FunASR/funasr/utils/load_utils.py", line 31, in load_audio_text_image_video
return [load_audio_text_image_video(audio, fs=fs, audio_fs=audio_fs, data_type=data_type, kwargs) for audio in data_or_path_or_list]
File "/workspace/FunASR/funasr/utils/load_utils.py", line 31, in
return [load_audio_text_image_video(audio, fs=fs, audio_fs=audio_fs, data_type=data_type,
kwargs) for audio in data_or_path_or_list]
File "/workspace/FunASR/funasr/utils/load_utils.py", line 37, in load_audio_text_image_video
data_or_path_or_list, audio_fs = torchaudio.load(data_or_path_or_list)
File "/usr/local/lib/python3.8/site-packages/torchaudio/_backend/utils.py", line 204, in load
backend = dispatcher(uri, format, backend)
File "/usr/local/lib/python3.8/site-packages/torchaudio/_backend/utils.py", line 116, in dispatcher
raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.")
RuntimeError: Couldn't find appropriate backend to handle uri /workspace/test_202407.wav and format None.

展开
收起
三分钟热度的鱼 2024-07-24 20:40:22 35 0
1 条回答
写回答
取消 提交回答
  • 你安装一下sox或者ffmpeg 此回答整理自钉群“modelscope-funasr社区交流”

    2024-07-24 22:09:55
    赞同 12 展开评论 打赏

包含命名实体识别、文本分类、分词、关系抽取、问答、推理、文本摘要、情感分析、机器翻译等多个领域

热门讨论

热门文章

相关电子书

更多
视觉AI能力的开放现状及ModelScope实战 立即下载
ModelScope助力语音AI模型创新与应用 立即下载
低代码开发师(初级)实战教程 立即下载