FunASR/funasr/runtime/run_server_2pass.sh
Yabin Li 61ed60695a
coauthor:duj12, add itn;add timestamp、hotword to 2pass; (#966)
* Add ITN,include openfst/gflags in onnxruntime/third_party.

* 2pass server support Hotword and Timestamp. The start_time of each segment need to be fix.

* add global time start and end of each frame(both online and offline), support two-pass timestamp(both segment and token level).

* update websocket cmake.

* 2pass server support itn, hw and tp.

* Add local build and run. Add timestamp in 2pass server, update cmakelist.

* fix filemode bug in h5, avoid 2pass wss server close before final.

* offline server add itn.

* offline server add ITN.

* update hotword model dir.

* Add Acknowledgement to WeTextProcessing(https://github.com/wenet-e2e/WeTextProcessing)

* adapted to original FunASR.

* adapted to itn timestamp hotword

* merge from main (#949)

* fix empty timestamp list inference

* punc large

* fix decoding_ind none bug

* fix decoding_ind none bug

* docs

* setup

* change eng punc in offline model

* update contextual export

* update proc for oov in hotword onnx inference

* add python http code (#940)

* funasr-onnx 0.2.2

* funasr-onnx 0.2.3

* bug fix in timestamp inference

* fix bug in timestamp inference

* Update preprocessor.py

---------

Co-authored-by: shixian.shi <shixian.shi@alibaba-inc.com>
Co-authored-by: 游雁 <zhifu.gzf@alibaba-inc.com>
Co-authored-by: haoneng.lhn <haoneng.lhn@alibaba-inc.com>
Co-authored-by: mengzhe.cmz <mengzhe.cmz@alibaba-inc.com>
Co-authored-by: Xian Shi <40013335+R1ckShi@users.noreply.github.com>
Co-authored-by: chenmengzheAAA <123789350+chenmengzheAAA@users.noreply.github.com>
Co-authored-by: 夜雨飘零 <yeyupiaoling@foxmail.com>

* update docs

* update deploy_tools

---------

Co-authored-by: dujing <dujing@xmov.ai>
Co-authored-by: Jean Du <37294470+duj12@users.noreply.github.com>
Co-authored-by: shixian.shi <shixian.shi@alibaba-inc.com>
Co-authored-by: 游雁 <zhifu.gzf@alibaba-inc.com>
Co-authored-by: haoneng.lhn <haoneng.lhn@alibaba-inc.com>
Co-authored-by: mengzhe.cmz <mengzhe.cmz@alibaba-inc.com>
Co-authored-by: Xian Shi <40013335+R1ckShi@users.noreply.github.com>
Co-authored-by: chenmengzheAAA <123789350+chenmengzheAAA@users.noreply.github.com>
Co-authored-by: 夜雨飘零 <yeyupiaoling@foxmail.com>
2023-09-19 10:09:58 +08:00

44 lines
1.4 KiB
Bash

download_model_dir="/workspace/models"
model_dir="damo/speech_paraformer-large_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"
decoder_thread_num=32
io_thread_num=8
port=10095
certfile="../../../ssl_key/server.crt"
keyfile="../../../ssl_key/server.key"
. ../../egs/aishell/transformer/utils/parse_options.sh || exit 1;
cd /workspace/FunASR/funasr/runtime/websocket/build/bin
if [ -z "$certfile" ] || [ "$certfile" -eq 0 ]; then
./funasr-wss-server-2pass \
--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} \
--decoder-thread-num ${decoder_thread_num} \
--io-thread-num ${io_thread_num} \
--port ${port} \
--certfile "" \
--keyfile ""
else
./funasr-wss-server-2pass \
--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} \
--decoder-thread-num ${decoder_thread_num} \
--io-thread-num ${io_thread_num} \
--port ${port} \
--certfile ${certfile} \
--keyfile ${keyfile}
fi