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
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
CanvasA2UIActionMessageHandler.swift style: format macos sources for ci 2026-03-22 17:32:30 +00:00
CanvasChromeContainerView.swift
CanvasFileWatcher.swift
CanvasManager.swift
CanvasScheme.swift
CanvasSchemeHandler.swift
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
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
ConnectionModeCoordinator.swift
ConnectionModeResolver.swift
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
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
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
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
DevicePairingApprovalPrompter.swift
DiagnosticsFileLog.swift
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
ExecApprovals.swift
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
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
GatewayEndpointStore.swift
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
GeneralSettings.swift
HealthStore.swift
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
Launchctl.swift
LaunchdManager.swift
LogLocator.swift
MenuBar.swift
MenuContentView.swift
MenuContextCardInjector.swift
MenuHeaderCard.swift
MenuHighlightedHostView.swift
MenuHostedItem.swift
MenuItemHighlightColors.swift
MenuSessionsHeaderView.swift
MenuSessionsInjector.swift
MenuUsageHeaderView.swift
MicLevelMonitor.swift
MicRefreshSupport.swift
ModelCatalogLoader.swift
NSAttributedString+VoiceWake.swift
NodePairingApprovalPrompter.swift
NodeServiceManager.swift
NodesMenu.swift
NodesStore.swift
NotificationManager.swift
NotifyOverlay.swift
Onboarding.swift
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
PairingAlertSupport.swift
PeekabooBridgeHostCoordinator.swift
PermissionManager.swift
PermissionMonitoringSupport.swift
PermissionsSettings.swift
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
ScreenRecordService.swift
ScreenshotSize.swift
SelectableRow.swift
SessionActions.swift
SessionData.swift
SessionMenuLabelView.swift
SessionMenuPreviewView.swift
SessionsSettings.swift
SettingsComponents.swift
SettingsRefreshButton.swift
SettingsRootView.swift
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
TalkDefaults.swift
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
TalkOverlayView.swift
TerminationSignalWatcher.swift
TextSummarySupport.swift
TrackingAreaSupport.swift
UsageCostData.swift
UsageData.swift
UsageMenuLabelView.swift
UserDefaultsMigration.swift
ViewMetrics.swift
VisualEffectView.swift
VoiceOverlayTextFormatting.swift
VoicePushToTalk.swift
VoiceSessionCoordinator.swift
VoiceWakeChime.swift
VoiceWakeForwarder.swift
VoiceWakeGlobalSettingsSync.swift
VoiceWakeHelpers.swift
VoiceWakeOverlay.swift
VoiceWakeOverlayController+Session.swift
VoiceWakeOverlayController+Testing.swift
VoiceWakeOverlayController+Window.swift
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