运行模型"iic/speech_paraformer-large-vad-punc-spk_asr_nat-zh-cn",报错:KeyError: 'funasr-pipeline is not in the pipelines registry group auto-speech-recognition. Please make sure the correct version of ModelScope library is used.'
详情报错如下:
File /opt/conda/lib/python3.10/site-packages/modelscope/utils/registry.py:198, in build_from_cfg(cfg, registry, group_key, default_args)
196 obj_cls = registry.get(obj_type, group_key=group_key)
197 if obj_cls is None:
--> 198 raise KeyError(
199 f'{obj_type} is not in the {registry.name}'
200 f' registry group {group_key}. Please make'
201 f' sure the correct version of ModelScope library is used.')
202 obj_cls.group_key = group_key
203 elif inspect.isclass(obj_type) or inspect.isfunction(obj_type):
KeyError: 'funasr-pipeline is not in the pipelines registry group auto-speech-recognition. Please make sure the correct version of ModelScope library is used.'
请问如何解决
分角色语音识别通常需要特殊的数据格式或标签来指示不同说话人的身份。确保提供的训练数据包含正确的角色标注,并且在输入模型之前正确地进行了格式转换。
针对模型“iic/speech_paraformer-large-vad-punc-spk_asr_nat-zh-cn”运行时报错的问题,错误信息显示"funasr-pipeline"未在“auto-speech-recognition”注册组中找到。为解决此问题,请确保您安装的是ModelScope库的正确版本,该版本包含了所需模型的相关组件。您可以尝试以下步骤:
pip install --upgrade modelscope
根据你提供的错误信息,你在尝试使用ModelScope库加载一个名为“funasr-pipeline”的自动语音识别pipeline,但是该pipeline并未在auto-speech-recognition注册组中找到。
为了解决这个问题,请按照以下步骤操作:
pip show modelscope
# 如果需要更新
pip install --upgrade modelscope