From 9019db91274ca2dc6112cc9f369b6795b415ec5b Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期日, 02 七月 2023 09:16:31 +0800
Subject: [PATCH] Dev deploy (#696)

---
 funasr/runtime/docs/SDK_tutorial_zh.md |   85 ++++++++++++++++++++++++++----------------
 1 files changed, 52 insertions(+), 33 deletions(-)

diff --git a/funasr/runtime/docs/SDK_tutorial_zh.md b/funasr/runtime/docs/SDK_tutorial_zh.md
index 1fe26bd..4b4909f 100644
--- a/funasr/runtime/docs/SDK_tutorial_zh.md
+++ b/funasr/runtime/docs/SDK_tutorial_zh.md
@@ -16,15 +16,24 @@
 
 ## 蹇�熶笂鎵�
 
+### 鏈嶅姟绔惎鍔�
 閫氳繃浠ヤ笅鍛戒护杩愯涓�閿儴缃叉湇鍔★紝鎸夌収鎻愮ず閫愭瀹屾垚FunASR runtime-SDK鏈嶅姟鐨勯儴缃插拰杩愯銆傜洰鍓嶆殏鏃朵粎鏀寔Linux鐜锛屽叾浠栫幆澧冨弬鑰冩枃妗楂橀樁寮�鍙戞寚鍗梋(./SDK_advanced_guide_cn.md)
 
 ```shell
-curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/funasr-runtime-deploy.sh; sudo bash funasr-runtime-deploy.sh install
+curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/dev_deploy/funasr/runtime/funasr-runtime-deploy-offline-cpu-zh.sh; sudo bash funasr-runtime-deploy-offline-cpu-zh.sh install
 # 濡傞亣鍒扮綉缁滈棶棰橈紝涓浗澶ч檰鐢ㄦ埛锛屽彲浠ョ敤涓笅闈㈢殑鍛戒护锛�
-# curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy.sh; sudo bash funasr-runtime-deploy.sh install
+# curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-offline-cpu-zh.sh; sudo bash funasr-runtime-deploy-offline-cpu-zh install
 ```
 
-## 娴嬭瘯涓庝娇鐢�
+### 瀹㈡埛绔祴璇曚笌浣跨敤
+
+鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屽叾浠栫増鏈鎴风璇峰弬鑰僛寮�鍙戞寚鍗梋()
+
+```shell
+python3 wss_client_asr.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav" --send_without_sleep --output_dir "./results"
+```
+
+## 瀹㈡埛绔敤娉曡瑙�
 
 鍦ㄦ湇鍔″櫒涓婂畬鎴怓unASR鏈嶅姟閮ㄧ讲浠ュ悗锛屽彲浠ラ�氳繃濡備笅鐨勬楠ゆ潵娴嬭瘯鍜屼娇鐢ㄧ绾挎枃浠惰浆鍐欐湇鍔°��
 鐩墠鍒嗗埆鏀寔浠ヤ笅鍑犵缂栫▼璇█瀹㈡埛绔�
@@ -36,7 +45,7 @@
 
 鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屽叾浠栫増鏈鎴风璇峰弬鑰僛寮�鍙戞寚鍗梋()
 
-#### python-client
+### python-client
 鑻ユ兂鐩存帴杩愯client杩涜娴嬭瘯锛屽彲鍙傝�冨涓嬬畝鏄撹鏄庯紝浠ython鐗堟湰涓轰緥锛�
 
 ```shell
@@ -77,26 +86,26 @@
 
 [//]: # (```)
 
-## 鏈嶅姟绔父瑙佹搷浣滀粙缁�
+## 鏈嶅姟绔敤娉曡瑙�
 
 ### 鍚姩宸茬粡閮ㄧ讲杩囩殑FunASR鏈嶅姟
 涓�閿儴缃插悗鑻ュ嚭鐜伴噸鍚數鑴戠瓑鍏抽棴Docker鐨勫姩浣滐紝鍙�氳繃濡備笅鍛戒护鐩存帴鍚姩FunASR鏈嶅姟锛屽惎鍔ㄩ厤缃负涓婃涓�閿儴缃茬殑璁剧疆銆�
 
 ```shell
-sudo bash funasr-runtime-deploy.sh start
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh start
 ```
 
 ### 鍏抽棴FunASR鏈嶅姟
 
 ```shell
-sudo bash funasr-runtime-deploy.sh stop
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh stop
 ```
 
 ### 閲嶅惎FunASR鏈嶅姟
 
 鏍规嵁涓婃涓�閿儴缃茬殑璁剧疆閲嶅惎鍚姩FunASR鏈嶅姟銆�
 ```shell
-sudo bash funasr-runtime-deploy.sh restart
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh restart
 ```
 
 ### 鏇挎崲妯″瀷骞堕噸鍚疐unASR鏈嶅姟
@@ -104,49 +113,59 @@
 鏇挎崲姝e湪浣跨敤鐨勬ā鍨嬶紝骞堕噸鏂板惎鍔‵unASR鏈嶅姟銆傛ā鍨嬮渶涓篗odelScope涓殑ASR/VAD/PUNC妯″瀷锛屾垨鑰呬粠ModelScope涓ā鍨媐inetune鍚庣殑妯″瀷銆�
 
 ```shell
-sudo bash funasr-runtime-deploy.sh update model <model ID>
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update [asr_model | vad_model | punc_model] <model_id or local model path>
 
 e.g
-sudo bash funasr-runtime-deploy.sh update model damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update asr_model damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
+```
+
+### 鏇存柊鍙傛暟骞堕噸鍚疐unASR鏈嶅姟
+
+鏇存柊宸查厤缃弬鏁帮紝骞堕噸鏂板惎鍔‵unASR鏈嶅姟鐢熸晥銆傚彲鏇存柊鍙傛暟鍖呮嫭瀹夸富鏈哄拰Docker鐨勭鍙e彿锛屼互鍙婃帹鐞嗗拰IO鐨勭嚎绋嬫暟閲忋��
+
+```shell
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update [host_port | docker_port] <port number>
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update [decode_thread_num | io_thread_num] <the number of threads>
+
+e.g
+sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update decode_thread_num 32
 ```
 
 
-### 鏈嶅姟绔惎鍔ㄨ繃绋嬮厤缃瑙�
+## 鏈嶅姟绔惎鍔ㄨ繃绋嬮厤缃瑙�
+
+##### 璁剧疆瀹夸富鏈虹殑宸ヤ綔绌洪棿璺緞
+榛樿灏嗗湪鎿嶄綔鐩綍涓嬪垱寤篺unasr-runtime-sdk浣滀负宸ヤ綔绌洪棿璺緞
+```text
+[1/6]
+  Please enter the local path of workspace.
+  Setting the local path of workspace, default(/root/funasr-runtime-sdk): 
+  The local workspace path is /root/funasr-runtime-sdk .
+  The models will store in local path(/root/funasr-runtime-sdk/models) during the run.
+```
 
 ##### 閫夋嫨FunASR Docker闀滃儚
-鎺ㄨ崘閫夋嫨latest浣跨敤鎴戜滑鐨勬渶鏂伴暅鍍忥紝涔熷彲閫夋嫨鍘嗗彶鐗堟湰銆�
+鎺ㄨ崘閫夋嫨1)浣跨敤鎴戜滑鐨勬渶鏂板彂甯冪増闀滃儚锛屼篃鍙�夋嫨鍘嗗彶鐗堟湰銆�
 ```text
-[1/9]
+[2/6]
+  Getting the list of docker images, please wait a few seconds.
+    [DONE]
+
   Please choose the Docker image.
-    1) registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-latest
-    2) registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.1.0
-  Enter your choice: 1
-  You have chosen the Docker image: registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-latest
+    1) registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.1.0
+  Enter your choice, default(1): 
+  You have chosen the Docker image: registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.1.0
 ```
 
 
 ##### 璁剧疆瀹夸富鏈烘彁渚涚粰FunASR鐨勭鍙�
 璁剧疆鎻愪緵缁橠ocker鐨勫涓绘満绔彛锛岄粯璁や负10095銆傝淇濊瘉姝ょ鍙e彲鐢ㄣ��
 ```text
-[4/9]
+[3/6]
   Please input the opened port in the host used for FunASR server.
-  Default: 10095
-  Setting the opened host port [1-65535]: 
+  Setting the opened host port [1-65535], default(10095): 
   The port of the host is 10095
   The port in Docker for FunASR server is 10095
-```
-
-
-##### 璁剧疆FunASR鏈嶅姟鐨勬帹鐞嗙嚎绋嬫暟
-璁剧疆FunASR鏈嶅姟鐨勬帹鐞嗙嚎绋嬫暟锛岄粯璁や负瀹夸富鏈烘牳鏁帮紝鍚屾椂鑷姩璁剧疆鏈嶅姟鐨処O绾跨▼鏁帮紝涓烘帹鐞嗙嚎绋嬫暟鐨勫洓鍒嗕箣涓�銆�
-```text
-[5/9]
-  Please input thread number for FunASR decoder.
-  Default: 1
-  Setting the number of decoder thread: 
-
-  The number of decoder threads is 1
-  The number of IO threads is 1
 ```
 
 

--
Gitblit v1.9.1