Skip to content

feat: add Qwen3-ASR streaming WebSocket server with notes#3035

Open
qiulang wants to merge 1 commit into
modelscope:mainfrom
qiulang:qwen3-asr-ws-example
Open

feat: add Qwen3-ASR streaming WebSocket server with notes#3035
qiulang wants to merge 1 commit into
modelscope:mainfrom
qiulang:qwen3-asr-ws-example

Conversation

@qiulang

@qiulang qiulang commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

基于 #3006 最后的讨论,提交 Qwen3-ASR streaming WebSocket server 的示例代码,还有中英文使用说明。

使用说明的第一段,关于vad的描述,是我个人的理解,需要review。 我在说明里标注了 ”以下是我的个人理解“, 所以最后修改合入后需要把这句话删掉。

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +107 to +108
except websockets.exceptions.ConnectionClosed:
pass

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

建议在 handle_client 中增加对通用异常(Exception)的捕获并记录日志。目前仅捕获了 websockets.exceptions.ConnectionClosed,如果发生其他未预期的异常(例如音频数据转换错误或模型推理异常),连接会直接中断且没有任何错误日志,这会增加排查问题的难度。可以参考 serve_realtime_ws.py 中的异常处理设计。

Suggested change
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant