feat: add wake phrase voice assistant preview - #1071
Conversation
Add one-shot wake phrase activation with exclusive microphone capture, tracked response correlation, configured TTS playback, settings UI, lifecycle recovery, documentation, and regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the Assistant preview card below Companion Voice so speech input and output configuration precede the composed assistant feature. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Codex review: needs real behavior proof before merge. Reviewed August 9, 2026, 6:31 PM ET / 22:31 UTC. ClawSweeper reviewWhat this changesAdds a default-off Windows wake-phrase assistant that transcribes one request, routes it through the selected native chat session, and speaks the correlated reply. Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness⛔ Blocked until stronger real behavior proof is added - 10 items remain Keep this PR open for maintainer review. It has a concrete wake-capture recovery defect and needs current-head Windows proof after resolving its dirty merge state; the linked microphone freeze fix is now on main but was not in the PR head. Priority: P1 Review scores
Verification
How this fits togetherThe tray combines local Whisper microphone capture, native gateway chat, and configured text-to-speech. The assistant owns capture during wake listening, then sends one tracked chat turn and returns to listening after its matching reply. flowchart LR
A[Microphone] --> B[Local speech capture]
B --> C[Wake phrase gate]
C --> D[Assistant coordinator]
D --> E[Selected chat session]
E --> F[Correlated final reply]
F --> G[Configured speech output]
Decision needed
Why: The technical repair is clear, but accepting a new persistent microphone interaction and its preview scope is a product decision. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only a rebased one-shot preview that forwards capture failure into the coordinator, releases assistant microphone ownership, restores chat voice input, and has current-head Windows evidence for both normal wake flow and no-data recovery. Do we have a high-confidence way to reproduce the issue? Yes, source provides a high-confidence path: enable wake listening on a device that produces no initial WASAPI data, wait for the five-second watchdog, and observe whether assistant state and the microphone lease recover. Is this the best way to solve the issue? No. Rebase alone retains the watchdog but does not make the new assistant adapter report that asynchronous failure to its coordinator; the feature needs an explicit recovery transition and proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 582a44713860. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (45 earlier review cycles; latest 8 shown)
|
Resolve the App composition-root conflict by retaining the voice assistant rebuild hook while adopting the new exec-approval architecture, and preserve both localization key sets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Adversarial maintainer review found blocking run-correlation defects, so this is not ready to land yet:
Please bind the turn to the gateway run id, make cancellation no-op unless that exact run is still active, move abort suppression ahead of response claiming, and dispose the coordinator when disabled. The current revocation-recovery check is also red. Current merge confidence is 45%. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Caleb Eden + GitHub Copilot pair-programming follow-up @shanselman Thanks for the detailed adversarial review. I addressed each of the run-ownership and lifecycle concerns:
The revocation-recovery E2E check now passes on the current head. The aggregate workflow is still red because of an unrelated Tray integration failure in |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Note that this should not be merged until microphone bugs are resolved. #1097 describes a UI freeze when attempting to capture audio input. Merging this with that bug present could lead to a bricked installation where a user enables voice assistant, it starts persistently listening, and then the UI freezes and the user is unable to turn off the voice assistant. |
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.
What Problem This Solves
Windows users do not have an always-on, wake-phrase voice experience comparable to the macOS app. Existing speech input, gateway chat, and speech output work independently, but users must manually start each interaction.
Why This Change Was Made
This adds a default-off Assistant preview that reuses the existing local Whisper STT, energy VAD, gateway chat path, and configured TTS provider. V0 deliberately supports one flow: say the wake phrase and request in one utterance, receive one spoken reply in the currently selected native Chat session, then return to listening.
Each Assistant request owns exactly one gateway-accepted run. Response claiming, cancellation, terminal handling, and late-response suppression are scoped to that run so unrelated activity in the same session is not spoken or aborted. Turning the feature off disposes its coordinator, subscriptions, and microphone capture machinery.
V0 adds no wake-word model, protocol command, persistent conversation mode, barge-in, or overlay.
User Impact
Users can configure a custom one-to-three-word wake phrase on Voice & Audio after configuring speech input and Companion Voice. When enabled, a matching utterance sends only the request after the wake phrase, capitalizes its first character, routes it through the visible selected Chat session, speaks the matching reply once, and resumes listening.
While Assistant owns the microphone for wake listening, native Chat visibly explains why single-message voice input is unavailable. Switching sessions does not restart wake capture. Turning Assistant off releases capture and restores normal voice transcription.
Evidence
31c90691and confirmed that it matches the existing recording.testjob is currently red because the unrelatedSystemRun_Where_ReturnsExpectedOutputTray integration test returned exit code-1instead of0.Change Type
Scope
winnodeValidation
./build.ps1: passeddotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 3,399 passed, 32 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 2,107 passed, 0 skippedOpenClaw.Tray.Tests: 34 passede2etests (revocation-recovery, ...): passed on31c90691e2etests (setup-connect, ...): passed on31c90691e2etests (network-recovery, ...): passed on31c90691test: failed in unrelatedMcpHttpServerIntegrationTests.SystemRun_Where_ReturnsExpectedOutput; Shared, Tray, Connection, and WinNode CLI test steps passed before that failureReal Behavior Proof
31c906917f00b369bde04b928e29d721be7dfd02OpenClawAssistantV0.mp4
31c90691and produced the same behavior. Changes after the recording harden internal run correlation, cancellation, event ordering, and disposal without changing the demonstrated interaction.Yes/No/N/A): Yes, the recording resolves as an MP4 and remains representative of the manually retested current-head UXSecurity Impact
Yes/No): NoYes/No): NoYes/No): No, requests use the existing configured gateway chat pathYes/No): NoYes/No): YesYes, explain the risk and mitigation: When explicitly enabled, the microphone remains active and local Whisper transcribes silence-bounded speech bursts to detect the configured phrase. The feature is off by default, requires existing STT and TTS capabilities, does not log audio or transcript content, and sends only the extracted request through the existing configured gateway path.Compatibility and Migration
Yes/No): YesYes/No): Yes, two optional Assistant settings are persisted with safe defaultsYes/No): NoReview Conversations