Bug Description
When a USB microphone temporarily disconnects or drops hardware connection during an active session (or right at computer startup), Handy does not handle the stream drop gracefully.
What happens:
-
The physical mic disconnects mid-recording or drops connection.
-
The recording fails silently and outputs sample count: 0.
-
Upon stopping, the app fails to transcribe (stop() failed: sending on a closed channel) because no samples were retrieved.
-
App lock-up state: For subsequent recording attempts, the app remains stuck believing the old stream is still active (Microphone stream already active -> Failed to start recording: Recorder not available).
-
The user cannot record again until the internal stream timeout finishes and resets the audio manager (approx. 1–2 minutes later).
Expected Behavior:
If an active microphone disconnects, Handy should detect the broken stream, reset the stream flag gracefully, prompt/notify the user, and re-initialize the audio device (or switch back to system default) without locking up subsequent record hotkey actions.
System Information
Logs
1. Stream Disconnection & Recorder Lock-up State:
[2026-07-20][06:10:09][handy_app_lib::audio_toolkit::audio::recorder][ERROR] Stream error: The requested device is no longer available. For example, it has been unplugged.
[2026-07-20][06:10:12][handy_app_lib::actions][DEBUG] TranscribeAction::start called for binding: transcribe
[2026-07-20][06:10:12][handy_app_lib::managers::audio][DEBUG] Microphone stream already active
[2026-07-20][06:10:12][handy_app_lib::actions][DEBUG] Failed to start recording: Recorder not available
[2026-07-20][06:10:12][handy_app_lib::transcription_coordinator][DEBUG] Start for 'transcribe' did not begin recording; staying idle
[2026-07-20][06:10:34][handy_app_lib::managers::audio][DEBUG] Microphone stream stopped
[2026-07-20][06:10:34][handy_app_lib::managers::audio][DEBUG] device resolve: no mic configured -> system default
2. Mid-Session Disconnect & Zero-Sample Channel Error:
[2026-07-20][20:43:32][handy_app_lib::audio_toolkit::audio::recorder][INFO] Using device: Ok("Microphone (USB Condenser Microphone)")
Sample rate: 48000
Channels: 2
Format: F32
[2026-07-20][20:43:37][handy_app_lib::audio_toolkit::audio::recorder][ERROR] Stream error: The requested device is no longer available. For example, it has been unplugged.
[2026-07-20][20:44:15][handy_app_lib::actions][DEBUG] TranscribeAction::stop called for binding: transcribe
[2026-07-20][20:44:15][handy_app_lib::managers::audio][ERROR] stop() failed: sending on a closed channel
[2026-07-20][20:44:15][handy_app_lib::actions][DEBUG] Recording stopped and samples retrieved in 241.4µs, sample count: 0
[2026-07-20][20:44:15][handy_app_lib::actions][DEBUG] Recording produced no audio samples; skipping persistence
[2026-07-20][20:44:33][handy_app_lib::actions][DEBUG] TranscribeAction::start called for binding: transcribe
[2026-07-20][20:44:33][handy_app_lib::managers::audio][DEBUG] Microphone stream already active
[2026-07-20][20:44:33][handy_app_lib::actions][DEBUG] Failed to start recording: Recorder not available
[2026-07-20][20:44:33][handy_app_lib::transcription_coordinator][DEBUG] Start for 'transcribe' did not begin recording; staying idle
Bug Description
When a USB microphone temporarily disconnects or drops hardware connection during an active session (or right at computer startup), Handy does not handle the stream drop gracefully.
What happens:
The physical mic disconnects mid-recording or drops connection.
The recording fails silently and outputs
sample count: 0.Upon stopping, the app fails to transcribe (
stop() failed: sending on a closed channel) because no samples were retrieved.App lock-up state: For subsequent recording attempts, the app remains stuck believing the old stream is still active (
Microphone stream already active->Failed to start recording: Recorder not available).The user cannot record again until the internal stream timeout finishes and resets the audio manager (approx. 1–2 minutes later).
Expected Behavior:
If an active microphone disconnects, Handy should detect the broken stream, reset the stream flag gracefully, prompt/notify the user, and re-initialize the audio device (or switch back to system default) without locking up subsequent record hotkey actions.
System Information
App Version:
0.9.3Operating System:
Windows 11CPU:
AMD Ryzen 7GPU:
NVIDIA GeForce GTX 1660 TiLogs