Hide Assist on duplicate wake word received#6419
Conversation
| AssistPipelineEventType.STT_START -> handleSttStart() | ||
| AssistPipelineEventType.STT_START -> { | ||
| handleSttStart() | ||
| onEvent(AssistEvent.PipelineStarted) |
There was a problem hiding this comment.
Maybe a bit theoretical, but what if I use the wake word and it triggers Assist with a pipeline without STT? Wouldn't it make more sense to link it to the RUN_START event?
There was a problem hiding this comment.
Indeed I was assuming there was always voice but I forget that you can have a pipeline without STT.
There was a problem hiding this comment.
It actually quite complex. Since the pipeline only starts when using voice otherwise we wait for the user to send his input to trigger the pipeline. So this logic of canceling Assist won't work for text in its current state.
I'm checking if I can call the selected pipeline with only the wake word all the time when Assist start just to know if we can proceed or not, but I might just support voice by setting the pending boolean only when using microphone.
There was a problem hiding this comment.
I decided to only support voice pipeline otherwise it asks for a quite big changes in the logic and I'm not even sure if we can do it properly.
Test Results 160 files 160 suites 10m 14s ⏱️ Results for commit ed73b72. ♻️ This comment has been updated with latest results. |
Summary
In order to replicate the behavior of a VPE that when multiples pipeline starts with the same wake word only the first one is kept we need to check the error sent in the WebSocket. This PR does that.
It works by starting a pipeline and send the wake word phrase (introduced by #6376) then if the pipeline send an error with a specific code we simply stop the AssistActivity. To make the UX nicer I decided to delay a bit the display of the bottom sheet otherwise it was shown and hidden in less than a second. The counterpart is that the UI blinks a bit because of the activity overlay.
Checklist
Screenshots
Screen.Recording.2026-02-10.at.09.12.14.mov