From 1358e8a5fcba9d9da4ed1478a91f217e8c211fc0 Mon Sep 17 00:00:00 2001 From: Yabin Li <wucong.lyb@alibaba-inc.com> Date: 星期一, 08 五月 2023 19:49:51 +0800 Subject: [PATCH] Merge pull request #476 from alibaba-damo-academy/dev_grpc --- funasr/runtime/python/websocket/README.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/funasr/runtime/python/websocket/README.md b/funasr/runtime/python/websocket/README.md index 8f6c883..4764232 100644 --- a/funasr/runtime/python/websocket/README.md +++ b/funasr/runtime/python/websocket/README.md @@ -23,16 +23,42 @@ ### Start server #### ASR offline server ```shell +python ws_server_offline.py \ +--port [port id] \ +--asr_model [asr model_name] \ +--punc_model [punc model_name] \ +--ngpu [0 or 1] \ +--ncpu [1 or 4] +``` +`e.g.` +```shell python ws_server_offline.py --port 10095 --asr_model "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch" ``` #### ASR streaming server ```shell +python ws_server_online.py \ +--port [port id] \ +--asr_model_online [asr model_name] \ +--ngpu [0 or 1] \ +--ncpu [1 or 4] +``` +`e.g.` +```shell python ws_server_online.py --port 10095 --asr_model_online "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online" ``` #### ASR offline/online 2pass server - +```shell +python ws_server_2pass.py \ +--port [port id] \ +--asr_model [asr model_name] \ +--asr_model_online [asr model_name] \ +--punc_model [punc model_name] \ +--ngpu [0 or 1] \ +--ncpu [1 or 4] +``` +`e.g.` ```shell python ws_server_2pass.py --port 10095 --asr_model "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch" --asr_model_online "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online" ``` @@ -48,6 +74,18 @@ ### Start client +```shell +python ws_client.py \ +--host [ip_address] \ +--port [port id] \ +--chunk_size ["5,10,5"=600ms, "8,8,4"=480ms] \ +--chunk_interval [duration of send chunk_size/chunk_interval] \ +--words_max_print [max number of words to print] \ +--audio_in [if set, loadding from wav.scp, else recording from mircrophone] \ +--output_dir [if set, write the results to output_dir] \ +--send_without_sleep [only set for offline] +``` + #### ASR offline client ##### Recording from mircrophone ```shell -- Gitblit v1.9.1