Description
On Windows, announce.ps1 creates a System.Speech.Synthesis.SpeechSynthesizer instance without calling SetOutputToDefaultAudioDevice(). As a result, the synthesizer outputs to the audio device configured in Windows SAPI settings (Control Panel > Speech), which may differ from the user's default Windows audio device.
Observed behavior
Users who have a wireless headset set as the Windows default playback device receive announcements through the built-in speakers instead. Other Windows applications and NVDA correctly use the default device (the headset), but Claude Code announcements do not.
Root cause
announce.ps1:
$synth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$synth.Speak($message)
System.Speech.Synthesis.SpeechSynthesizer defaults to the SAPI-configured audio output token, which is stored separately from the Windows audio default and may point to a different device.
Expected behavior
Announcements should follow the Windows default audio output device, consistently with other applications.
Fix
Add a single call before Speak():
$synth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$synth.SetOutputToDefaultAudioDevice()
$synth.Speak($message)
SetOutputToDefaultAudioDevice() routes audio through the Windows WAVE_MAPPER, which always resolves to the current default playback device.
Description
On Windows,
announce.ps1creates aSystem.Speech.Synthesis.SpeechSynthesizerinstance without callingSetOutputToDefaultAudioDevice(). As a result, the synthesizer outputs to the audio device configured in Windows SAPI settings (Control Panel > Speech), which may differ from the user's default Windows audio device.Observed behavior
Users who have a wireless headset set as the Windows default playback device receive announcements through the built-in speakers instead. Other Windows applications and NVDA correctly use the default device (the headset), but Claude Code announcements do not.
Root cause
announce.ps1:System.Speech.Synthesis.SpeechSynthesizerdefaults to the SAPI-configured audio output token, which is stored separately from the Windows audio default and may point to a different device.Expected behavior
Announcements should follow the Windows default audio output device, consistently with other applications.
Fix
Add a single call before
Speak():SetOutputToDefaultAudioDevice()routes audio through the Windows WAVE_MAPPER, which always resolves to the current default playback device.