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

个性化语音合成训练 [ONNXRuntimeError]:7:INVALID_PROTOBUF

模型:
SambertHifigan语音合成-中文-多人预训练-16k
https://modelscope.cn/models/speech_tts/speech_sambert-hifigan_tts_zh-cn_multisp_pretrain_16k/summary

训练 部分

trainer = build_trainer(
    Trainers.speech_kantts_trainer, default_args=kwargs)
trainer.train()
# 就是上面这句,在本地环境,阿里云ECS+EAIS实例上,都会报同样错误。
# 魔搭提供的Notebook GPU版本可以通过。
  • 本地Docker环境,GPU 检查 与命令 nvidia-smi,都正常
    image.png

  • ECS+EAIS环境,查看GPU命令eais_smi,也可以通过

但这两个环境都还是会报同样错误

  File "voicegen.py", line 135, in tune
    trainer.train()
  File "/opt/conda/lib/python3.7/site-packages/modelscope/trainers/audio/tts_trainer.py", line 229, in train
    self.prepare_data()
  File "/opt/conda/lib/python3.7/site-packages/modelscope/trainers/audio/tts_trainer.py", line 208, in prepare_data
    se_model)
  File "/opt/conda/lib/python3.7/site-packages/modelscope/preprocessors/tts.py", line 37, in __call__
    speaker_name, target_lang, skip_script, se_model)
  File "/opt/conda/lib/python3.7/site-packages/modelscope/preprocessors/tts.py", line 57, in do_data_process
    targetLang, skip_script, se_model)
  File "/opt/conda/lib/python3.7/site-packages/kantts/preprocess/data_process.py", line 200, in process_data
    se_model,
  File "/opt/conda/lib/python3.7/site-packages/kantts/preprocess/se_processor/se_processor.py", line 67, in process
    sess = onnxruntime.InferenceSession(se_onnx, sess_options=opts)
  File "/opt/conda/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 360, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "/opt/conda/lib/python3.7/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 397, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
onnxruntime.capi.onnxruntime_pybind11_state.InvalidProtobuf: [ONNXRuntimeError] : 7 : INVALID_PROTOBUF : Load model from /work/voiceswork/raymond/pretrain/orig_model/basemodel_16k/speaker_embedding/se.onnx failed:Protobuf parsing failed.
# python -c "import torch;torch.zeros([1]).cuda();torch.version.cuda;torch.backends.cudnn.version();torch.cuda.is_available()"

求解,在线等

展开
收起
冠群 2023-09-21 11:00:24 1051 0
2 条回答
写回答
取消 提交回答
  • 原因是onnx文件损坏,很可能是下载模型的时候中途中断了,读取的模型不完整。老的文件删掉,重新下载完整的。

    2023-12-07 12:44:40
    赞同 展开评论 打赏
  • 解决了吗

    2023-11-15 08:01:08
    赞同 展开评论 打赏

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

相关电子书

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