meet: barge-in cancellation of in-flight TTS#25982
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37cec579df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (message.type === "meet.speaking_ended") { | ||
| this.isBotSpeaking = false; | ||
| // Stream is over — any pending cancel for this stream is moot. |
There was a problem hiding this comment.
Track speaking state per stream ID
onAssistantEvent flips isBotSpeaking to false on any meet.speaking_ended, but TTS playback is stream-based and can overlap (the bridge tracks multiple active stream IDs). If stream A ends while stream B is still playing, the watcher will think the bot is no longer speaking and will ignore real barge-in events during stream B, so cancelSpeak is never invoked when needed. Use streamId to maintain an active-stream set/count rather than a single boolean.
Useful? React with 👍 / 👎.
| assistantEventHub.subscribe( | ||
| { assistantId: DAEMON_INTERNAL_ASSISTANT_ID }, | ||
| cb, |
There was a problem hiding this comment.
Avoid per-meeting subscriptions to the global event hub
Constructing one watcher per meeting now adds one assistantEventHub subscription per meeting, but that hub has a fixed subscriber cap (100) and evicts the oldest subscriber at capacity. As meeting count grows, this can evict unrelated subscribers (e.g., long-lived SSE listeners) or older meeting watchers, causing dropped client streams or disabled barge-in behavior in active sessions. A shared meet-speaking listener (or direct session-manager signal) avoids consuming a global slot per meeting.
Useful? React with 👍 / 👎.
|
Follow-up fix merged in #26267 — addresses stream_id reuse race, barge-in overlap tracking, ffmpeg probe cache transient errors, playbackChain deadlock, and cancel DELETE timeout. |
Summary
Part of plan: meet-phase-3-voice.md (PR 3 of 6)