| | |
| | | |
| | | ##### 服务端部署 |
| | | ```shell |
| | | cd funasr/runtime/python/websocket |
| | | cd runtime/python/websocket |
| | | python funasr_wss_server.py --port 10095 |
| | | ``` |
| | | |
| | |
| | | 更多例子可以参考([点击此处](../runtime/python/websocket/README.md)) |
| | | |
| | | <a name="cpp版本示例"></a> |
| | | #### c++版本示例 |
| | | #### 服务部署软件包 |
| | | |
| | | 既可以进行高精度、高效率与高并发的文件转写,也可以进行低延时的实时语音听写。支持Docker化部署,多路请求。 |
| | | |
| | |
| | | ###### 如果您已安装docker,忽略本步骤 |
| | | |
| | | ```shell |
| | | curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/install_docker.sh; |
| | | curl -O https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/shell/install_docker.sh; |
| | | sudo bash install_docker.sh |
| | | ``` |
| | | |
| | |
| | | |
| | | ```shell |
| | | sudo docker pull \ |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.5 |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.6 |
| | | mkdir -p ./funasr-runtime-resources/models |
| | | sudo docker run -p 10096:10095 -it --privileged=true \ |
| | | -v $PWD/funasr-runtime-resources/models:/workspace/models \ |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.5 |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.6 |
| | | ``` |
| | | |
| | | ###### 服务端启动 |
| | |
| | | --online-model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx \ |
| | | --punc-dir damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx \ |
| | | --itn-dir thuduj12/fst_itn_zh \ |
| | | --hotword /workspace/models/hotwords.txt > log.out 2>&1 & |
| | | --hotword /workspace/models/hotwords.txt > log.txt 2>&1 & |
| | | |
| | | # 如果您想关闭ssl,增加参数:--certfile 0 |
| | | # 如果您想使用时间戳或者nn热词模型进行部署,请设置--model-dir为对应模型: |
| | |
| | | 客户端测试([samples](https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/sample/funasr_samples.tar.gz)) |
| | | |
| | | ```shell |
| | | python3 funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass |
| | | python3 funasr_wss_client.py --host "127.0.0.1" --port 10096 --mode 2pass |
| | | ``` |
| | | 更多例子参考([点击此处](https://github.com/alibaba-damo-academy/FunASR/blob/main/runtime/docs/SDK_advanced_guide_online_zh.md)) |
| | | |
| | |
| | | |
| | | ```shell |
| | | sudo docker pull \ |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.3.0 |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.4.1 |
| | | mkdir -p ./funasr-runtime-resources/models |
| | | sudo docker run -p 10095:10095 -it --privileged=true \ |
| | | -v $PWD/funasr-runtime-resources/models:/workspace/models \ |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.3.0 |
| | | registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.4.1 |
| | | ``` |
| | | |
| | | |
| | | ###### 服务端启动 |
| | | |
| | |
| | | --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx \ |
| | | --lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst \ |
| | | --itn-dir thuduj12/fst_itn_zh \ |
| | | --hotword /workspace/models/hotwords.txt > log.out 2>&1 & |
| | | --hotword /workspace/models/hotwords.txt > log.txt 2>&1 & |
| | | |
| | | # 如果您想关闭ssl,增加参数:--certfile 0 |
| | | # 如果您想使用时间戳或者nn热词模型进行部署,请设置--model-dir为对应模型: |
| | |
| | | . ./run.sh --CUDA_VISIBLE_DEVICES="0,1" --gpu_num=2 |
| | | ``` |
| | | |
| | | 更多例子可以参考([点击此处](https://alibaba-damo-academy.github.io/FunASR/en/academic_recipe/asr_recipe.html)) |
| | | 更多例子可以参考([点击此处](https://alibaba-damo-academy.github.io/FunASR/en/academic_recipe/asr_recipe.html)) |