run_server_2pass.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. download_model_dir="/workspace/models"
  2. model_dir="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx"
  3. online_model_dir="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx"
  4. vad_dir="damo/speech_fsmn_vad_zh-cn-16k-common-onnx"
  5. punc_dir="damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx"
  6. itn_dir="thuduj12/fst_itn_zh"
  7. decoder_thread_num=32
  8. model_thread_num=1
  9. io_thread_num=8
  10. port=10095
  11. certfile="../../../ssl_key/server.crt"
  12. keyfile="../../../ssl_key/server.key"
  13. hotword="../../hotwords.txt"
  14. . ../egs/aishell/transformer/utils/parse_options.sh || exit 1;
  15. cd /workspace/FunASR/runtime/websocket/build/bin
  16. if [ -z "$certfile" ] || [ "$certfile" -eq 0 ]; then
  17. ./funasr-wss-server-2pass \
  18. --download-model-dir "${download_model_dir}" \
  19. --model-dir "${model_dir}" \
  20. --online-model-dir "${online_model_dir}" \
  21. --vad-dir "${vad_dir}" \
  22. --punc-dir "${punc_dir}" \
  23. --itn-dir "${itn_dir}" \
  24. --decoder-thread-num ${decoder_thread_num} \
  25. --model-thread-num ${model_thread_num} \
  26. --io-thread-num ${io_thread_num} \
  27. --port ${port} \
  28. --certfile "" \
  29. --keyfile "" \
  30. --hotword "${hotword}"
  31. else
  32. ./funasr-wss-server-2pass \
  33. --download-model-dir "${download_model_dir}" \
  34. --model-dir "${model_dir}" \
  35. --online-model-dir "${online_model_dir}" \
  36. --vad-dir "${vad_dir}" \
  37. --punc-dir "${punc_dir}" \
  38. --itn-dir "${itn_dir}" \
  39. --decoder-thread-num ${decoder_thread_num} \
  40. --model-thread-num ${model_thread_num} \
  41. --io-thread-num ${io_thread_num} \
  42. --port ${port} \
  43. --certfile "${certfile}" \
  44. --keyfile "${keyfile}" \
  45. --hotword "${hotword}"
  46. fi