From ffb05b9ae7eccc47416e9e7fae9dea54d400a245 Mon Sep 17 00:00:00 2001 From: 雾聪 <wucong.lyb@alibaba-inc.com> Date: 星期四, 10 八月 2023 19:05:51 +0800 Subject: [PATCH] Merge branch 'main' of https://github.com/alibaba-damo-academy/FunASR into main --- funasr/runtime/docs/SDK_tutorial_zh.md | 56 +++++++++++++++++--------------------------------------- 1 files changed, 17 insertions(+), 39 deletions(-) diff --git a/funasr/runtime/docs/SDK_tutorial_zh.md b/funasr/runtime/docs/SDK_tutorial_zh.md index 9532326..94a9479 100644 --- a/funasr/runtime/docs/SDK_tutorial_zh.md +++ b/funasr/runtime/docs/SDK_tutorial_zh.md @@ -1,3 +1,5 @@ +(绠�浣撲腑鏂噟[English](./SDK_tutorial.md)) + # FunASR绂荤嚎鏂囦欢杞啓鏈嶅姟渚挎嵎閮ㄧ讲鏁欑▼ FunASR鎻愪緵鍙究鎹锋湰鍦版垨鑰呬簯绔湇鍔″櫒閮ㄧ讲鐨勭绾挎枃浠惰浆鍐欐湇鍔★紝鍐呮牳涓篎unASR宸插紑婧恟untime-SDK銆� @@ -12,28 +14,30 @@ 璇︾粏鎬ц兘娴嬭瘯鎶ュ憡锛圼鐐瑰嚮姝ゅ](./benchmark_onnx_cpp.md)锛� -浜戞湇鍔″巶鍟嗭紝閽堝鏂扮敤鎴凤紝鏈�3涓湀鍏嶈垂璇曠敤娲诲姩锛岀敵璇锋暀绋嬶紙[鐐瑰嚮姝ゅ](./aliyun_server_tutorial.md)锛� +浜戞湇鍔″巶鍟嗭紝閽堝鏂扮敤鎴凤紝鏈�3涓湀鍏嶈垂璇曠敤娲诲姩锛岀敵璇锋暀绋嬶紙[鐐瑰嚮姝ゅ](https://github.com/alibaba-damo-academy/FunASR/blob/main/funasr/runtime/docs/aliyun_server_tutorial.md)锛� ## 蹇�熶笂鎵� ### 鏈嶅姟绔惎鍔� +`娉ㄦ剰`锛氫竴閿儴缃插伐鍏凤紝杩囩▼鍒嗕负锛氬畨瑁卍ocker銆佷笅杞絛ocker闀滃儚銆佸惎鍔ㄦ湇鍔°�傚鏋滅敤鎴峰笇鏈涚洿鎺ヤ粠FunASR docker闀滃儚鍚姩锛屽彲浠ュ弬鑰冨紑鍙戞寚鍗楋紙[鐐瑰嚮姝ゅ](./SDK_advanced_guide_offline_zh.md)锛� + 涓嬭浇閮ㄧ讲宸ュ叿`funasr-runtime-deploy-offline-cpu-zh.sh` ```shell curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/funasr/runtime/deploy_tools/funasr-runtime-deploy-offline-cpu-zh.sh; -# 濡傞亣鍒扮綉缁滈棶棰橈紝涓浗澶ч檰鐢ㄦ埛锛屽彲浠ョ敤涓笅闈㈢殑鍛戒护锛� +# 濡傞亣鍒扮綉缁滈棶棰橈紝涓浗澶ч檰鐢ㄦ埛锛屽彲浠ヤ娇鐢ㄤ笅闈㈢殑鍛戒护锛� # curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/funasr-runtime-deploy-offline-cpu-zh.sh; ``` 鎵ц閮ㄧ讲宸ュ叿锛屽湪鎻愮ず澶勮緭鍏ュ洖杞﹂敭鍗冲彲瀹屾垚鏈嶅姟绔畨瑁呬笌閮ㄧ讲銆傜洰鍓嶄究鎹烽儴缃插伐鍏锋殏鏃朵粎鏀寔Linux鐜锛屽叾浠栫幆澧冮儴缃插弬鑰冨紑鍙戞寚鍗楋紙[鐐瑰嚮姝ゅ](./SDK_advanced_guide_offline_zh.md)锛� ```shell -sudo bash funasr-runtime-deploy-offline-cpu-zh.sh install --workspace /root/funasr-runtime-resources +sudo bash funasr-runtime-deploy-offline-cpu-zh.sh install --workspace ./funasr-runtime-resources ``` ### 瀹㈡埛绔祴璇曚笌浣跨敤 -杩愯涓婇潰瀹夎鎸囦护鍚庯紝浼氬湪/root/funasr-runtime-resources锛堥粯璁ゅ畨瑁呯洰褰曪級涓笅杞藉鎴风娴嬭瘯宸ュ叿鐩綍samples锛� +杩愯涓婇潰瀹夎鎸囦护鍚庯紝浼氬湪/root/funasr-runtime-resources锛堥粯璁ゅ畨瑁呯洰褰曪級涓笅杞藉鎴风娴嬭瘯宸ュ叿鐩綍samples锛堟墜鍔ㄤ笅杞斤紝[鐐瑰嚮姝ゅ](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/sample/funasr_samples.tar.gz)锛夛紝 鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屾敮鎸佸绉嶉煶棰戞牸寮忚緭鍏ワ紙.wav, .pcm, .mp3绛夛級锛屼篃鏀寔瑙嗛杈撳叆(.mp4绛�)锛屼互鍙婂鏂囦欢鍒楄〃wav.scp杈撳叆锛屽叾浠栫増鏈鎴风璇峰弬鑰冩枃妗o紙[鐐瑰嚮姝ゅ](#瀹㈡埛绔敤娉曡瑙�)锛� ```shell @@ -47,10 +51,10 @@ - [Python](#python-client) - [CPP](#cpp-client) -- [html缃戦〉鐗堟湰](#Html缃戦〉鐗�) -- [Java](#Java-client) +- [html](#html-client) +- [java](#java-client) -鏇村鐗堟湰瀹㈡埛绔敮鎸佽鍙傝�僛寮�鍙戞寚鍗梋(./SDK_advanced_guide_offline_zh.md) +鏇村鐗堟湰瀹㈡埛绔敮鎸佽鍙傝�僛websocket/grpc鍗忚](./websocket_protocol_zh.md) ### python-client 鑻ユ兂鐩存帴杩愯client杩涜娴嬭瘯锛屽彲鍙傝�冨涓嬬畝鏄撹鏄庯紝浠ython鐗堟湰涓轰緥锛� @@ -85,13 +89,13 @@ --ssl 璁剧疆鏄惁寮�鍚痵sl璇佷功鏍¢獙锛岄粯璁�1寮�鍚紝璁剧疆涓�0鍏抽棴 ``` -### Html缃戦〉鐗� +### html-client 鍦ㄦ祻瑙堝櫒涓墦寮� html/static/index.html锛屽嵆鍙嚭鐜板涓嬮〉闈紝鏀寔楹﹀厠椋庤緭鍏ヤ笌鏂囦欢涓婁紶锛岀洿鎺ヨ繘琛屼綋楠� <img src="images/html.png" width="900"/> -### Java-client +### java-client ```shell FunasrWsClient --host localhost --port 10095 --audio_in ./asr_example.wav --mode offline @@ -153,40 +157,14 @@ sudo bash funasr-runtime-deploy-offline-cpu-zh.sh update --workspace /root/funasr-runtime-resources ``` +### 鍏抽棴SSL璇佷功 -## 鏈嶅姟绔惎鍔ㄨ繃绋嬮厤缃瑙� - -### 閫夋嫨FunASR Docker闀滃儚 -鎺ㄨ崘閫夋嫨1)浣跨敤鎴戜滑鐨勬渶鏂板彂甯冪増闀滃儚锛屼篃鍙�夋嫨鍘嗗彶鐗堟湰銆� -```text -[1/5] - 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-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 -[2/5] - Please input the opened port in the host used for FunASR server. - 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 -``` - -### 璁剧疆SSL - -榛樿寮�鍚疭SL鏍¢獙锛屽鏋滈渶瑕佸叧闂紝鍙互鍦ㄥ惎鍔ㄦ椂璁剧疆 ```shell -sudo bash funasr-runtime-deploy-offline-cpu-zh.sh --ssl 0 +sudo bash funasr-runtime-deploy-online-cpu-zh.sh update --ssl 0 ``` + + ## 鑱旂郴鎴戜滑 鍦ㄦ偍浣跨敤杩囩▼涓紝濡傛灉閬囧埌闂锛屾杩庡姞鍏ョ敤鎴风兢杩涜鍙嶉 -- Gitblit v1.9.1