Skip to content

fix: handle missing microphone gracefully (fixes #5)#13

Open
SeoFood wants to merge 1 commit intomainfrom
issue-5
Open

fix: handle missing microphone gracefully (fixes #5)#13
SeoFood wants to merge 1 commit intomainfrom
issue-5

Conversation

@SeoFood
Copy link
Copy Markdown
Contributor

@SeoFood SeoFood commented Apr 3, 2026

Summary

  • Guard AudioRecordingService.WarmUp() and StartPreview() against zero audio input devices with early-return checks and try-catch, preventing the app from freezing when no microphone is connected.
  • Add HasDevice property and DeviceAvailable event for automatic recovery when a microphone is plugged in (detected via existing 2-second polling timer).
  • Show localized user feedback ("No microphone connected" / "Microphone connected") through the existing overlay notification system.
  • Guard all caller sites (App startup, DictationViewModel, WelcomeViewModel, SettingsViewModel) to skip recording/preview gracefully when no device is available.

Test plan

  • Start app with no microphone connected - should not freeze, shows "No microphone connected" feedback
  • Plug in a microphone while app is running - should auto-recover within ~2s and show "Microphone connected"
  • Unplug microphone during active recording - should stop gracefully and notify
  • Normal operation with microphone connected - all existing behavior unchanged

Guard AudioRecordingService.WarmUp() and StartPreview() against zero
audio devices with early-return and try-catch. Add DeviceAvailable event
and HasDevice property for auto-recovery via existing 2s polling timer.
Show user-visible feedback when no microphone is connected and when one
becomes available again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant