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 ./
您好,感谢您的反馈,欢迎加入我们的钉钉交流群(搜索群号27215013275,或扫码加入),如有任何问题可及时交流~
此报错可更新至modelscope和funasr的最新版本即可解决,若更新后依然报错,可联系我们的钉钉群的值班同学来协助解决