Yabin Li
2023-05-08 1358e8a5fcba9d9da4ed1478a91f217e8c211fc0
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