From d80ac2fd2df4e7fb8a28acfa512bb11472b5cc99 Mon Sep 17 00:00:00 2001
From: liugz18 <57401541+liugz18@users.noreply.github.com>
Date: 星期四, 18 七月 2024 21:34:55 +0800
Subject: [PATCH] Rename 'res' in line 514 to avoid with naming conflict with line 365
---
runtime/docs/SDK_advanced_guide_offline_en_zh.md | 92 +++++++++++++++------------------------------
1 files changed, 31 insertions(+), 61 deletions(-)
diff --git a/runtime/docs/SDK_advanced_guide_offline_en_zh.md b/runtime/docs/SDK_advanced_guide_offline_en_zh.md
index bbdb8a9..3d65343 100644
--- a/runtime/docs/SDK_advanced_guide_offline_en_zh.md
+++ b/runtime/docs/SDK_advanced_guide_offline_en_zh.md
@@ -4,6 +4,16 @@
鏈枃妗d负FunASR绂荤嚎鏂囦欢杞啓鏈嶅姟寮�鍙戞寚鍗椼�傚鏋滄偍鎯冲揩閫熶綋楠岀绾挎枃浠惰浆鍐欐湇鍔★紝鍙弬鑰僛蹇�熶笂鎵媇(#蹇�熶笂鎵�)銆�
+| 鏃堕棿 | 璇︽儏 | 闀滃儚鐗堟湰 | 闀滃儚ID |
+|------------|---------------|---------------------------------|--------------|
+| 2024.05.15 | 閫傞厤FunASR 1.0妯″瀷缁撴瀯 | funasr-runtime-sdk-en-cpu-0.1.6 | 84d781d07997 |
+| 2024.03.05 | docker闀滃儚鏀寔arm64骞冲彴锛屽崌绾odelscope鐗堟湰 | funasr-runtime-sdk-en-cpu-0.1.5 | 7cca2abc5901 |
+| 2024.01.25 | 浼樺寲vad鏁版嵁澶勭悊鏂瑰紡锛屽ぇ骞呴檷浣庡嘲鍊煎唴瀛樺崰鐢紱鍐呭瓨娉勬紡浼樺寲 | funasr-runtime-sdk-en-cpu-0.1.3 | c00f9ce7a195 |
+| 2024.01.03 | 淇宸茬煡鐨刢rash闂鍙婂唴瀛樻硠婕忛棶棰� | funasr-runtime-sdk-en-cpu-0.1.2 | 0cdd9f4a4bb5 |
+| 2023.11.08 | runtime缁撴瀯鍙樺寲閫傞厤 | funasr-runtime-sdk-en-cpu-0.1.1 | 27017f70f72a |
+| 2023.10.16 | 1.0 鍙戝竷 | funasr-runtime-sdk-en-cpu-0.1.0 | e0de03eb0163 |
+
+
## 鏈嶅姟鍣ㄩ厤缃�
鐢ㄦ埛鍙互鏍规嵁鑷繁鐨勪笟鍔¢渶姹傦紝閫夋嫨鍚堥�傜殑鏈嶅姟鍣ㄩ厤缃紝鎺ㄨ崘閰嶇疆涓猴細
@@ -17,7 +27,6 @@
## 蹇�熶笂鎵�
-
### docker瀹夎
濡傛灉鎮ㄥ凡瀹夎docker锛屽拷鐣ユ湰姝ラ锛�!
閫氳繃涓嬭堪鍛戒护鍦ㄦ湇鍔″櫒涓婂畨瑁卍ocker锛�
@@ -25,20 +34,18 @@
curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/install_docker.sh锛�
sudo bash install_docker.sh
```
+docker瀹夎澶辫触璇峰弬鑰� [Docker Installation](https://alibaba-damo-academy.github.io/FunASR/en/installation/docker.html)
### 闀滃儚鍚姩
-
閫氳繃涓嬭堪鍛戒护鎷夊彇骞跺惎鍔‵unASR runtime-SDK鐨刣ocker闀滃儚锛�
-
```shell
sudo docker pull \
- registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.1
+ registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.6
mkdir -p ./funasr-runtime-resources/models
-sudo docker run -p 10095:10095 -it --privileged=true \
+sudo docker run -p 10097:10095 -it --privileged=true \
-v $PWD/funasr-runtime-resources/models:/workspace/models \
- registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.1
+ registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-en-cpu-0.1.6
```
-濡傛灉鎮ㄦ病鏈夊畨瑁卍ocker锛屽彲鍙傝�僛Docker瀹夎](#Docker瀹夎)
### 鏈嶅姟绔惎鍔�
@@ -49,7 +56,7 @@
--download-model-dir /workspace/models \
--vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
--model-dir damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx \
- --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx > log.out 2>&1 &
+ --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx > log.txt 2>&1 &
# 濡傛灉鎮ㄦ兂鍏抽棴ssl锛屽鍔犲弬鏁帮細--certfile 0
@@ -63,37 +70,10 @@
```
鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屾敮鎸佸绉嶉煶棰戞牸寮忚緭鍏ワ紙.wav, .pcm, .mp3绛夛級锛屼篃鏀寔瑙嗛杈撳叆(.mp4绛�)锛屼互鍙婂鏂囦欢鍒楄〃wav.scp杈撳叆锛屽叾浠栫増鏈鎴风璇峰弬鑰冩枃妗o紙[鐐瑰嚮姝ゅ](#瀹㈡埛绔敤娉曡瑙�)锛夛紝瀹氬埗鏈嶅姟閮ㄧ讲璇峰弬鑰僛濡備綍瀹氬埗鏈嶅姟閮ㄧ讲](#濡備綍瀹氬埗鏈嶅姟閮ㄧ讲)
```shell
-python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav"
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10097 --mode offline --audio_in "../audio/asr_example.wav"
```
------------------
-## Docker瀹夎
-
-涓嬭堪姝ラ涓烘墜鍔ㄥ畨瑁卍ocker鐜鐨勬楠わ細
-
-### docker鐜瀹夎
-```shell
-# Ubuntu锛�
-curl -fsSL https://test.docker.com -o test-docker.sh
-sudo sh test-docker.sh
-# Debian锛�
-curl -fsSL https://get.docker.com -o get-docker.sh
-sudo sh get-docker.sh
-# CentOS锛�
-curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
-# MacOS锛�
-brew install --cask --appdir=/Applications docker
-```
-
-瀹夎璇﹁锛歨ttps://alibaba-damo-academy.github.io/FunASR/en/installation/docker.html
-
-### docker鍚姩
-
-```shell
-sudo systemctl start docker
-```
-
-
## 瀹㈡埛绔敤娉曡瑙�
鍦ㄦ湇鍔″櫒涓婂畬鎴怓unASR鏈嶅姟閮ㄧ讲浠ュ悗锛屽彲浠ラ�氳繃濡備笅鐨勬楠ゆ潵娴嬭瘯鍜屼娇鐢ㄧ绾挎枃浠惰浆鍐欐湇鍔°��
@@ -108,7 +88,7 @@
鑻ユ兂鐩存帴杩愯client杩涜娴嬭瘯锛屽彲鍙傝�冨涓嬬畝鏄撹鏄庯紝浠ython鐗堟湰涓轰緥锛�
```shell
-python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline \
+python3 funasr_wss_client.py --host "127.0.0.1" --port 10097 --mode offline \
--audio_in "../audio/asr_example.wav" --output_dir "./results"
```
@@ -116,7 +96,7 @@
```text
--host 涓篎unASR runtime-SDK鏈嶅姟閮ㄧ讲鏈哄櫒ip锛岄粯璁や负鏈満ip锛�127.0.0.1锛夛紝濡傛灉client涓庢湇鍔′笉鍦ㄥ悓涓�鍙版湇鍔″櫒锛�
闇�瑕佹敼涓洪儴缃叉満鍣╥p
---port 10095 閮ㄧ讲绔彛鍙�
+--port 10097 閮ㄧ讲绔彛鍙�
--mode offline琛ㄧず绂荤嚎鏂囦欢杞啓
--audio_in 闇�瑕佽繘琛岃浆鍐欑殑闊抽鏂囦欢锛屾敮鎸佹枃浠惰矾寰勶紝鏂囦欢鍒楄〃wav.scp
--thread_num 璁剧疆骞跺彂鍙戦�佺嚎绋嬫暟锛岄粯璁や负1
@@ -128,7 +108,7 @@
### cpp-client
杩涘叆samples/cpp鐩綍鍚庯紝鍙互鐢╟pp杩涜娴嬭瘯锛屾寚浠ゅ涓嬶細
```shell
-./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav
+./funasr-wss-client --server-ip 127.0.0.1 --port 10097 --wav-path ../audio/asr_example.wav
```
鍛戒护鍙傛暟璇存槑锛�
@@ -136,7 +116,7 @@
```text
--server-ip 涓篎unASR runtime-SDK鏈嶅姟閮ㄧ讲鏈哄櫒ip锛岄粯璁や负鏈満ip锛�127.0.0.1锛夛紝濡傛灉client涓庢湇鍔′笉鍦ㄥ悓涓�鍙版湇鍔″櫒锛�
闇�瑕佹敼涓洪儴缃叉満鍣╥p
---port 10095 閮ㄧ讲绔彛鍙�
+--port 10097 閮ㄧ讲绔彛鍙�
--wav-path 闇�瑕佽繘琛岃浆鍐欑殑闊抽鏂囦欢锛屾敮鎸佹枃浠惰矾寰�
--hotword 鐑瘝鏂囦欢锛屾瘡琛屼竴涓儹璇嶏紝鏍煎紡(鐑瘝 鏉冮噸)锛氶樋閲屽反宸� 20
--use-itn 璁剧疆鏄惁浣跨敤itn锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴
@@ -151,11 +131,9 @@
### Java-client
```shell
-FunasrWsClient --host localhost --port 10095 --audio_in ./asr_example.wav --mode offline
+FunasrWsClient --host localhost --port 10097 --audio_in ./asr_example.wav --mode offline
```
璇︾粏鍙互鍙傝�冩枃妗o紙[鐐瑰嚮姝ゅ](../java/readme.md)锛�
-
-
## 鏈嶅姟绔敤娉曡瑙o細
@@ -167,25 +145,22 @@
--model-dir damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx \
--vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
--punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx \
- --decoder-thread-num 32 \
- --io-thread-num 8 \
- --port 10095 \
--certfile ../../../ssl_key/server.crt \
- --keyfile ../../../ssl_key/server.key > log.out 2>&1 &
+ --keyfile ../../../ssl_key/server.key > log.txt 2>&1 &
```
**run_server.sh鍛戒护鍙傛暟浠嬬粛**
```text
--download-model-dir 妯″瀷涓嬭浇鍦板潃锛岄�氳繃璁剧疆model ID浠嶮odelscope涓嬭浇妯″瀷
---model-dir modelscope model ID
---quantize True涓洪噺鍖朅SR妯″瀷锛孎alse涓洪潪閲忓寲ASR妯″瀷锛岄粯璁ゆ槸True
---vad-dir modelscope model ID
---vad-quant True涓洪噺鍖朧AD妯″瀷锛孎alse涓洪潪閲忓寲VAD妯″瀷锛岄粯璁ゆ槸True
---punc-dir modelscope model ID
---punc-quant True涓洪噺鍖朠UNC妯″瀷锛孎alse涓洪潪閲忓寲PUNC妯″瀷锛岄粯璁ゆ槸True
---itn-dir modelscope model ID
+--model-dir modelscope model ID 鎴栬�� 鏈湴妯″瀷璺緞
+--vad-dir modelscope model ID 鎴栬�� 鏈湴妯″瀷璺緞
+--punc-dir modelscope model ID 鎴栬�� 鏈湴妯″瀷璺緞
+--itn-dir modelscope model ID 鎴栬�� 鏈湴妯″瀷璺緞
--port 鏈嶅姟绔洃鍚殑绔彛鍙凤紝榛樿涓� 10095
---decoder-thread-num 鏈嶅姟绔惎鍔ㄧ殑鎺ㄧ悊绾跨▼鏁帮紝榛樿涓� 8
---io-thread-num 鏈嶅姟绔惎鍔ㄧ殑IO绾跨▼鏁帮紝榛樿涓� 1
+--decoder-thread-num 鏈嶅姟绔嚎绋嬫睜涓暟(鏀寔鐨勬渶澶у苟鍙戣矾鏁�)锛�
+ 鑴氭湰浼氭牴鎹湇鍔″櫒绾跨▼鏁拌嚜鍔ㄩ厤缃甦ecoder-thread-num銆乮o-thread-num
+--io-thread-num 鏈嶅姟绔惎鍔ㄧ殑IO绾跨▼鏁�
+--model-thread-num 姣忚矾璇嗗埆鐨勫唴閮ㄧ嚎绋嬫暟(鎺у埗ONNX妯″瀷鐨勫苟琛�)锛岄粯璁や负 1锛�
+ 鍏朵腑寤鸿 decoder-thread-num*model-thread-num 绛変簬鎬荤嚎绋嬫暟
--certfile ssl鐨勮瘉涔︽枃浠讹紝榛樿涓猴細../../../ssl_key/server.crt锛屽鏋滈渶瑕佸叧闂璼sl锛屽弬鏁拌缃负0
--keyfile ssl鐨勫瘑閽ユ枃浠讹紝榛樿涓猴細../../../ssl_key/server.key
```
@@ -212,14 +187,12 @@
--certfile 0
```
-
鎵ц涓婅堪鎸囦护鍚庯紝鍚姩鑻辨枃绂荤嚎鏂囦欢杞啓鏈嶅姟銆傚鏋滄ā鍨嬫寚瀹氫负ModelScope涓璵odel id锛屼細鑷姩浠嶮oldeScope涓笅杞藉涓嬫ā鍨嬶細
[FSMN-VAD妯″瀷](https://www.modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx/summary),
[Paraformer-lagre妯″瀷](https://www.modelscope.cn/models/damo/speech_paraformer-large_asr_nat-en-16k-common-vocab10020-onnx/summary),
[CT-Transformer鏍囩偣棰勬祴妯″瀷](https://www.modelscope.cn/models/damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx/summary)
濡傛灉锛屾偍甯屾湜閮ㄧ讲鎮╢inetune鍚庣殑妯″瀷锛堜緥濡�10epoch.pb锛夛紝闇�瑕佹墜鍔ㄥ皢妯″瀷閲嶅懡鍚嶄负model.pb锛屽苟灏嗗師modelscope涓ā鍨媘odel.pb鏇挎崲鎺夛紝灏嗚矾寰勬寚瀹氫负`model_dir`鍗冲彲銆�
-
## 濡備綍瀹氬埗鏈嶅姟閮ㄧ讲
@@ -235,9 +208,6 @@
### 鑷畾涔夊鎴风锛�
濡傛灉鎮ㄦ兂瀹氫箟鑷繁鐨刢lient锛屽弬鑰僛websocket閫氫俊鍗忚](./websocket_protocol_zh.md)
-
-
-```
### c++ 鏈嶅姟绔細
--
Gitblit v1.9.1