From 748fabf22fee0de834d8cd4a7bec0ba4a456d8c4 Mon Sep 17 00:00:00 2001 From: 游雁 <zhifu.gzf@alibaba-inc.com> Date: 星期三, 05 七月 2023 16:45:06 +0800 Subject: [PATCH] funasr sdk --- funasr/runtime/docs/SDK_tutorial_zh.md | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/funasr/runtime/docs/SDK_tutorial_zh.md b/funasr/runtime/docs/SDK_tutorial_zh.md index 9860af3..08ecf8a 100644 --- a/funasr/runtime/docs/SDK_tutorial_zh.md +++ b/funasr/runtime/docs/SDK_tutorial_zh.md @@ -10,6 +10,8 @@ - 閰嶇疆2: 锛圶86锛岃绠楀瀷锛夛紝16鏍竩CPU锛屽唴瀛�32G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�64璺殑璇锋眰 - 閰嶇疆3: 锛圶86锛岃绠楀瀷锛夛紝64鏍竩CPU锛屽唴瀛�128G锛屽崟鏈哄彲浠ユ敮鎸佸ぇ绾�200璺殑璇锋眰 +璇︾粏鎬ц兘娴嬭瘯鎶ュ憡锛圼鐐瑰嚮姝ゅ](./benchmark_onnx_cpp.md)锛� + 浜戞湇鍔″巶鍟嗭紝閽堝鏂扮敤鎴凤紝鏈�3涓湀鍏嶈垂璇曠敤娲诲姩锛岀敵璇锋暀绋嬶紙[鐐瑰嚮姝ゅ](./aliyun_server_tutorial.md)锛� ## 蹇�熶笂鎵� @@ -24,7 +26,7 @@ # 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_zh.md)锛� +鎵ц閮ㄧ讲宸ュ叿锛屽湪鎻愮ず澶勮緭鍏ュ洖杞﹂敭鍗冲彲瀹屾垚鏈嶅姟绔畨瑁呬笌閮ㄧ讲銆傜洰鍓嶄究鎹烽儴缃插伐鍏锋殏鏃朵粎鏀寔Linux鐜锛屽叾浠栫幆澧冮儴缃插弬鑰冨紑鍙戞寚鍗楋紙[鐐瑰嚮姝ゅ](./SDK_advanced_guide_offline_zh.md)锛� ```shell sudo bash funasr-runtime-deploy-offline-cpu-zh.sh install --workspace /root/funasr-runtime-resources ``` @@ -35,7 +37,7 @@ 鎴戜滑浠ython璇█瀹㈡埛绔负渚嬶紝杩涜璇存槑锛屾敮鎸佸绉嶉煶棰戞牸寮忚緭鍏ワ紙.wav, .pcm, .mp3绛夛級锛屼篃鏀寔瑙嗛杈撳叆(.mp4绛�)锛屼互鍙婂鏂囦欢鍒楄〃wav.scp杈撳叆锛屽叾浠栫増鏈鎴风璇峰弬鑰冩枃妗o紙[鐐瑰嚮姝ゅ](#瀹㈡埛绔敤娉曡瑙�)锛� ```shell -python3 wss_client_asr.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav" --output_dir "./results" +python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav" --output_dir "./results" ``` ## 瀹㈡埛绔敤娉曡瑙� @@ -45,8 +47,8 @@ - [Python](#python-client) - [CPP](#cpp-client) -- [Java]() - [html缃戦〉鐗堟湰](#Html缃戦〉鐗�) +- [Java](#Java-client) 鏇村鐗堟湰瀹㈡埛绔敮鎸佽鍙傝�僛寮�鍙戞寚鍗梋(./SDK_advanced_guide_offline_zh.md) @@ -54,7 +56,7 @@ 鑻ユ兂鐩存帴杩愯client杩涜娴嬭瘯锛屽彲鍙傝�冨涓嬬畝鏄撹鏄庯紝浠ython鐗堟湰涓轰緥锛� ```shell -python3 wss_client_asr.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav" --output_dir "./results" +python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode offline --audio_in "../audio/asr_example.wav" --output_dir "./results" ``` 鍛戒护鍙傛暟璇存槑锛� @@ -69,7 +71,6 @@ ### cpp-client 杩涘叆samples/cpp鐩綍鍚庯紝鍙互鐢╟pp杩涜娴嬭瘯锛屾寚浠ゅ涓嬶細 ```shell -export LD_LIBRARY_PATH=./libs:$LD_LIBRARY_PATH ./funasr-wss-client --server-ip 127.0.0.1 --port 10095 --wav-path ../audio/asr_example.wav ``` @@ -87,6 +88,12 @@ <img src="images/html.png" width="900"/> +### Java-client + +```shell +FunasrWsClient --host localhost --port 10095 --audio_in ./asr_example.wav --mode offline +``` +璇︾粏鍙互鍙傝�冩枃妗o紙[鐐瑰嚮姝ゅ](../java/readme.md)锛� ## 鏈嶅姟绔敤娉曡瑙� @@ -162,6 +169,15 @@ The port in Docker for FunASR server is 10095 ``` +## 鑱旂郴鎴戜滑 + +鍦ㄦ偍浣跨敤杩囩▼涓紝濡傛灉閬囧埌闂锛屾杩庡姞鍏ョ敤鎴风兢杩涜鍙嶉 + + +| 閽夐拤鐢ㄦ埛缇� | 寰俊 | +|:----------------------------------------------------------------------------:|:-----------------------------------------------------:| +| <div align="left"><img src="../../../docs/images/dingding.jpg" width="250"/> | <img src="../../../docs/images/wechat.png" width="232"/></div> | + ## 瑙嗛demo -- Gitblit v1.9.1