wenet-e2e / wenet

Production First and Production Ready End-to-End Speech Recognition Toolkit
https://wenet-e2e.github.io/wenet/
Apache License 2.0
4.08k stars 1.07k forks source link

arm平台运行onnxruntime报错 #2518

Closed JingZe818 closed 4 months ago

JingZe818 commented 4 months ago

command:

export LD_LIBRARY_PATH=.:/usr/local/cuda/lib64:/usr/local/cuda/lib64:
export GLOG_logtostderr=1
export GLOG_v=1
sudo chmod +x ./decoder_main
onnx_dir=onnx_out_final
./decoder_main   \
   --chunk_size 16 \
   --num_left_chunks -1 \
   --onnx_dir $onnx_dir \
   --unit_path $onnx_dir/units.txt \
   --wav_scp wav.scp 

ERROR: I0129 07:55:42.610312 1970 params.h:169] Reading onnx model I0129 07:55:53.230854 1970 onnx_asr_model.cc:128] Onnx Model Info: I0129 07:55:53.230944 1970 onnx_asr_model.cc:129] encoder_output_size 256 I0129 07:55:53.230984 1970 onnx_asr_model.cc:130] num_blocks 12 I0129 07:55:53.231015 1970 onnx_asr_model.cc:131] head 4 I0129 07:55:53.231045 1970 onnx_asr_model.cc:132] cnn_module_kernel 8 I0129 07:55:53.231074 1970 onnx_asr_model.cc:133] subsampling_rate 4 I0129 07:55:53.231104 1970 onnx_asr_model.cc:134] right_context 6 I0129 07:55:53.231132 1970 onnx_asr_model.cc:135] sos 2 I0129 07:55:53.231161 1970 onnx_asr_model.cc:136] eos 2 I0129 07:55:53.231190 1970 onnx_asr_model.cc:137] is bidirectional decoder 1 I0129 07:55:53.231240 1970 onnx_asr_model.cc:138] chunk_size 16 I0129 07:55:53.231269 1970 onnx_asr_model.cc:139] num_left_chunks -1 I0129 07:55:53.231298 1970 onnx_asr_model.cc:142] Onnx Encoder: I0129 07:55:53.231421 1970 onnx_asr_model.cc:53] Input 0 : name=chunk type=1 dims=1 -1 80 I0129 07:55:53.231523 1970 onnx_asr_model.cc:53] Input 1 : name=offset type=7 dims= I0129 07:55:53.231598 1970 onnx_asr_model.cc:53] Input 2 : name=att_cache type=1 dims=12 4 -1 128 I0129 07:55:53.231667 1970 onnx_asr_model.cc:53] Input 3 : name=cnn_cache type=1 dims=12 1 256 7 I0129 07:55:53.231739 1970 onnx_asr_model.cc:71] Output 0 : name=output type=1 dims=-1 -1 256 I0129 07:55:53.231806 1970 onnx_asr_model.cc:71] Output 1 : name=r_att_cache type=1 dims=12 4 -1 128 I0129 07:55:53.231873 1970 onnx_asr_model.cc:71] Output 2 : name=r_cnn_cache type=1 dims=12 1 256 -1 I0129 07:55:53.231916 1970 onnx_asr_model.cc:144] Onnx CTC: I0129 07:55:53.231976 1970 onnx_asr_model.cc:53] Input 0 : name=hidden type=1 dims=1 -1 256 I0129 07:55:53.232048 1970 onnx_asr_model.cc:71] Output 0 : name=probs type=1 dims=1 -1 4233 I0129 07:55:53.232090 1970 onnx_asr_model.cc:146] Onnx Rescore: I0129 07:55:53.232151 1970 onnx_asr_model.cc:53] Input 0 : name=hyps type=7 dims=-1 -1 I0129 07:55:53.232215 1970 onnx_asr_model.cc:53] Input 1 : name=hyps_lens type=7 dims=-1 I0129 07:55:53.232285 1970 onnx_asr_model.cc:53] Input 2 : name=encoder_out type=1 dims=1 -1 256 I0129 07:55:53.232355 1970 onnx_asr_model.cc:71] Output 0 : name=score type=1 dims=-1 -1 4233 I0129 07:55:53.232420 1970 onnx_asr_model.cc:71] Output 1 : name=r_score type=1 dims=-1 -1 4233 I0129 07:55:53.232477 1970 params.h:221] Reading unit table onnx_out_final/units.txt F0129 07:55:53.304996 1970 decoder_main.cc:147] Check failed: strs.size() >= 2 (1 vs. 2) Check failure stack trace: @ 0x208ca8 google::LogMessage::Fail() @ 0x208b9c google::LogMessage::SendToLog() @ 0x2086b6 google::LogMessage::Flush() @ 0x20b18a google::LogMessageFatal::~LogMessageFatal() @ 0x3cc6a main @ 0xb62f90e6 (unknown) run_test.sh: line 11: 1970 Aborted (core dumped) ./decoder_main --chunk_size 16 --num_left_chunks -1 --onnx_dir $onnx_dir --unit_path $onnx_dir/units.txt --wav_scp wav.scp

JingZe818 commented 4 months ago

根据decoder_main.cc相应代码修改指令参数即可解决