run_server.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. decoder_thread_num=32
  6. io_thread_num=8
  7. port=10095
  8. certfile="../../../ssl_key/server.crt"
  9. keyfile="../../../ssl_key/server.key"
  10. . ../../egs/aishell/transformer/utils/parse_options.sh || exit 1;
  11. cd /workspace/FunASR/funasr/runtime/websocket/build/bin
  12. if [ -z "$certfile" ] || [ "$certfile" -eq 0 ]; then
  13. ./funasr-wss-server \
  14. --download-model-dir ${download_model_dir} \
  15. --model-dir ${model_dir} \
  16. --vad-dir ${vad_dir} \
  17. --punc-dir ${punc_dir} \
  18. --decoder-thread-num ${decoder_thread_num} \
  19. --io-thread-num ${io_thread_num} \
  20. --port ${port} \
  21. --certfile "" \
  22. --keyfile ""
  23. else
  24. ./funasr-wss-server \
  25. --download-model-dir ${download_model_dir} \
  26. --model-dir ${model_dir} \
  27. --vad-dir ${vad_dir} \
  28. --punc-dir ${punc_dir} \
  29. --decoder-thread-num ${decoder_thread_num} \
  30. --io-thread-num ${io_thread_num} \
  31. --port ${port} \
  32. --certfile ${certfile} \
  33. --keyfile ${keyfile}
  34. fi