fix: add audio device probe and afplay timeout to VoiceServer#951
Open
MarvinDontPanic wants to merge 1 commit intodanielmiessler:mainfrom
Open
fix: add audio device probe and afplay timeout to VoiceServer#951MarvinDontPanic wants to merge 1 commit intodanielmiessler:mainfrom
MarvinDontPanic wants to merge 1 commit intodanielmiessler:mainfrom
Conversation
Two related reliability fixes for VoiceServer on macOS: 1. Audio device probe at startup: Plays a near-silent system sound with a 3s timeout. If afplay hangs (no output device, virtual audio, running under launchd without audio session), all voice playback is disabled for the session rather than hanging. 2. afplay timeout per-clip: 10s timeout on each playback call with a settled-flag pattern to prevent resolve/reject races. Most TTS clips are 1-3s, so 10s catches hung audio devices without cutting off legitimate long utterances. Without these fixes, afplay hangs indefinitely when no audio output device is available, blocking the notification server. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related reliability fixes for VoiceServer on macOS:
Tink.aiffat 1% volume) with a 3-second timeout. Ifafplayhangs (no output device, virtual audio, or running underlaunchdwithout an audio session), all voice playback is disabled for the session rather than hanging the serverProblem
Without these fixes,
afplayhangs indefinitely when no audio output device is available, blocking the notification server's/notifyendpoint. This commonly happens when:File Changed
Releases/v4.0.3/.claude/VoiceServer/server.tsTest plan
/notifyreturns success but skips playback🤖 Generated with Claude Code