服务端该怎么启动? #2508
-
|
文章说可以通过runtime/run_server_2pass.sh这个文件启动,文件中有一个启动文件funasr-wss-server-2pass,但是这个文件我怎么都没有找到 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
推荐:使用官方部署脚本或 Docker 镜像最省事的是按一键部署文档执行: curl -O https://raw.githubusercontent.com/alibaba-damo-academy/FunASR/main/runtime/deploy_tools/funasr-runtime-deploy-online-cpu-zh.sh
sudo bash funasr-runtime-deploy-online-cpu-zh.sh install --workspace ./funasr-runtime-resources或者按Docker 开发指南进入官方镜像后运行: cd /workspace/FunASR/runtime
bash run_server_2pass.sh --download-model-dir /workspace/models --certfile 0镜像中已经包含编译好的 如果要在宿主机从源码编译先按源码编译文档准备 ONNX Runtime、FFmpeg、OpenBLAS 和 OpenSSL,然后构建服务端 target: cd FunASR/runtime/websocket
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DONNXRUNTIME_DIR=/path/to/onnxruntime-linux-x64-1.14.0 \
-DFFMPEG_DIR=/path/to/ffmpeg-master-latest-linux64-gpl-shared
cmake --build build --target funasr-wss-server-2pass --parallel 4
# 编译产物在这里
ls -l build/bin/funasr-wss-server-2pass
cd ..
bash run_server_2pass.sh \
--cmd-path "$PWD/websocket/build/bin" \
--download-model-dir "$PWD/models" \
--certfile 0源码编译只负责生成二进制;模型下载所需的 Python/FunASR 环境也要按 runtime 文档配置。如果只是部署服务,建议优先使用官方 Docker 镜像。 我已在当前 main |
Beta Was this translation helpful? Give feedback.

funasr-wss-server-2pass不是仓库中提交的源码文件,而是 C++ runtime 编译后生成的可执行文件,所以只git clone后找不到是正常的。runtime/run_server_2pass.sh默认从/workspace/FunASR/runtime/websocket/build/bin/funasr-wss-server-2pass启动服务(见脚本中的
cmd_path),这个路径是按官方 runtime Docker 镜像设计的。推荐:使用官方部署脚本或 Docker 镜像
最省事的是按一键部署文档执行:
或者按Docker 开发指南进入官方镜像后运行:
cd /workspace/FunASR/runtime bash run_server_2pass.sh --download-model-dir /workspace/models --certfile 0镜像中已经包含编译好的
funasr-wss-server-2pass。如果要在宿主机从源码编译
先按源码…