Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
fix(permissions): simplify system audio probe, remove stale guard
Gabriel Stein3248c8380265
diff --git a/main.js b/main.jsindex 4ca4eba2f..89e22207d 100644--- a/main.js+++ b/main.js@@ -367,9 +367,7 @@ function initializeDeferredManagers() {});}- // Resolve system audio permission status for the session.- // If already granted, the probe succeeds instantly (no dialog).- // If never asked, status stays "unknown" until the user clicks "Grant Access".+ // Cache the system audio TCC status for the session via a quick probe.if (audioTapManager?.isSupported()) {audioTapManager.resolvePermission().catch(() => {});}diff --git a/src/helpers/audioTapManager.js b/src/helpers/audioTapManager.jsindex 77550d009..74851937b 100644--- a/src/helpers/audioTapManager.js+++ b/src/helpers/audioTapManager.js@@ -79,26 +79,19 @@ class AudioTapManager {}/**- * Probe the native binary to resolve permission status for the session.- * Safe to call on startup: only probes when macOS has already asked the- * user (screenStatus !== "not-determined"), so no consent dialog appears.- * First-time users stay "unknown" until they click "Grant Access".+ * Probe the native binary once on startup to cache the real TCC status.+ * The macOS consent dialog only appears on the very first call — after+ * that, probing is always silent (success or silent failure). Safe to+ * call on every app launch.*/async resolvePermission() {if (!this.isSupported() || this.permissionStatus !== "unknown") {return;}- const { systemPreferences } = require("electron");- const screenStatus = systemPreferences.getMediaAccessStatus("screen");- if (screenStatus === "not-determined") {- // User has never been asked — don't trigger the consent dialog.- return;- }- // User was asked before (granted or denied) — probe is dialog-safe.try {await this.requestAccess();} catch {- // requestAccess already caches "denied" on permission_denied errors.+ // requestAccess caches "denied" on permission_denied errors.}}diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex 87e22799c..46e2a07d1 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -2375,12 +2375,6 @@ class IPCHandlers {return { granted: false, status: "unsupported", mode: "unsupported" };}- // Use cached permission status from the audio tap manager.- // We intentionally do NOT probe here — probing spawns the native- // binary which triggers the macOS consent dialog. The status gets- // resolved to "granted" or "denied" after the user explicitly- // clicks "Grant Access" (request-system-audio-access) or after a- // successful recording session.const result = this.audioTapManager.checkAccess();return { granted: result.granted, status: result.status, mode: "native" };});