fix: show friendly error when no audio input device is available#1115
Merged
cjpais merged 1 commit intocjpais:mainfrom Mar 22, 2026
Merged
fix: show friendly error when no audio input device is available#1115cjpais merged 1 commit intocjpais:mainfrom
cjpais merged 1 commit intocjpais:mainfrom
Conversation
When recording on a machine without a microphone (e.g. Mac Studio with no external mic), the app previously showed a cryptic coreaudio-rs error. Now it shows a clear, actionable toast: "No Microphone Found — Please connect a microphone or headset and try again." Fixes cjpais#1114
Owner
|
Thanks for this, used to be a crash, then cryptic error, and now nice error. Thanks for your fix |
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
start_microphone_stream()to detect when no audio input devices exist before hitting coreaudiono_input_deviceerror type (following the existingmicrophone_permission_deniedpattern)Fixes #1114
Changes
Backend (Rust):
recorder.rs— Addedis_no_input_device_error()detection helper + 3 unit testsmanagers/audio.rs— Pre-flight device enumeration check beforerec.open()actions.rs— New"no_input_device"error type classificationaudio/mod.rs,audio_toolkit/mod.rs— Re-exportsFrontend (React/TS):
App.tsx— Newelse ifbranch for theno_input_deviceerror typetranslation.jsonfiles — AddednoInputDeviceTitleandnoInputDevicei18n keysBefore / After
Before:
Failed to start recording: Failed to open recorder: Failed to fetch preferred config: A backend-specific error has occurred: An unknown error unknown to the coreaudio-rs API occurredAfter: No Microphone Found — No audio input device was detected. Please connect a microphone or headset and try again.
Test plan
cargo test -- recorder::tests— all 7 tests pass (including 3 new ones)bun run lint— passes clean