Mac: clarify runtime comments

This commit is contained in:
Peter Steinberger
2025-12-09 00:08:19 +01:00
parent bc01488a75
commit 5674c9f4c2
12 changed files with 21 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ actor VoicePushToTalk {
self.triggerChimePlayed = true
await MainActor.run { VoiceWakeChimePlayer.play(config.triggerChime) }
}
// Pause the always-on wake word recognizer so both pipelines don't fight over the mic tap.
await VoiceWakeRuntime.shared.pauseForPushToTalk()
await MainActor.run {
VoiceWakeOverlayController.shared.showPartial(transcript: "")
@@ -189,6 +190,7 @@ actor VoicePushToTalk {
}
let transcript = result?.bestTranscription.formattedString
let isFinal = result?.isFinal ?? false
// Hop to a Task so UI updates stay off the Speech callback thread.
Task.detached { [weak self, transcript, isFinal] in
guard let self else { return }
await self.handle(transcript: transcript, isFinal: isFinal)