modelscope / FunASR

A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
https://www.funasr.com
Other
7.04k stars 752 forks source link

C++ runtime core dump in image funasr-runtime-sdk-online-cpu-0.1.11 #2133

Open lhanzl opened 1 month ago

lhanzl commented 1 month ago

Notice: In order to resolve issues more efficiently, please raise issue following the template. (注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

🐛 Bug

To Reproduce

Steps to reproduce the behavior (always include the command you ran):

  1. 进入容器,注释掉run_server_2pass.sh脚本中的itn_dir, lm_dir, certfile, keyfile,hotword,然后启动服务 修改后脚本如下:
model_dir="damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx"
online_model_dir="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx"
vad_dir="damo/speech_fsmn_vad_zh-cn-16k-common-onnx"
punc_dir="damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx"
#itn_dir="thuduj12/fst_itn_zh"
#lm_dir="damo/speech_ngram_lm_zh-cn-ai-wesp-fst"
port=10095
#certfile="$(pwd)/ssl_key/server.crt"
#keyfile="$(pwd)/ssl_key/server.key"
#hotword="$(pwd)/websocket/hotwords.txt"
# set decoder_thread_num
decoder_thread_num=$(cat /proc/cpuinfo | grep "processor"|wc -l) || { echo "Get cpuinfo failed. Set decoder_thread_num = 32"; decoder_thread_num=32; }
multiple_io=16
io_thread_num=$(( (decoder_thread_num + multiple_io - 1) / multiple_io ))
model_thread_num=1
cmd_path=/workspace/FunASR/runtime/websocket/build/bin
cmd=funasr-wss-server-2pass

. ./tools/utils/parse_options.sh || exit 1;

if [ -z "$certfile" ] || [ "$certfile" = "0" ]; then
  certfile=""
  keyfile=""
fi

cd $cmd_path
$cmd_path/${cmd}  \
  --download-model-dir "${download_model_dir}" \
  --model-dir "${model_dir}" \
  --online-model-dir "${online_model_dir}" \
  --vad-dir "${vad_dir}" \
  --punc-dir "${punc_dir}" \
  --itn-dir "${itn_dir}" \
  --lm-dir "${lm_dir}" \
  --decoder-thread-num ${decoder_thread_num} \
  --model-thread-num ${model_thread_num} \
  --io-thread-num  ${io_thread_num} \
  --port ${port} \
  --certfile  "${certfile}" \
  --keyfile "${keyfile}" \
  --hotword "${hotword}"
  1. Test service cd /workspace/FunASR/runtime/websocket ./build/bin/funasr-wss-client-2pass --mode 2pass --server-ip 127.0.0.1 --port 10095 --wav-path $audio --is-ssl 0 稍长些(30s~60s)的语音,服务会core dump。如果不能复现请在wav.scp中多放一些音频。
  2. analysis 我发现服务dump在onnxruntime/src/funasrruntime.cpp(FetchTpass)的588行之后某个地方。

Code sample

Expected behavior

Environment

Additional context