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) |
|
谢谢 @qiulang,这个 PR 正好接上 #3006 后面的 Qwen3-ASR streaming WebSocket 例子方向,我已经先推了一个小的 polish commit 到这个分支:
我这边已验证: python -m unittest tests.test_qwen3_asr_ws_example -v
python -m py_compile examples/industrial_data_pretraining/qwen3_asr/serve_qwen3_asr_ws.py tests/test_qwen3_asr_ws_example.py
git diff --check HEAD~1..HEAD另外用 fake 我这边暂时没有现成的 |
|
我的环境验证你的测试没问题 不过有一点要提示一下 我的环境为了git clone 快是这样的
这个没问题。因为我一直就是用我的这个代码做压力测试 |
|
我发现我的notes 需要对模型下载做个提示 ,就是把 https://github.com/QwenLM/Qwen3-ASR#released-models-description-and-download 再补充一下,等我提交一下 |
|
commit id fde257d : "docs: add model download notes (offline / HF-unreachable)" |
LauraGPT
left a comment
There was a problem hiding this comment.
Reviewed the new Qwen3-ASR WebSocket example and notes. Verified unittest, py_compile, diff whitespace checks, and the contributor confirmed real qwen_asr/vLLM usage with an audio bench run.
基于 #3006 最后的讨论,提交 Qwen3-ASR streaming WebSocket server 的示例代码,还有中英文使用说明。
使用说明的第一段,关于vad的描述,是我个人的理解,需要review。 我在说明里标注了 ”以下是我的个人理解“, 所以最后修改合入后需要把这句话删掉。