开发者社区 > ModelScope模型即服务 > 语音 > 正文

报RuntimeError的bug的修复过程

RuntimeError: AutomaticSpeechRecognitionPipeline: Error(s) in loading state_dict for FSMN:
    Missing key(s) in state_dict: "fsmn.0.0.linear.weight", "fsmn.0.1.conv_left.weight", "fsmn.0.2.linear.weight", "fsmn.0.2.linear.bias", "fsmn.1.0.linear.weight", "fsmn.1.1.conv_left.weight", "fsmn.1.2.linear.weight", "fsmn.1.2.linear.bias", "fsmn.2.0.linear.weight", "fsmn.2.1.conv_left.weight", "fsmn.2.2.linear.weight", "fsmn.2.2.linear.bias", "fsmn.3.0.linear.weight", "fsmn.3.1.conv_left.weight", "fsmn.3.2.linear.weight", "fsmn.3.2.linear.bias". 
    Unexpected key(s) in state_dict: "fsmn.0.linear.linear.weight", "fsmn.0.fsmn_block.conv_left.weight", "fsmn.0.affine.linear.weight", "fsmn.0.affine.linear.bias", "fsmn.1.linear.linear.weight", "fsmn.1.fsmn_block.conv_left.weight", "fsmn.1.affine.linear.weight", "fsmn.1.affine.linear.bias", "fsmn.2.linear.linear.weight", "fsmn.2.fsmn_block.conv_left.weight", "fsmn.2.affine.linear.weight", "fsmn.2.affine.linear.bias", "fsmn.3.linear.linear.weight", "fsmn.3.fsmn_block.conv_left.weight", "fsmn.3.affine.linear.weight", "fsmn.3.affine.linear.bias". 

之前有一个帖子也是同样的错误,但是呢,官方小编丢下一句

请更新modelscope版本:https://github.com/alibaba-damo-academy/FunASR#installation

这里需要更新到指定版本,需要modelspace>1.4,需要检查清楚


pip install "modelscope[audio_asr]" --upgrade -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
git clone https://github.com/alibaba/FunASR.git && cd FunASR
pip install --editable ./

展开
收起
游客xs36fpzxzdece 2023-03-25 14:27:40 740 0
1 条回答
写回答
取消 提交回答
  • 您好,感谢您的反馈,欢迎加入我们的钉钉交流群(搜索群号27215013275,或扫码加入),如有任何问题可及时交流~

    此报错可更新至modelscope和funasr的最新版本即可解决,若更新后依然报错,可联系我们的钉钉群的值班同学来协助解决

    dingding.jpg

    2023-04-03 10:50:38
    赞同 展开评论 打赏

包括语音识别、语音合成、语音唤醒、声学设计及信号处理、声纹识别、音频事件检测等多个领域

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载