Skip to content

Add macOS microphone selection and paste fixes#5

Merged
OBress merged 5 commits into
OBress:mainfrom
maxschmieder05-create:add-microphone-dropdown
May 10, 2026
Merged

Add macOS microphone selection and paste fixes#5
OBress merged 5 commits into
OBress:mainfrom
maxschmieder05-create:add-microphone-dropdown

Conversation

@maxschmieder05-create
Copy link
Copy Markdown
Contributor

Summary

Adds the remaining macOS dictation usability fixes discovered while running VibeToText locally on an Apple Silicon Mac:

  • Replace the free-text microphone setting with a populated microphone dropdown.
  • Add a macOS microphone privacy usage string so VibeToText appears in Privacy & Security > Microphone.
  • Fix macOS paste injection so dictation can paste into Cursor without crashing.
  • Suppress repeated macOS Accessibility prompts once the app already has permission.

Root Cause

The microphone field allowed a device name to be typed, but macOS users had no reliable way to discover or select the exact CPAL input device name. The bundle also lacked NSMicrophoneUsageDescription, so macOS could fail to associate the app with the microphone privacy prompt.

After microphone capture worked, paste exposed two macOS-specific issues: Enigo's layout-dependent Key::Unicode('v') path can call keyboard layout APIs from a Tokio worker thread and crash on macOS, and Enigo's default settings request the Accessibility prompt every time a new input injector is created.

Changes

  • Add a list_input_devices Tauri command backed by CPAL input device enumeration.
  • Populate the settings UI microphone control as a dropdown, keeping (system default) and preserving saved missing devices.
  • Add src-tauri/Info.plist with NSMicrophoneUsageDescription.
  • Use raw macOS keycodes for Cmd+V paste injection to avoid layout lookup crashes.
  • Create Enigo instances with open_prompt_to_get_permissions = false during paste/type injection to avoid repeated Accessibility popups.

Validation

  • node --check src/main.js
  • cargo fmt --check
  • cargo check --all-targets
  • npm run tauri -- build --debug --bundles app
  • Launched the rebuilt macOS .app locally and verified microphone capture, Cursor paste, and no quit-after-paste behavior.

Max Schmieder and others added 5 commits May 10, 2026 17:33
CI's `cargo clippy --all-targets -- -D warnings` rejected the
field-reassignment pattern. Use struct init with `..Default::default()`
instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@OBress OBress merged commit 77192b2 into OBress:main May 10, 2026
2 checks passed
@OBress OBress mentioned this pull request May 11, 2026
3 tasks
OBress added a commit that referenced this pull request May 11, 2026
Rolls up the v0.1.1 macOS runtime fixes (which never shipped — the
Intel build queued in CI for 90+ min and was abandoned) plus the new
mic picker + paste injection fixes from #5.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants