用户说:"您好,您好,今天星期几啊?今天天气晴朗吗?"
识别到:"今天星期几啊?" ❌ 前半句丢失
STT引擎返回两部分:
text: 已确认文本stash: 缓冲区文本旧代码只取 stash,丢失了 text。
# ❌ 旧代码
text = response.get('stash', '')
# ✅ 新代码
confirmed_text = response.get('text', '')
stash_text = response.get('stash', '')
full_text = confirmed_text + stash_text
重启后端,再次测试长句子(中间停顿),应该看到完整识别结果。
websocket_handler.py 第585-615行STT_DEBUG_GUIDE.md