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: found issues before merge. Reviewed August 1, 2026, 1:57 PM ET / 17:57 UTC. ClawSweeper reviewWhat this changesAdds a default-off Windows tray preview that listens locally for a configured wake phrase, sends one extracted request through gateway chat, and speaks the resulting reply. Merge readiness⛔ Blocked by patch quality or review findings - 11 items remain Keep this PR open. Its happy-path video proves the preview can complete one turn, but current code still leaves the assistant infrastructure alive when the setting is turned off and lacks a demonstrated gateway-run binding for reply ownership, matching the blocking collaborator review. Priority: P1 Review scores
Verification
How this fits togetherThe tray voice stack owns Windows microphone capture and local speech transcription, while the chat provider sends user requests to the configured gateway and receives final replies. This PR inserts a coordinator between those paths so wake-triggered speech can produce one correlated spoken response before listening resumes. flowchart LR
A[Windows microphone] --> B[Local speech transcription]
B --> C[Wake phrase gate]
C --> D[Assistant coordinator]
D --> E[Gateway chat request]
E --> F[Correlated final reply]
F --> G[Configured text to speech]
D --> H[Voice and Audio settings]
Decision needed
Why: The patch introduces a new persistent microphone workflow and user-visible assistant mode. Correctness fixes are necessary, but they cannot establish whether this privacy-sensitive feature belongs in the core product. Before merge
Findings
Agent review detailsSecurityNeeds attention: The default-off microphone feature has a concrete response-ownership boundary problem: it can speak content not established as the reply to the initiating voice request. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the preview default-off, but repair it around a single run-scoped receipt: only the exact active run may claim a reply or be aborted, suppression must precede claiming, and switching Off must dispose all coordinator subscriptions and capture resources before the feature can be reconsidered. Do we have a high-confidence way to reproduce the issue? No for current main, because this preview is PR-only. The proposed head is source-reproducible for the disable-lifetime defect, and the collaborator review provides a concrete concurrent-run scenario for the response and abort defects. Is this the best way to solve the issue? No. The current approach needs exact gateway-run ownership and deterministic teardown before it can safely compose microphone capture, gateway chat, and TTS playback. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8ac00c5f4977. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (13 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%. |
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, canonical gateway chat path, and configured TTS provider. V0 deliberately supports one flow only: say the wake phrase and request in one utterance, receive one spoken reply, then return to listening. It 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, speaks the correlated reply once, and resumes listening.
While Assistant owns the microphone for wake listening, native Chat visibly explains why single-message voice input is unavailable. Turning Assistant off releases capture, removes that status when Chat is shown again, and restores normal voice transcription.
Evidence
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,086 passed, 0 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~VoiceWakeGateTests|FullyQualifiedName~VoiceAssistantCoordinatorTests": 24 passedReal Behavior Proof
19e4b163da3ad9d0b5a2368a65da3046c6387ec2OpenClawAssistantV0.mp4
Yes/No/N/A): Yes, the recording resolves as an MP4Security Impact
Yes/No): NoYes/No): NoYes/No): NoYes/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