run_server.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. hotwordsfile="../../hotwords.txt"
  12. . ../../egs/aishell/transformer/utils/parse_options.sh || exit 1;
  13. cd /workspace/FunASR/funasr/runtime/websocket/build/bin
  14. if [ -z "$certfile" ] || [ "$certfile" -eq 0 ]; then
  15. ./funasr-wss-server \
  16. --download-model-dir ${download_model_dir} \
  17. --model-dir ${model_dir} \
  18. --vad-dir ${vad_dir} \
  19. --punc-dir ${punc_dir} \
  20. --itn-dir ${itn_dir} \
  21. --decoder-thread-num ${decoder_thread_num} \
  22. --io-thread-num ${io_thread_num} \
  23. --port ${port} \
  24. --certfile "" \
  25. --keyfile "" \
  26. --hotwordsfile ${hotwordsfile}
  27. else
  28. ./funasr-wss-server \
  29. --download-model-dir ${download_model_dir} \
  30. --model-dir ${model_dir} \
  31. --vad-dir ${vad_dir} \
  32. --punc-dir ${punc_dir} \
  33. --itn-dir ${itn_dir} \
  34. --decoder-thread-num ${decoder_thread_num} \
  35. --io-thread-num ${io_thread_num} \
  36. --port ${port} \
  37. --certfile ${certfile} \
  38. --keyfile ${keyfile} \
  39. --hotwordsfile ${hotwordsfile}
  40. fi