openclaw/apps/macos/Sources/OpenClaw
Phillip Hampton 350fe63bbf
feat(macos): Voice Wake option to trigger Talk Mode (#58490)
* feat(macos): add "Trigger Talk Mode" option to Voice Wake settings

When enabled, detecting a wake phrase activates Talk Mode (full voice
conversation: STT -> LLM -> TTS playback) instead of sending a text
message to the chat. Enables hands-free voice assistant UX.

Implementation:
- Constants.swift: new `openclaw.voiceWakeTriggersTalkMode` defaults key
- AppState.swift: new property with UserDefaults persistence + runtime
  refresh on change so the toggle takes effect immediately
- VoiceWakeSettings.swift: "Trigger Talk Mode" toggle under Voice Wake,
  disabled when Voice Wake is off
- VoiceWakeRuntime.swift: `beginCapture` checks `triggersTalkMode` and
  activates Talk Mode directly, skipping the capture/overlay/forward
  flow. Pauses the wake listener via `pauseForPushToTalk()` to prevent
  two audio pipelines competing on the mic.
- TalkModeController.swift: resumes voice wake listener when Talk Mode
  exits by calling `VoiceWakeRuntime.refresh`, mirroring PTT teardown.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback

- TalkModeController: move VoiceWakeRuntime.refresh() after
  TalkModeRuntime.setEnabled(false) completes, preventing mic
  contention race where wake listener restarts before Talk Mode
  finishes tearing down its audio engine (P1)
- VoiceWakeRuntime: remove redundant haltRecognitionPipeline()
  before pauseForPushToTalk() which already calls it via stop() (P2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resume wake listener based on enabled state, not toggle value

Check swabbleEnabled instead of voiceWakeTriggersTalkMode when deciding
whether to resume the wake listener after Talk Mode exits. This ensures
the paused listener resumes even if the user toggled "Trigger Talk Mode"
off during an active session. (P2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: play trigger chime on Talk Mode activation + send chime before TTS

- VoiceWakeRuntime: play the configured trigger chime in the
  triggersTalkMode branch before pausing the wake listener. The early
  return was skipping the chime that plays in the normal capture flow.
- TalkModeRuntime: play the Voice Wake "send" chime before TTS playback
  starts, giving audible feedback that the AI is about to respond. Talk
  Mode never used this chime despite it being configurable in settings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: move send chime to transcript finalization (on send, not on reply)

The send chime now plays when the user's speech is finalized and about
to be sent to the AI, not when the TTS response starts. This matches
the semantics of "send sound" -- it confirms your input was captured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:09:36 -04:00
..
Logging
NodeMode style: format macos sources for ci 2026-03-22 17:32:30 +00:00
Resources build: bump version to 2026.4.1 2026-03-31 22:53:17 +01:00
AboutSettings.swift
AgeFormatting.swift
AgentEventStore.swift
AgentEventsWindow.swift
AgentWorkspace.swift
AgentWorkspaceConfig.swift
AnyCodable+Helpers.swift refactor: share Apple talk config parsing 2026-03-08 14:58:29 +00:00
AppState.swift feat(macos): Voice Wake option to trigger Talk Mode (#58490) 2026-03-31 21:09:36 -04:00
AudioInputDeviceObserver.swift
CLIInstallPrompter.swift
CLIInstaller.swift
CameraCaptureService.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
CanvasA2UIActionMessageHandler.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
CanvasChromeContainerView.swift
CanvasFileWatcher.swift style(swift): apply lint and format cleanup 2026-03-03 03:07:55 +00:00
CanvasManager.swift
CanvasScheme.swift
CanvasSchemeHandler.swift fix(macos): block canvas symlink escapes 2026-03-16 23:56:35 -07:00
CanvasWindow.swift
CanvasWindowController+Helpers.swift
CanvasWindowController+Navigation.swift
CanvasWindowController+Testing.swift
CanvasWindowController+Window.swift
CanvasWindowController.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
ChannelConfigForm.swift
ChannelsSettings+ChannelSections.swift
ChannelsSettings+ChannelState.swift
ChannelsSettings+Helpers.swift
ChannelsSettings+View.swift
ChannelsSettings.swift
ChannelsStore+Config.swift
ChannelsStore+Lifecycle.swift
ChannelsStore.swift
CoalescingFSEventsWatcher.swift
ColorHexSupport.swift
CommandResolver.swift
ConfigFileWatcher.swift style(swift): apply lint and format cleanup 2026-03-03 03:07:55 +00:00
ConfigSchemaSupport.swift
ConfigSettings.swift feat(ui): Control UI polish — skills revamp, markdown preview, agent workspace, macOS config tree (#53411) thanks @BunsDev 2026-03-24 01:21:13 -05:00
ConfigStore.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
ConnectionModeCoordinator.swift
ConnectionModeResolver.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
Constants.swift feat(macos): Voice Wake option to trigger Talk Mode (#58490) 2026-03-31 21:09:36 -04:00
ContextMenuCardView.swift
ContextUsageBar.swift
ControlChannel.swift fix: switch pairing setup codes to bootstrap tokens 2026-03-12 22:23:07 +00:00
CostUsageMenuView.swift
CritterIconRenderer.swift
CritterStatusLabel+Behavior.swift
CritterStatusLabel.swift
CronJobEditor+Helpers.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
CronJobEditor+Testing.swift
CronJobEditor.swift feat(cron): support custom session IDs and auto-bind to current session (#16511) 2026-03-14 16:48:46 +11:00
CronJobsStore.swift
CronModels.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
CronSettings+Actions.swift
CronSettings+Helpers.swift
CronSettings+Layout.swift
CronSettings+Rows.swift feat(cron): support custom session IDs and auto-bind to current session (#16511) 2026-03-14 16:48:46 +11:00
CronSettings+Testing.swift
CronSettings.swift
DebugActions.swift
DebugSettings.swift fix: harden config write auditing 2026-03-28 03:54:54 +00:00
DeepLinks.swift
DeviceModelCatalog.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
DevicePairingApprovalPrompter.swift
DiagnosticsFileLog.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
DockIconManager.swift
DurationFormattingSupport.swift
ExecAllowlistMatcher.swift
ExecApprovalCommandDisplaySanitizer.swift fix(exec): escape invisible approval filler chars 2026-03-22 22:52:14 -07:00
ExecApprovalEvaluation.swift fix(macos): align exec command parity (#50386) 2026-03-19 13:51:17 +02:00
ExecApprovals.swift macOS: respect exec-approvals.json settings in gateway prompter (#13707) 2026-03-14 12:00:15 +11:00
ExecApprovalsGatewayPrompter.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
ExecApprovalsSocket.swift fix(exec): escape invisible approval filler chars 2026-03-22 22:52:14 -07:00
ExecCommandResolution.swift fix(security): harden exec approval boundaries 2026-03-22 09:35:25 -07:00
ExecEnvInvocationUnwrapper.swift fix(security): harden exec approval boundaries 2026-03-22 09:35:25 -07:00
ExecEnvOptions.swift
ExecHostRequestEvaluator.swift fix(macos): align exec command parity (#50386) 2026-03-19 13:51:17 +02:00
ExecShellWrapperParser.swift
ExecSystemRunCommandValidator.swift fix(security): harden exec approval boundaries 2026-03-22 09:35:25 -07:00
FileHandle+SafeRead.swift
GatewayAutostartPolicy.swift
GatewayConnection.swift feat(security): fail closed on dangerous skill installs 2026-03-31 23:27:20 +09:00
GatewayConnectivityCoordinator.swift
GatewayDiscoveryHelpers.swift
GatewayDiscoveryMenu.swift
GatewayDiscoveryPreferences.swift
GatewayDiscoverySelectionSupport.swift fix(macos): improve tailscale gateway discovery (#40167) 2026-03-08 21:49:42 +02:00
GatewayEndpointStore.swift fix(macos): preserve unsupported remote gateway tokens 2026-03-08 21:28:17 +02:00
GatewayEnvironment.swift fix: keep mac local gateway attached 2026-03-29 00:28:32 +00:00
GatewayLaunchAgentManager.swift
GatewayProcessManager.swift fix: harden mac gateway attach smoke 2026-03-29 00:35:40 +00:00
GatewayPushSubscription.swift
GatewayRemoteConfig.swift fix(macos): preserve unsupported remote gateway tokens 2026-03-08 21:28:17 +02:00
GeneralSettings.swift macOS/onboarding: prompt for remote gateway auth tokens (#43100) 2026-03-11 13:53:19 +02:00
HealthStore.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
HeartbeatStore.swift
HostEnvSanitizer.swift Exec: harden host env override handling across gateway and node (#51207) 2026-03-20 15:44:15 -05:00
HostEnvSecurityPolicy.generated.swift fix(exec): block proxy-style env overrides (#58202) 2026-03-31 21:25:36 +09:00
HoverHUD.swift
IconState.swift
InstancesSettings.swift
InstancesStore.swift
JSONObjectExtractionSupport.swift
LaunchAgentManager.swift fix(macos): stop relaunching the app after quit when launch-at-login is enabled (#40213) 2026-03-17 20:59:56 +11:00
Launchctl.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
LaunchdManager.swift
LogLocator.swift
MenuBar.swift
MenuContentView.swift
MenuContextCardInjector.swift
MenuHeaderCard.swift
MenuHighlightedHostView.swift
MenuHostedItem.swift
MenuItemHighlightColors.swift
MenuSessionsHeaderView.swift
MenuSessionsInjector.swift fix(macos): show sessions after controls in tray menu (#38079) 2026-03-18 11:29:11 +11:00
MenuUsageHeaderView.swift
MicLevelMonitor.swift
MicRefreshSupport.swift
ModelCatalogLoader.swift
NSAttributedString+VoiceWake.swift
NodePairingApprovalPrompter.swift
NodeServiceManager.swift fix: update macOS node service to use current CLI command shape (closes #43171) (#46843) 2026-03-17 20:46:54 +11:00
NodesMenu.swift style(swift): apply lint and format cleanup 2026-03-03 03:07:55 +00:00
NodesStore.swift
NotificationManager.swift
NotifyOverlay.swift macOS: fix VoiceWakeOverlayController exclusivity violation #39275 2026-03-08 13:47:27 +00:00
Onboarding.swift macOS/onboarding: prompt for remote gateway auth tokens (#43100) 2026-03-11 13:53:19 +02:00
OnboardingView+Actions.swift
OnboardingView+Chat.swift
OnboardingView+Layout.swift
OnboardingView+Monitoring.swift
OnboardingView+Pages.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
OnboardingView+Testing.swift
OnboardingView+Wizard.swift
OnboardingView+Workspace.swift
OnboardingWidgets.swift
OnboardingWizard.swift
OpenClawConfigFile.swift fix: harden config write auditing 2026-03-28 03:54:54 +00:00
OpenClawPaths.swift
OverlayPanelFactory.swift macOS: fix VoiceWakeOverlayController exclusivity violation #39275 2026-03-08 13:47:27 +00:00
PairingAlertSupport.swift
PeekabooBridgeHostCoordinator.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
PermissionManager.swift
PermissionMonitoringSupport.swift
PermissionsSettings.swift fix: land contributor PR #39516 from @Imhermes1 2026-03-08 06:11:20 +00:00
PlatformLabelFormatter.swift
PointingHandCursor.swift
PortGuardian.swift fix: harden mac gateway attach smoke 2026-03-29 00:35:40 +00:00
PresenceReporter.swift
Process+PipeRead.swift
ProcessInfo+OpenClaw.swift
RemoteGatewayProbe.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
RemotePortTunnel.swift
RemoteTunnelManager.swift
RuntimeLocator.swift fix(macos): align minimum Node.js version with runtime guard (22.16.0) (#45640) 2026-03-14 13:43:21 +11:00
ScreenRecordService.swift
ScreenshotSize.swift
SelectableRow.swift
SessionActions.swift
SessionData.swift
SessionMenuLabelView.swift
SessionMenuPreviewView.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
SessionsSettings.swift
SettingsComponents.swift
SettingsRefreshButton.swift
SettingsRootView.swift fix: land contributor PR #39516 from @Imhermes1 2026-03-08 06:11:20 +00:00
SettingsSidebarCard.swift
SettingsSidebarScroll.swift
SettingsWindowOpener.swift
ShellExecutor.swift
SimpleFileWatcher.swift
SimpleFileWatcherOwner.swift
SimpleTaskSupport.swift
SkillsModels.swift
SkillsSettings.swift test: introduce planner-backed test runner, stabilize local builds (#54650) 2026-03-25 18:11:58 -05:00
SoundEffects.swift
StatusPill.swift
String+NonEmpty.swift
SystemPresenceInfo.swift
SystemRunSettingsView.swift
SystemSettingsURLSupport.swift
TailscaleIntegrationSection.swift
TailscaleService.swift
TalkAudioPlayer.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
TalkDefaults.swift refactor: centralize talk silence timeout defaults 2026-03-08 14:58:29 +00:00
TalkModeController.swift feat(macos): Voice Wake option to trigger Talk Mode (#58490) 2026-03-31 21:09:36 -04:00
TalkModeGatewayConfig.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
TalkModeRuntime.swift feat(macos): Voice Wake option to trigger Talk Mode (#58490) 2026-03-31 21:09:36 -04:00
TalkModeTypes.swift
TalkOverlay.swift macOS: fix VoiceWakeOverlayController exclusivity violation #39275 2026-03-08 13:47:27 +00:00
TalkOverlayView.swift
TerminationSignalWatcher.swift
TextSummarySupport.swift
TrackingAreaSupport.swift
UsageCostData.swift
UsageData.swift
UsageMenuLabelView.swift
UserDefaultsMigration.swift
ViewMetrics.swift
VisualEffectView.swift
VoiceOverlayTextFormatting.swift
VoicePushToTalk.swift style(swift): apply lint and format cleanup 2026-03-03 03:07:55 +00:00
VoiceSessionCoordinator.swift
VoiceWakeChime.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
VoiceWakeForwarder.swift fix(macos): clean swiftformat pass and sendable warning 2026-03-08 13:22:46 +00:00
VoiceWakeGlobalSettingsSync.swift
VoiceWakeHelpers.swift
VoiceWakeOverlay.swift
VoiceWakeOverlayController+Session.swift
VoiceWakeOverlayController+Testing.swift
VoiceWakeOverlayController+Window.swift macOS: fix VoiceWakeOverlayController exclusivity violation #39275 2026-03-08 13:47:27 +00:00
VoiceWakeOverlayTextViews.swift
VoiceWakeOverlayView.swift
VoiceWakeRecognitionDebugSupport.swift
VoiceWakeRuntime.swift feat(macos): Voice Wake option to trigger Talk Mode (#58490) 2026-03-31 21:09:36 -04:00
VoiceWakeSettings.swift feat(macos): Voice Wake option to trigger Talk Mode (#58490) 2026-03-31 21:09:36 -04:00
VoiceWakeTestCard.swift
VoiceWakeTester.swift
VoiceWakeTextUtils.swift
WebChatManager.swift
WebChatSwiftUI.swift Webchat: handle bare /compact as session compaction 2026-03-24 10:58:09 -07:00
WindowPlacement.swift
WorkActivityStore.swift