feat: add Qwen3-ASR streaming WebSocket server with notes#3035
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a streaming WebSocket service for Qwen3-ASR (serve_qwen3_asr_ws.py) along with detailed documentation in both Chinese and English explaining VAD integration, vLLM version requirements, and tokenizer warnings. The feedback suggests improving the WebSocket connection handler by catching and logging general exceptions to prevent silent failures and simplify troubleshooting.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| except websockets.exceptions.ConnectionClosed: | ||
| pass |
There was a problem hiding this comment.
建议在 handle_client 中增加对通用异常(Exception)的捕获并记录日志。目前仅捕获了 websockets.exceptions.ConnectionClosed,如果发生其他未预期的异常(例如音频数据转换错误或模型推理异常),连接会直接中断且没有任何错误日志,这会增加排查问题的难度。可以参考 serve_realtime_ws.py 中的异常处理设计。
| except websockets.exceptions.ConnectionClosed: | |
| pass | |
| except websockets.exceptions.ConnectionClosed: | |
| pass | |
| except Exception as e: | |
| logging.error(f"Error in handle_client: {e}", exc_info=True) |
基于 #3006 最后的讨论,提交 Qwen3-ASR streaming WebSocket server 的示例代码,还有中英文使用说明。
使用说明的第一段,关于vad的描述,是我个人的理解,需要review。 我在说明里标注了 ”以下是我的个人理解“, 所以最后修改合入后需要把这句话删掉。