Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

websocket

游雁074bd57273f9
diff --git a/funasr/runtime/python/websocket/README.md b/funasr/runtime/python/websocket/README.md
index ba7230ae7..723782f74 100644
--- a/funasr/runtime/python/websocket/README.md
+++ b/funasr/runtime/python/websocket/README.md
@@ -5,7 +5,7 @@ The audio data is in streaming, the asr inference process is in offline.
## For the Server
-Install the modelscope and funasr
+### Install the modelscope and funasr
```shell
pip install -U modelscope funasr
@@ -14,23 +14,34 @@ pip install -U modelscope funasr
git clone https://github.com/alibaba/FunASR.git && cd FunASR
```
-Install the requirements for server
+### Install the requirements for server
```shell
cd funasr/runtime/python/websocket
pip install -r requirements_server.txt
```
-Start server
+### Start server
+#### ASR offline server
-```shell
-python ASR_server.py --host "0.0.0.0" --port 10095 --asr_model "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
-```
-For the paraformer 2pass model
+[//]: # (```shell)
+[//]: # (python ws_server_online.py --host "0.0.0.0" --port 10095 --asr_model "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch")
+
+[//]: # (```)
+#### ASR streaming server
```shell
-python ASR_server_2pass.py --host "0.0.0.0" --port 10095 --asr_model "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
+python ws_server_online.py --host "0.0.0.0" --port 10095
```
+####
+
+#### ASR offline/online 2pass server
+
+[//]: # (```shell)
+
+[//]: # (python ws_server_online.py --host "0.0.0.0" --port 10095 --asr_model "damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch")
+
+[//]: # (```)
## For the client
@@ -44,8 +55,10 @@ pip install -r requirements_client.txt
Start client
```shell
-python ASR_client.py --host "127.0.0.1" --port 10095 --chunk_size 50
+# --chunk_size, "5,10,5"=600ms, "8,8,4"=480ms
+python ws_client.py --host "127.0.0.1" --port 10096 --chunk_size "5,10,5"
```
## Acknowledge
-1. We acknowledge [cgisky1980](https://github.com/cgisky1980/FunASR) for contributing the websocket service.
+1. This project is maintained by [FunASR community](https://github.com/alibaba-damo-academy/FunASR).
+2. We acknowledge [cgisky1980](https://github.com/cgisky1980/FunASR) for contributing the websocket service.