FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

使用funasr-onnx-online-asr测试paraformer_streaming训练的onnx导出模型出现c++段错误

Open QDPeng opened this issue 10 months ago • 3 comments

🐛 Bug

  • 使用funasr-onnx-online-asr测试paraformer_streaming训练的onnx到处模型出现c++段错误
  • 报错位置:funasr-onnx-online-asr.cpp文件148行,FunASRInferBuffer推理函数
  • 使用modelscope上的基础模型能正常运行:speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx

To Reproduce

  • 使用funasr-1.0.19 examples/industrial_data_pretraining/paraformer_streaming目录下的微调脚本训练模型
  • 基础模型使用iic/speech_paraformer_asr_nat-zh-cn-16k-common-vocab8404-online,并保持config配置一致
  • 模型导出使用export.sh

Code sample

model="outputs"

python -m funasr.bin.export \
++model=${model} \
++type="onnx" \
++quantize=true \
++device="cpu" \
++debug=false

onnx推理

funasr-onnx-online-asr --model-dir outputs --quantize true --audio-fs 16000 --wav-path $wavfile

Environment

  • OS : ubuntu22.04
  • FunASR Version 1.0.19
  • PyTorch Version: 2.2.1
  • How you installed funasr : pip
  • Python version: 3.10

QDPeng avatar Mar 29 '24 07:03 QDPeng

more logs, more details

lyblsgo avatar Apr 01 '24 01:04 lyblsgo

gdb onnx: 1.15.0, onnxruntime: 1.17.1

more logs, more details

QDPeng avatar Apr 01 '24 01:04 QDPeng

more logs, more details

it's config.yaml problem, should write tokens into config.yaml

QDPeng avatar Apr 01 '24 08:04 QDPeng

if the issue persists, you can reopen the issue.

lyblsgo avatar May 28 '24 05:05 lyblsgo