feat(macos): honor the selected microphone in Talk and show live voice activity in chat#109995
Conversation
…evel, transcript, and mic picker in chat
…/Android catalogs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 729cd648b2
ℹ️ 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".
| } | ||
|
|
||
| func inputDeviceSelectionDidChange() async { | ||
| guard self.isEnabled, !self.isPaused, self.phase == .listening else { return } |
There was a problem hiding this comment.
Restart capture for mic changes while speaking
When the user changes the Talk input from the new chat menu while the assistant is speaking, this guard drops the change because the phase is .speaking. That is still an active capture state when interruptOnSpeech is enabled: prepareForPlayback() starts recognition before switching to .speaking, and handleRecognition uses those callbacks for barge-in. In that scenario the recognition engine stays bound to the old or unplugged mic until playback finishes, so users cannot interrupt speech with the newly selected/fallback microphone during the active Talk session.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 9:51 AM ET / 13:51 UTC. Summary PR surface: Docs 0, Other +1456. Total +1456 across 36 files. Reproducibility: yes. the paths are source-reproducible: current macOS Talk does not bind the saved microphone UID, and the proposed guard demonstrably ignores a selection change during speaking even though barge-in recognition is active. The hardware scenarios were not executed in this review. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Allow capture restart whenever recognition is active, including speaking with interrupt-on-speech enabled, add focused regression coverage, and provide a redacted native macOS recording or live log proving selected-microphone capture and device switching. Do we have a high-confidence way to reproduce the issue? Yes, the paths are source-reproducible: current macOS Talk does not bind the saved microphone UID, and the proposed guard demonstrably ignores a selection change during speaking even though barge-in recognition is active. The hardware scenarios were not executed in this review. Is this the best way to solve the issue? No, not yet. Reusing the authoritative Voice Wake microphone selection is the right ownership direction, but the restart condition is too narrow and the native audio behavior remains unproven. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b319493a529c. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Docs 0, Other +1456. Total +1456 across 36 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
Merged via squash.
|
…e activity in chat (openclaw#109995) * feat(macos): honor the selected microphone in Talk and surface live level, transcript, and mic picker in chat * chore(i18n): translate new talk activity strings and regenerate Apple/Android catalogs
What Problem This Solves
Talk Mode on macOS records from the system-default microphone regardless of the input device the user selected in Voice settings, offers no echo cancellation or gain control, and the chat surface gives no feedback while talking — no level meter, no visible listening state, and no transcript. The web chat shows live voice activity and honors the configured input device.
Why This Change Was Made
Round 2 of aligning the native macOS chat with the web chat (follow-up to #109712), scoped to the talk-input ownership area:
AVAudioEnginecapture to the microphone selected in Voice settings (voiceWakeMicIDstays the single authoritative selection, shared with Voice Wake); empty selection keeps the system default.AVAudioEngine.inputNodecan abort without a usable default device.TalkModeControllernow publishes smoothed level, phase, partial transcript, and the last 20 final utterances; the chat composer renders a live waveform on the talk button, a Listening/Thinking/Speaking status, and an expandable rolling transcript strip.OpenClawChatTalkControlgains additive, defaulted fields (level, transcripts, devices, selection callback) — iOS keeps compiling unchanged and can adopt later.User Impact
Talking to OpenClaw from the native chat now uses the microphone you chose, sounds cleaner on supported devices, survives device changes, and shows what the app hears while you speak — matching the web chat's feedback. The menu-bar talk overlay is unchanged.
Evidence
swift build --package-path apps/shared/OpenClawKit --target OpenClawChatUIandswift build --package-path apps/macos --configuration release— pass (re-verified after rebase onto landed main).swift test --package-path apps/shared/OpenClawKit --parallel— 864 tests pass.swift test --package-path apps/macos --parallel— 1309 pass; new suites: device-selection resolution (6 tests), controller publishing (2), talk-activity views (4).pnpm lint:swift,pnpm format:swift,pnpm native:i18n:sync(inventory committed; translations to follow in the i18n pass) — clean.