Skip to content

fix(mac): improve Talk interruption and add spoken exit settings - #149251

Draft
ruffenman wants to merge 10 commits into
openclaw:mainfrom
ruffenman:fix/macos-talk-duplex-stop-main
Draft

ruffenman wants to merge 10 commits into
openclaw:mainfrom
ruffenman:fix/macos-talk-duplex-stop-main

Conversation

@ruffenman

@ruffenman ruffenman commented Sep 15, 2026 •

Copy link
Copy Markdown

What Problem This Solves

Mac Talk needs reliable interruption and a hands-free way to end a conversation. This change adds configurable spoken exit commands under Settings → Talk → This Mac, improves echo cancellation and playback handling, and restores Voice Wake after Talk ends. Quoted, negated, partial, and stale stop-phrase matches are excluded.

An optional Spoken exit acknowledgement setting lets compatible OpenAI realtime sessions briefly say “Okay” in the current assistant voice before shutdown. It is off by default and always preserves the normal Talk-off sound. The acknowledgement is best effort, with bounded playback and immediate fallback on unsupported routes. Stop-phrase transcription hints and an explicitly configured Talk language improve recognition without requiring the acknowledgement setting.

Builds on #128204. Related: #71195 and #97592.

Evidence

  • Latest feature integration: 73 shared Swift tests, 151 gateway tests, 66 UI tests, and one focused browser settings test passed, along with typechecking, lint, formatting, and i18n verification.
  • Earlier native regressions passed 101 tests across 10 suites; preference and fallback coverage also passed. Native acknowledgement evidence was reused because the integration preserves the tested native source.
  • Physical Mac testing confirmed interruption, continued playback when the assistant itself said “stop talking,” and first-attempt recognition of both exit phrases with English explicitly configured. These results cover the preceding stop-command implementation; final acoustic acceptance of the optional acknowledgement remains pending.

Full upstream CI is skipped while this remains a draft. Recognition can still fail, and provider timing can clip or omit the optional acknowledgement.

Screenshots

Stop-phrase settings before and after the original change; the new acknowledgement toggle is covered by the focused browser test above.

Before After
Talk settings before spoken-exit support Talk settings with configurable stop phrases

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts extensions: openai size: XL labels Sep 15, 2026
@ruffenman ruffenman changed the title fix(mac): preserve interruption audio and support configurable spoken Talk exit fix(mac): improve Talk interruption and add spoken exit settings Sep 15, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

The branch changes macOS Talk capture and playback for interruption, adds configurable spoken exit phrases and an optional spoken acknowledgement, and carries the settings and relay protocol changes through the Gateway and Control UI.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The branch has substantial focused implementation and tests, but the upgrade decision and current-head physical behavior remain unresolved.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Merge readiness

⛔ Blocked before merge - 9 items remain

This PR still addresses behavior missing from current main. It needs a decision on the aggregate-microphone upgrade change, current-head Mac behavior proof, and conflict resolution before merge.

Priority: P2
Reviewed head: 56f143c054b2cb0a0e69c930532cb601ccc681e8
Owner decision: Required. See Decision needed.

Decision needed

  • Question: May realtime Talk reject an existing saved aggregate microphone and move that user to native fallback until they select an individual microphone?
  • Recommendation: Approve guided fallback: Accept the rejection after confirming the native fallback and in-product recovery guidance on an affected Mac.
  • Why: The rejection is deliberate and safety-motivated, but it changes a previously admitted device choice and requires operator action; source review cannot choose that product tradeoff.

Before merge

  • Add real behavior proof - Authority-chain proof required: the contributor reports physical Mac results for the preceding stop-command implementation, and the inspected images show its stop-phrase field. They do not establish current-head interruption, assistant-playback rejection before local shutdown, Voice Wake recovery, or acoustic acknowledgement; the new toggle also lacks an inspected after screenshot. A redacted current-build trace or recording with diagnostics should show those paths. The additive AppDefaults preference loads unset as off and preserves saved values, so no stored-state migration is indicated. After adding proof, update the PR body to trigger review; if it does not, ask a maintainer to comment @clawsweeper re-review.
  • Provide an upgrade path for saved aggregate microphones (P1) - A saved aggregate microphone that the pinned base capture path could bind now throws aggregateInputSelected, demoting realtime Talk to native fallback until the user changes devices. This deliberate compatibility change needs the Mac feature owner's acceptance and affected-device recovery proof, or a safe path that preserves verified aggregate input. I missed this unchanged line in the earlier review.
  • Resolve security concern: Prove speaker audio cannot authorize local shutdown - The source rejects assistant-role transcripts, while the new audio graph must also prevent assistant speech from entering the user transcription path and reaching the local Talk-off effect.
  • Resolve merge risk - An existing saved aggregate microphone now prevents realtime Talk startup and requires the user to choose an individual microphone or use native fallback; the Mac feature owner has not accepted that upgrade behavior.
  • Resolve merge risk - The current head lacks physical Mac evidence for interruption through continued playback, Voice Wake recovery, and rejection of assistant playback before a local spoken-exit shutdown.
  • Resolve merge risk - The new acknowledgement toggle is absent from the supplied after screenshot, and final acoustic acceptance of its spoken response remains pending.
  • Resolve merge risk - GitHub reports the current head as conflicting; no pinned test-merge result was available for assessing the resolved tree.
  • Complete next step - Resolve the conflict, obtain the Mac feature owner's aggregate-microphone decision, and add redacted current-head Mac audio and new-toggle visual proof before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Provide an upgrade path for saved aggregate microphones — apps/macos/Sources/OpenClaw/MacRealtimeTalkInputChannels.swift:93-96
  • [low] Prove speaker audio cannot authorize local shutdown — apps/macos/Sources/OpenClaw/TalkModeRuntime+Realtime.swift:713
Agent review details

How this fits together

The macOS Talk runtime receives microphone audio and Gateway relay events, then controls speech playback and the local Talk state. The Gateway supplies realtime sessions and transcription guidance; the Mac decides whether a recognized user command ends Talk.

flowchart LR
A[Mac microphone] --> B[Talk audio capture]
B --> C[Gateway realtime relay]
C --> D[User transcript]
D --> E{Local exit phrase?}
E -->|No| F[Continue Talk]
E -->|Yes| G[Optional spoken acknowledgement]
G --> H[Turn off Talk and resume Voice Wake]
Loading

Technical review

Best possible solution:

Keep one Mac-owned exit decision, preserve saved preferences, and provide an owner-approved, visible upgrade path for aggregate-microphone users; demonstrate the final audio and shutdown behavior on the current build.

Do we have a high-confidence way to reproduce the issue?

No current-head physical Mac reproduction is recorded. Source and focused tests establish that selecting an aggregate microphone causes the new resolver to reject realtime capture and enter the native fallback path.

Is this the best way to solve the issue?

Unclear: the local exit owner and off-by-default preference are narrow, but the replacement capture graph needs owner acceptance for its aggregate-device behavior and direct Mac proof.

Full review comments:

  • [P1] Provide an upgrade path for saved aggregate microphones — apps/macos/Sources/OpenClaw/MacRealtimeTalkInputChannels.swift:93-96
    A saved aggregate microphone that the pinned base capture path could bind now throws aggregateInputSelected, demoting realtime Talk to native fallback until the user changes devices. This deliberate compatibility change needs the Mac feature owner's acceptance and affected-device recovery proof, or a safe path that preserves verified aggregate input. I missed this unchanged line in the earlier review.
    Confidence: 0.88
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.82

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f7741c38ce7c.

Merge-risk options

Maintainer options:

  1. Approve and prove guided fallback (recommended)
    Have the Mac feature owner accept the aggregate-device upgrade behavior and show the affected user's visible recovery path.
  2. Retain verified aggregate selection
    Repair channel selection so a saved aggregate device can continue realtime Talk only when its microphone channels can be proven safe.
  3. Pause the capture replacement
    Defer this branch if the compatibility and physical-device proof cannot be resolved within its current scope.

Security

Needs attention: No supply-chain defect was established, but final-effect proof is needed that assistant playback cannot be treated as a user exit command.

Evidence

Security concerns:

  • [low] Prove speaker audio cannot authorize local shutdown — apps/macos/Sources/OpenClaw/TalkModeRuntime+Realtime.swift:713
    The source rejects assistant-role transcripts, while the new audio graph must also prevent assistant speech from entering the user transcription path and reaching the local Talk-off effect.
    Confidence: 0.72

What I checked:

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Local setting 1 acknowledgement toggle added; default off The new saved preference has an explicit default and upgrade behavior.
Native build inputs 3 checksum-pinned source downloads The Mac executable now depends on a prepared static audio library.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The PR improves a limited macOS Talk workflow and introduces an upgrade decision, without evidence of an emergency.
  • merge-risk: 🚨 compatibility: A previously admitted saved aggregate microphone is now rejected for realtime Talk.
  • merge-risk: 🚨 security-boundary: A final user transcript can authorize local shutdown, so speaker audio misattributed as user input needs final-effect proof.
  • merge-risk: 🚨 availability: The replacement capture graph and required native audio library can prevent realtime startup on affected Mac devices or builds.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Capture current-build Mac interruption, continued playback, and Voice Wake recovery, with private details redacted.
  • Show at the final shutdown boundary that assistant playback of a stop phrase leaves Talk enabled.
  • Obtain Mac feature-owner acceptance and affected-device proof for the aggregate-microphone fallback.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-24T02:09:44.641Z sha 92d88a9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T03:21:21.575Z sha 92d88a9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T04:57:40.037Z sha bf81a44 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T05:49:36.741Z sha c2142e9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T15:50:52.873Z sha c2142e9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T16:12:27.531Z sha ffd403f :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-24T16:25:09.015Z sha ffd403f :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-29T17:11:18.824Z sha ffd403f :: needs real behavior proof before merge. :: none

Reviewed September 29, 2026, 1:30 PM ET / 17:30 UTC (Revision 13).

Copy link
Copy Markdown
Author

Fixed the debug-build prerequisite in 2fd71a5: the wrapper now prepares AEC before invoking Swift. All 169 wrapper tests pass, including isolated regression cases for dependency ordering and failure propagation.

Added before/after settings screenshots to the description. Physical testing of the submitted build and aggregate-microphone compatibility remain outstanding; I’m working through those separately. This PR remains a draft.

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 15, 2026
Record final user transcript receipt, local stop decisions, and bounded
input saturation timing without logging speech or session identifiers.
Exercise gateway-event forwarding and realistic capture callback bursts
with held acknowledgments while preserving matching and send limits.
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 24, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 24, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 24, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 24, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation extensions: openai gateway Gateway runtime merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant