Skip to content

fix: reject silent microphone captures in clamshell mode - #184

Merged
jatinkrmalik merged 1 commit into
mainfrom
jmalik/fix-clamshell-silent-input
Jul 16, 2026
Merged

fix: reject silent microphone captures in clamshell mode#184
jatinkrmalik merged 1 commit into
mainfrom
jmalik/fix-clamshell-silent-input

Conversation

@jatinkrmalik

Copy link
Copy Markdown
Member

Summary

  • Stop effectively silent microphone captures before they reach Whisper, preventing subtitle-style hallucinations from disconnected input.
  • Show an actionable message directing clamshell users to select an external microphone.
  • Remove the duplicate-looking (System Default) suffix from physical devices in the microphone picker.

Root cause

Modern MacBooks hardware-disconnect the built-in microphone when the lid closes. macOS can continue reporting that microphone as the default input, so VocaMac receives a non-empty buffer containing digital silence. The existing empty-buffer check passes that audio to Whisper, which may generate phrases such as "thank you" or foreign-language subtitle text.

Explicitly selecting an external microphone works because VocaMac binds its AudioUnit directly to that Core Audio device.

User impact

VocaMac now rejects disconnected digital silence instead of inserting hallucinated text and tells the user how to recover. It does not silently switch microphones; users retain control over which device records audio.

Validation

  • swift test
  • 226 tests executed, 1 permission-dependent test skipped, 0 failures
  • Added coverage confirming silent capture neither invokes Whisper nor injects text
  • git diff --check

@github-actions github-actions Bot added app ci question Further information is requested and removed question Further information is requested ci labels Jul 14, 2026
@jatinkrmalik
jatinkrmalik force-pushed the jmalik/fix-clamshell-silent-input branch from 97148bf to 843e192 Compare July 14, 2026 19:30
@jatinkrmalik
jatinkrmalik marked this pull request as ready for review July 16, 2026 19:51
@jatinkrmalik
jatinkrmalik merged commit fcc02cf into main Jul 16, 2026
5 checks passed
@jatinkrmalik
jatinkrmalik deleted the jmalik/fix-clamshell-silent-input branch August 22, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant