feat(assistant): 组合式连续对话在 LLM 和播音残留窗口内打断 - #381
Closed
gac0812 wants to merge 5 commits into
Closed
Conversation
gac0812
force-pushed
the
feat/composed-voice-barge-in
branch
2 times, most recently
from
August 26, 2026 06:21
e02f466 to
78f5d63
Compare
免提里用户说「取消」时,若上一轮工具已提交或 TTS 已发完但手机还在播,不应再当成新指令;在 leftover playback 窗口内取消当前回复。
缩短 TTS 发完后仍可 barge-in 的最短窗口,减少把下一句新指令当成打断的时间。
日程工具被取消时仍会提交,需要把 tool result 写进对话历史;播音残留窗口改回 time.monotonic,以免打乱注入的 turn timing 时钟。
日程工具在 barge-in 时无法撤回已提交的业务结果,需要把 tool result 写进对话历史;TTS 结束后残留窗口里迟到的 voice.tts.canceled 只停播放,避免把 listening 打成 interrupted。
残留窗口里 currentAudioId 已清空,但流式回复尚未 tts.start 时也是 null;若一律忽略 canceled,被打断轮次的波形和跨轮覆盖会回归。
gac0812
force-pushed
the
feat/composed-voice-barge-in
branch
from
August 27, 2026 05:58
78f5d63 to
134856d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
main(feat(observability): 接入 Prometheus 指标与 OpenTelemetry/Tempo 链路 #360 已合入)。相对main只含本 PR 的 barge-in 改动。TIMEFLOW_VOICE_AGENT_MODE=2)在 LLM/工具执行期间也能打断,避免快任务已经提交后,用户说的「取消」被当成新指令。max(音频时长, 0.4));窗口内的 barge-in 会取消正在播的回复。tts.end之后残留窗口里迟到的voice.tts.canceled只停播放,不把客户端从 listening 打成 interrupted;流式回复尚未tts.start时的打断仍会进入 interrupted,避免波形和跨轮覆盖回归。Related to #358
Test plan
voice.tts.canceledtts.end之后迟到的voice.tts.canceled不应把客户端切到 interruptedtts.start时 barge-in:气泡去掉 pending 波形,下一轮回复不覆盖被打断轮次Verification