Repository navigation
feat(macos): native mic capture via ffmpeg avfoundation - #68
Merged
Merged
Conversation
Route macOS recording through ffmpeg's avfoundation input device instead of a separate CoreAudio backend, since ffmpeg is already a required dependency and emits the same 16kHz/mono/s16 WAV the whisper pipeline consumes. Introduces a pure recorder_args() seam in recorder.rs so both the pw-record and ffmpeg argument shapes are unit-tested; SttConfig's default recorder is now platform-dependent (ffmpeg on macOS, pw-record on Linux) while explicit user config is unaffected. Removes the "Native audio capture" release blocker for macOS, moves the doctor page's recorder check ahead of the dictation-support early return and makes it platform-aware, and adds src-tauri/Info.plist with NSMicrophoneUsageDescription for the macOS bundle.
Closed
11 tasks done
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.
PR 2 of #66.
recorder_args()pure seam insrc/engine/recorder.rs: pw-record args byte-identical (pinned by test); ffmpeg/avfoundation shape (-i :defaultor:<audio_target>, 16k/mono/s16 WAV) selected by recorder file stemdefault_recorder_command()); explicit user config untoucheddictation_supportedstays false until the loop is proven)src-tauri/Info.plistwithNSMicrophoneUsageDescription(Tauri 2 auto-merges into the bundle)Design deviation from the #66 plan text (cpal → ffmpeg) recorded on the issue: ffmpeg is already an unconditional product dependency and emits exactly the WAV format the whisper pipeline consumes, reusing all existing process/stop/log machinery.
Validated on macOS hardware: 122 engine + 37 shell tests, clippy
-D warningsclean, and a live capture smoke — real 2s recording via the exact ffmpeg args, SIGINT finalize, valid 37KB WAV.🤖 Generated with Claude Code