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

Paraformer语音识别-中文-通用-16k-离线-large-pytorch 运行demo异常

2023-03-16 14:56:35,348 - modelscope - INFO - loading punctuation model from /mnt/workspace/.cache/modelscope/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch ... Traceback (most recent call last): File "/opt/conda/lib/python3.7/site-packages/modelscope/utils/registry.py", line 212, in build_from_cfg return obj_cls(**args) File "/opt/conda/lib/python3.7/site-packages/modelscope/pipelines/audio/asr_inference_pipeline.py", line 151, in init decoding_mode=self.cmd['decoding_mode'], File "/opt/conda/lib/python3.7/site-packages/funasr/bin/asr_inference_launch.py", line 227, in inference_launch return inference_modelscope(**kwargs) File "/opt/conda/lib/python3.7/site-packages/funasr/bin/asr_inference_paraformer_vad_punc.py", line 518, in inference_modelscope speech2vadsegment = Speech2VadSegment(**speech2vadsegment_kwargs) File "/opt/conda/lib/python3.7/site-packages/funasr/bin/asr_inference_paraformer_vad_punc.py", line 321, in init vad_infer_config, vad_model_file, device File "/opt/conda/lib/python3.7/site-packages/funasr/tasks/vad.py", line 340, in build_model_from_file model.encoder.load_state_dict(model_dict) File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1498, in load_state_dict self.class.name, "\n\t".join(error_msgs))) RuntimeError: 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".

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "long.py", line 10, in punc_model_revision="v1.1.6") File "/opt/conda/lib/python3.7/site-packages/modelscope/pipelines/builder.py", line 141, in pipeline return build_pipeline(cfg, task_name=task) File "/opt/conda/lib/python3.7/site-packages/modelscope/pipelines/builder.py", line 55, in build_pipeline cfg, PIPELINES, group_key=task_name, default_args=default_args) File "/opt/conda/lib/python3.7/site-packages/modelscope/utils/registry.py", line 215, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') 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".

展开
收起
tc_net 2023-03-16 15:12:23 830 0
1 条回答
写回答
取消 提交回答
  • 请更新modelscope版本:https://github.com/alibaba-damo-academy/FunASR#installation

    也可以加入钉钉群,及时沟通您遇到的问题: https://github.com/alibaba-damo-academy/FunASR#contact

    2023-03-21 13:52:34
    赞同 展开评论 打赏

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

相关产品

  • 智能语音交互
  • 相关电子书

    更多
    阿里云总监课第二期——IoT时代的语音交互智能 立即下载
    阿里云总监课第二期——Latency Controlled-BLSTM模型在语音识别中的应用 立即下载
    智能语音交互:阿里巴巴的研究与实践 立即下载