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: meeting detection permanently breaks after first interaction
Gabriel Stein2348f59b09ec
diff --git a/src/helpers/audioActivityDetector.js b/src/helpers/audioActivityDetector.jsindex 3d20a43ba..4514ae1cf 100644--- a/src/helpers/audioActivityDetector.js+++ b/src/helpers/audioActivityDetector.js@@ -7,10 +7,10 @@ const debugLogger = require("./debugLogger");const execAsync = promisify(exec);-const CHECK_INTERVAL_MS = process.platform === "win32" ? 15 * 1000 : 5 * 1000;-const SUSTAINED_THRESHOLD_CHECKS = process.platform === "win32" ? 2 : 3;-const SUSTAINED_EVENT_DRIVEN_MS = 15 * 1000;-const COOLDOWN_MS = 30 * 60 * 1000;+const CHECK_INTERVAL_MS = process.platform === "win32" ? 15 * 1000 : 3 * 1000;+const SUSTAINED_THRESHOLD_CHECKS = 2;+const SUSTAINED_EVENT_DRIVEN_MS = 2 * 1000;+const COOLDOWN_MS = 5 * 60 * 1000;const EXEC_OPTS = { timeout: 5000, encoding: "utf8" };class AudioActivityDetector extends EventEmitter {@@ -89,6 +89,13 @@ class AudioActivityDetector extends EventEmitter {);}+ resetPrompt() {+ this.hasPrompted = false;+ this._clearSustainedTimer();+ this.audioActiveStart = null;+ debugLogger.info("Audio detection prompt reset (no cooldown)", {}, "meeting");+ }+_reset() {this.consecutiveChecks = 0;this.audioActiveStart = null;diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsindex 908e73b67..36d65a88f 100644--- a/src/helpers/meetingDetectionEngine.js+++ b/src/helpers/meetingDetectionEngine.js@@ -181,6 +181,12 @@ class MeetingDetectionEngine {});}+ if (detection.source === "audio") {+ this.audioActivityDetector.resetPrompt();+ } else if (detection.source === "process") {+ this.meetingProcessDetector.dismiss(detection.key);+ }+this.activeDetections.delete(detectionId);} else if (action === "dismiss") {if (detection) {@@ -193,6 +199,17 @@ class MeetingDetectionEngine {}}+ handleNotificationTimeout() {+ for (const [detectionId, detection] of this.activeDetections) {+ if (!detection.dismissed) {+ this._dismiss(detection.source, detection.key);+ detection.dismissed = true;+ }+ }+ this.activeDetections.clear();+ debugLogger.info("Notification auto-dismissed, detections cleared", {}, "meeting");+ }+_flushNotificationQueue() {if (this._notificationQueue.length === 0) return;diff --git a/src/helpers/meetingProcessDetector.js b/src/helpers/meetingProcessDetector.jsindex ca47ff512..2bc77b75a 100644--- a/src/helpers/meetingProcessDetector.js+++ b/src/helpers/meetingProcessDetector.js@@ -119,6 +119,29 @@ class MeetingProcessDetector extends EventEmitter {},"meeting");++ this._initialScanDarwin();+ }++ async _initialScanDarwin() {+ try {+ const processList = await processListCache.getProcessList();+ const darwinProcessNames = [+ { match: "zoom.us", processKey: "zoom" },+ { match: "microsoft teams", processKey: "teams" },+ { match: "webex", processKey: "webex" },+ { match: "facetime", processKey: "facetime" },+ ];+ for (const { match, processKey } of darwinProcessNames) {+ if (processList.some((p) => p.includes(match))) {+ const appName = BUNDLE_APP_NAMES[processKey] || processKey;+ debugLogger.info("Initial scan: already running", { processKey, appName }, "meeting");+ this._updateDetection(processKey, appName, true);+ }+ }+ } catch (err) {+ debugLogger.warn("Initial scan failed", { error: err.message }, "meeting");+ }}_startPollingFallback() {@@ -155,6 +178,7 @@ class MeetingProcessDetector extends EventEmitter {}this.detectedProcesses.clear();+ this.dismissedProcesses.clear();debugLogger.info("Stopped meeting process detector", {}, "meeting");}@@ -208,6 +232,7 @@ class MeetingProcessDetector extends EventEmitter {}} else if (this.detectedProcesses.has(processKey)) {this.detectedProcesses.delete(processKey);+ this.dismissedProcesses.delete(processKey);debugLogger.info("Meeting process ended", { processKey, appName }, "meeting");this.emit("meeting-process-ended", { processKey, appName });}diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.jsindex 0e4feab7c..786eaa0bd 100644--- a/src/helpers/windowManager.js+++ b/src/helpers/windowManager.js@@ -956,14 +956,22 @@ class WindowManager {this._pendingNotificationData = promptData;- setTimeout(() => {+ const sendAndShow = () => {if (this.notificationWindow && !this.notificationWindow.isDestroyed()) {this.notificationWindow.webContents.send("meeting-notification-data", promptData);this.notificationWindow.showInactive();}- }, 300);+ };+ if (this.notificationWindow.webContents.isLoading()) {+ this.notificationWindow.webContents.once("did-finish-load", sendAndShow);+ } else {+ sendAndShow();+ }this._notificationTimeout = setTimeout(() => {+ if (this.meetingDetectionEngine) {+ this.meetingDetectionEngine.handleNotificationTimeout();+ }this.dismissMeetingNotification();}, 30000);