From 1d7bbbffb6a024a33859b48a7a656d0455dc0be1 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 16 十月 2023 11:47:59 +0800
Subject: [PATCH] Update README.md
---
funasr/runtime/python/websocket/README.md | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/funasr/runtime/python/websocket/README.md b/funasr/runtime/python/websocket/README.md
index 756efd6..f318fd9 100644
--- a/funasr/runtime/python/websocket/README.md
+++ b/funasr/runtime/python/websocket/README.md
@@ -43,9 +43,6 @@
Install the requirements for client
```shell
-apt-get install -y ffmpeg #ubuntu
-# yum install -y ffmpeg # centos
-
git clone https://github.com/alibaba/FunASR.git && cd FunASR
cd funasr/runtime/python/websocket
pip install -r requirements_client.txt
@@ -110,6 +107,20 @@
# --chunk_size, "5,10,5"=600ms, "8,8,4"=480ms
python funasr_wss_client.py --host "0.0.0.0" --port 10095 --mode 2pass --chunk_size "8,8,4" --audio_in "./data/wav.scp" --output_dir "./results"
```
+
+#### Websocket api
+```shell
+ # class Funasr_websocket_recognizer example with 3 step
+ # 1.create an recognizer
+ rcg=Funasr_websocket_recognizer(host="127.0.0.1",port="30035",is_ssl=True,mode="2pass")
+ # 2.send pcm data to asr engine and get asr result
+ text=rcg.feed_chunk(data)
+ print("text",text)
+ # 3.get last result, set timeout=3
+ text=rcg.close(timeout=3)
+ print("text",text)
+```
+
## Acknowledge
1. This project is maintained by [FunASR community](https://github.com/alibaba-damo-academy/FunASR).
2. We acknowledge [zhaoming](https://github.com/zhaomingwork/FunASR/tree/fix_bug_for_python_websocket) for contributing the websocket service.
--
Gitblit v1.9.1