Skip to content

Microphone permission granted at startup is not picked up until v2t is restarted #7

Description

@lucharo

What happens

First run of v2t on a machine that has not yet granted Microphone access. The startup
permission check requests it, the dialog is accepted, and startup logs Permissions OK.
Both models load and the engine reports idle.

Every subsequent push-to-talk then fails:

||PaMacCore (AUHAL)|| Error on line 1322: err='-10851', msg=Audio Unit: Invalid Property Value
ERROR | v2t.app:start_recording:185 - Could not open the microphone:
        Error opening InputStream: Internal PortAudio error [PaErrorCode -9986]

and v2t status moves to:

error   parakeet-v3   Qwen2.5-1.5B   strict   Microphone unavailable: ...

The hotkey itself is fine. start_recording fires on every press, so this is not an
Accessibility or pynput problem.

Diagnosis

CoreAudio/PortAudio appears to be initialised in-process before the TCC grant actually
lands, so the long-running process never picks up the permission it just requested.

The evidence for that: while the v2t process was still failing, a fresh Python process in
the same terminal opened every input device at both 16 kHz and 48 kHz with no error:

dev=None sr=16000  OK      dev=None sr=48000  OK
dev=3    sr=16000  OK      dev=3    sr=48000  OK
dev=4    sr=16000  OK      dev=4    sr=48000  OK

So it is not device selection and not a sample-rate mismatch, which is where the current
error message points you.

Workaround

Restart v2t. It works immediately on the next launch.

Suggested fix

Either of these would do it:

  1. Re-exec after a newly granted Microphone permission. check_and_request_permissions
    already distinguishes "just requested" from "already had it", so it has the information
    needed to decide.
  2. At minimum, make the failure self-explanatory:
    Microphone unavailable — if you just granted permission, restart v2t.

As it stands the message reads like a hardware or device-configuration fault, which sends
you off inspecting input devices and sample rates instead of just restarting.

Environment

  • v2t 0.3.0, installed from source via uv tool install --editable .
  • macOS 26.5.1, Apple Silicon
  • Launched from a terminal, not the menu-bar app
  • Default input was a USB audio device rather than the built-in mic (not the cause, but
    it is what made sample rate the first suspect)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions