Skip to content
Discussion options

You must be logged in to vote

先更正我上一条回复:官方 FunASR C++ Docker 实时服务没有通用的 --workers 参数;那条建议不适用于这个 runtime。

“只能 2 路”本身不能直接判断是否正常。 如果你使用的是官方 funasr-wss-server / funasr-wss-server-2pass,服务端并发相关参数是:

  • --decoder-thread-num:解码线程池大小,官方文档将其定义为支持的最大并发路数;
  • --model-thread-num:每路识别内部的 ONNX 并行线程数;
  • --io-thread-num:WebSocket I/O 线程数。

官方文档建议 decoder-thread-num * model-thread-num 与容器可用线程数匹配;部署脚本还可能根据机器线程数自动配置这些值。源码中的服务端默认 decoder-thread-num 是 8,因此“2 路可以、3/4 路不行”不能简单归因于默认 worker 数。

先在宿主机检查容器实际启动参数和日志:

docker exec <container> sh -lc 'ps -ef | grep "[f]unasr-wss-server"'
docker logs <container> 2>&1 | grep -E 'decoder-thread-num|io-thread-num|model-thread-num|RTF|timeout|error|OOM'
docker inspect <container> --format '{{json .HostConfig}}'

文…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by LauraGPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants