run_server.sh 1.2 KB

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