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
feat: bulletproof meeting detection with process and audio layers
Gabriel Steinee1497b91867
diff --git a/main.js b/main.jsindex 3187248e3..3a26ae681 100644--- a/main.js+++ b/main.js@@ -166,6 +166,9 @@ const DevServerManager = require("./src/helpers/devServerManager");const WindowsKeyManager = require("./src/helpers/windowsKeyManager");const WhisperCudaManager = require("./src/helpers/whisperCudaManager");const GoogleCalendarManager = require("./src/helpers/googleCalendarManager");+const MeetingProcessDetector = require("./src/helpers/meetingProcessDetector");+const AudioActivityDetector = require("./src/helpers/audioActivityDetector");+const MeetingDetectionEngine = require("./src/helpers/meetingDetectionEngine");const { i18nMain, changeLanguage } = require("./src/helpers/i18nMain");// Manager instances - initialized after app.whenReady()@@ -183,6 +186,7 @@ let globeKeyManager = null;let windowsKeyManager = null;let whisperCudaManager = null;let googleCalendarManager = null;+let meetingDetectionEngine = null;let globeKeyAlertShown = false;let authBridgeServer = null;@@ -246,6 +250,11 @@ function initializeCoreManagers() {}parakeetManager = new ParakeetManager();googleCalendarManager = new GoogleCalendarManager(databaseManager, windowManager);+ meetingDetectionEngine = new MeetingDetectionEngine(+ googleCalendarManager,+ new MeetingProcessDetector(),+ new AudioActivityDetector()+ );updateManager = new UpdateManager();windowsKeyManager = new WindowsKeyManager();@@ -261,6 +270,7 @@ function initializeCoreManagers() {windowsKeyManager,whisperCudaManager,googleCalendarManager,+ meetingDetectionEngine,getTrayManager: () => trayManager,});}@@ -299,6 +309,7 @@ function initializeDeferredManagers() {}googleCalendarManager.start();+ meetingDetectionEngine.start();}app.on("open-url", (event, url) => {@@ -495,6 +506,10 @@ async function startApp() {// Phase 2: Initialize remaining managers after windows are visibleinitializeDeferredManagers();+ app.on("browser-window-focus", () => {+ if (googleCalendarManager) googleCalendarManager.syncOnFocus();+ });+const { powerMonitor } = require("electron");powerMonitor.on("resume", () => {if (googleCalendarManager) {@@ -929,6 +944,9 @@ if (gotSingleInstanceLock) {if (windowsKeyManager) {windowsKeyManager.stop();}+ if (meetingDetectionEngine) {+ meetingDetectionEngine.stop();+ }if (googleCalendarManager) {googleCalendarManager.stop();}diff --git a/preload.js b/preload.jsindex 33d4a170f..f77684a67 100644--- a/preload.js+++ b/preload.js@@ -474,4 +474,19 @@ contextBridge.exposeInMainWorld("electronAPI", {"gcal-events-synced",(callback) => (_event, data) => callback(data)),++ // Meeting detection+ meetingDetectionGetPreferences: () => ipcRenderer.invoke("meeting-detection-get-preferences"),+ meetingDetectionSetPreferences: (prefs) =>+ ipcRenderer.invoke("meeting-detection-set-preferences", prefs),+ meetingDetectionRespond: (detectionId, action) =>+ ipcRenderer.invoke("meeting-detection-respond", detectionId, action),+ onMeetingDetected: registerListener(+ "meeting-detected",+ (callback) => (_event, data) => callback(data)+ ),+ onMeetingDetectedStartRecording: registerListener(+ "meeting-detected-start-recording",+ (callback) => (_event, data) => callback(data)+ ),});diff --git a/src/components/CalendarSettings.tsx b/src/components/CalendarSettings.tsxindex 020f2490d..e9cf5a3a9 100644--- a/src/components/CalendarSettings.tsx+++ b/src/components/CalendarSettings.tsx@@ -71,7 +71,16 @@ function formatEventTime(startTime: string): string {export default function CalendarSettings() {const { t } = useTranslation();- const { gcalConnected, gcalEmail, setGcalConnected, setGcalEmail } = useSettingsStore();+ const {+ gcalConnected,+ gcalEmail,+ setGcalConnected,+ setGcalEmail,+ meetingProcessDetection,+ meetingAudioDetection,+ setMeetingProcessDetection,+ setMeetingAudioDetection,+ } = useSettingsStore();const [calendars, setCalendars] = useState<GoogleCalendar[]>([]);const [upcomingEvents, setUpcomingEvents] = useState<CalendarEvent[]>([]);const [isConnecting, setIsConnecting] = useState(false);@@ -299,6 +308,47 @@ export default function CalendarSettings() {</SettingsPanel></div>)}++ <div>+ <SectionHeader+ title={t("calendar.detection.title")}+ description={t("calendar.detection.description")}+ />+ <SettingsPanel>+ <SettingsPanelRow>+ <SettingsRow+ label={t("calendar.detection.processDetection")}+ description={t("calendar.detection.processDescription")}+ >+ <Toggle+ checked={meetingProcessDetection}+ onChange={(checked) => {+ setMeetingProcessDetection(checked);+ window.electronAPI?.meetingDetectionSetPreferences?.({+ processDetection: checked,+ });+ }}+ />+ </SettingsRow>+ </SettingsPanelRow>+ <SettingsPanelRow>+ <SettingsRow+ label={t("calendar.detection.audioDetection")}+ description={t("calendar.detection.audioDescription")}+ >+ <Toggle+ checked={meetingAudioDetection}+ onChange={(checked) => {+ setMeetingAudioDetection(checked);+ window.electronAPI?.meetingDetectionSetPreferences?.({+ audioDetection: checked,+ });+ }}+ />+ </SettingsRow>+ </SettingsPanelRow>+ </SettingsPanel>+ </div></div>);}diff --git a/src/helpers/audioActivityDetector.js b/src/helpers/audioActivityDetector.jsnew file mode 100644index 000000000..20ef463d8--- /dev/null+++ b/src/helpers/audioActivityDetector.js@@ -0,0 +1,127 @@+const { execSync } = require("child_process");+const EventEmitter = require("events");+const debugLogger = require("./debugLogger");++const CHECK_INTERVAL_MS = 10 * 1000;+const SUSTAINED_THRESHOLD_CHECKS = 3;+const COOLDOWN_MS = 30 * 60 * 1000;+const EXEC_OPTS = { timeout: 5000, encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] };++class AudioActivityDetector extends EventEmitter {+ constructor() {+ super();+ this.checkInterval = null;+ this.consecutiveChecks = 0;+ this.audioActiveStart = null;+ this.hasPrompted = false;+ this.lastDismissedAt = null;+ }++ start() {+ if (this.checkInterval) return;+ debugLogger.info("Starting audio activity detector", {}, "meeting");+ this.checkInterval = setInterval(() => this._check(), CHECK_INTERVAL_MS);+ }++ stop() {+ if (this.checkInterval) {+ clearInterval(this.checkInterval);+ this.checkInterval = null;+ }+ this._reset();+ debugLogger.info("Stopped audio activity detector", {}, "meeting");+ }++ dismiss() {+ this.lastDismissedAt = Date.now();+ this._reset();+ }++ _reset() {+ this.consecutiveChecks = 0;+ this.audioActiveStart = null;+ this.hasPrompted = false;+ }++ _check() {+ if (this.lastDismissedAt && Date.now() - this.lastDismissedAt < COOLDOWN_MS) return;+ if (this.hasPrompted) return;++ if (this._isMicActive()) {+ this.consecutiveChecks++;+ if (!this.audioActiveStart) this.audioActiveStart = Date.now();++ if (this.consecutiveChecks >= SUSTAINED_THRESHOLD_CHECKS) {+ this.hasPrompted = true;+ const now = Date.now();+ debugLogger.info(+ "Sustained audio activity detected",+ {+ consecutiveChecks: this.consecutiveChecks,+ durationMs: now - this.audioActiveStart,+ },+ "meeting"+ );+ this.emit("sustained-audio-detected", {+ durationMs: now - this.audioActiveStart,+ detectedAt: now,+ });+ }+ } else {+ this.consecutiveChecks = 0;+ this.audioActiveStart = null;+ }+ }++ _isMicActive() {+ switch (process.platform) {+ case "darwin":+ return this._checkDarwin();+ case "win32":+ return this._checkWin32();+ case "linux":+ return this._checkLinux();+ default:+ return false;+ }+ }++ _checkDarwin() {+ try {+ const out = execSync("ioreg -l -w 0 | grep '\"IOAudioEngineState\" = 1'", EXEC_OPTS);+ return out.trim().length > 0;+ } catch {+ return false;+ }+ }++ _checkWin32() {+ try {+ const out = execSync(+ "powershell -NoProfile -Command \"(Get-Process -Name 'CptHost','ms-teams_modulehost','webexmeetingsapp' -ErrorAction SilentlyContinue).Count -gt 0\"",+ EXEC_OPTS+ );+ return out.trim() === "True";+ } catch {+ return false;+ }+ }++ _checkLinux() {+ try {+ const out = execSync("pactl list source-outputs short", EXEC_OPTS);+ return out.trim().length > 0;+ } catch {+ // pactl unavailable, try PipeWire+ }++ try {+ const out = execSync("pw-cli list-objects | grep -c 'Stream/Input/Audio'", EXEC_OPTS);+ return parseInt(out.trim(), 10) > 0;+ } catch {+ return false;+ }+ }+}++module.exports = AudioActivityDetector;diff --git a/src/helpers/googleCalendarManager.js b/src/helpers/googleCalendarManager.jsindex 52536fe30..6cf0a04ee 100644--- a/src/helpers/googleCalendarManager.js+++ b/src/helpers/googleCalendarManager.js@@ -15,7 +15,8 @@ class GoogleCalendarManager {this.meetingEndTimer = null;this.activeMeeting = null;this.notifiedMeetings = new Set();- this.SYNC_INTERVAL_MS = 10 * 60 * 1000;+ this.SYNC_INTERVAL_MS = 2 * 60 * 1000;+ this._lastFocusSync = 0;}start() {@@ -271,6 +272,27 @@ class GoogleCalendarManager {);}+ syncOnFocus() {+ if (!this.isConnected()) return;+ const now = Date.now();+ if (now - this._lastFocusSync < 30000) return;+ this._lastFocusSync = now;++ this.syncEvents()+ .then(() => this.scheduleNextMeeting())+ .catch((err) =>+ debugLogger.error("Focus-triggered sync failed", { error: err.message }, "gcal")+ );+ }++ getActiveMeetingState() {+ return {+ activeMeeting: this.activeMeeting,+ activeEvents: this.databaseManager.getActiveEvents(),+ upcomingEvents: this.databaseManager.getUpcomingEvents(15),+ };+ }+getCalendars() {return this.databaseManager.getGoogleCalendars();}diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex fbab4bd3f..244161bd0 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -96,6 +96,7 @@ class IPCHandlers {this.getTrayManager = managers.getTrayManager;this.whisperCudaManager = managers.whisperCudaManager;this.googleCalendarManager = managers.googleCalendarManager;+ this.meetingDetectionEngine = managers.meetingDetectionEngine;this.sessionId = crypto.randomUUID();this.assemblyAiStreaming = null;this.deepgramStreaming = null;@@ -2720,6 +2721,32 @@ class IPCHandlers {}});+ ipcMain.handle("meeting-detection-get-preferences", async () => {+ try {+ return { success: true, preferences: this.meetingDetectionEngine.getPreferences() };+ } catch (error) {+ return { success: false, error: error.message };+ }+ });++ ipcMain.handle("meeting-detection-set-preferences", async (_event, prefs) => {+ try {+ this.meetingDetectionEngine.setPreferences(prefs);+ return { success: true };+ } catch (error) {+ return { success: false, error: error.message };+ }+ });++ ipcMain.handle("meeting-detection-respond", async (_event, detectionId, action) => {+ try {+ this.meetingDetectionEngine.handleUserResponse(detectionId, action);+ return { success: true };+ } catch (error) {+ return { success: false, error: error.message };+ }+ });+ipcMain.handle("get-desktop-sources", async (_event, types) => {try {const { desktopCapturer } = require("electron");diff --git a/src/helpers/meetingDetectionEngine.js b/src/helpers/meetingDetectionEngine.jsnew file mode 100644index 000000000..94d21d9b4--- /dev/null+++ b/src/helpers/meetingDetectionEngine.js@@ -0,0 +1,181 @@+const { Notification, BrowserWindow } = require("electron");+const debugLogger = require("./debugLogger");++const IMMINENT_THRESHOLD_MS = 5 * 60 * 1000;++class MeetingDetectionEngine {+ constructor(googleCalendarManager, meetingProcessDetector, audioActivityDetector) {+ this.googleCalendarManager = googleCalendarManager;+ this.meetingProcessDetector = meetingProcessDetector;+ this.audioActivityDetector = audioActivityDetector;+ this.activeDetections = new Map();+ this.preferences = { processDetection: true, audioDetection: true };+ this._bindListeners();+ }++ _bindListeners() {+ this.meetingProcessDetector.on("meeting-process-detected", (data) => {+ this._handleDetection("process", data.processKey, data);+ });++ this.meetingProcessDetector.on("meeting-process-ended", (data) => {+ this.activeDetections.delete(`process:${data.processKey}`);+ });++ this.audioActivityDetector.on("sustained-audio-detected", (data) => {+ this._handleDetection("audio", "sustained-audio", data);+ });+ }++ _handleDetection(source, key, data) {+ if (source === "process" && !this.preferences.processDetection) return;+ if (source === "audio" && !this.preferences.audioDetection) return;++ const detectionId = `${source}:${key}`;++ if (this.activeDetections.has(detectionId)) return;++ const calendarState = this.googleCalendarManager?.getActiveMeetingState?.();+ if (calendarState) {+ if (calendarState.activeMeeting !== null || calendarState.activeEvents?.length > 0) {+ debugLogger.debug(+ "Suppressing detection — active calendar meeting exists",+ { detectionId },+ "meeting"+ );+ return;+ }+ }++ let imminentEvent = null;+ if (calendarState?.upcomingEvents?.length > 0) {+ const now = Date.now();+ imminentEvent = calendarState.upcomingEvents.find((evt) => {+ const start = new Date(evt.start_time).getTime();+ return start - now <= IMMINENT_THRESHOLD_MS && start > now;+ });+ }++ this.activeDetections.set(detectionId, { source, key, data, dismissed: false });+ this._showPrompt(detectionId, source, key, data, imminentEvent);+ }++ _showPrompt(detectionId, source, key, data, imminentEvent) {+ let title, body;++ if (imminentEvent) {+ title = imminentEvent.summary || "Upcoming Meeting";+ body = "Your meeting is starting. Want to take notes?";+ } else if (source === "process") {+ title = `${data.appName} Meeting Detected`;+ body = "It looks like you're in a meeting. Want to take notes?";+ } else {+ title = "Meeting Detected";+ body = "It sounds like you're in a meeting. Want to take notes?";+ }++ const notif = new Notification({ title, body });++ notif.on("click", () => {+ let event;+ if (imminentEvent) {+ event = imminentEvent;+ } else {+ event = {+ id: `detected-${Date.now()}`,+ calendar_id: "__detected__",+ summary: data.appName ? `${data.appName} Meeting` : "Detected Meeting",+ start_time: new Date().toISOString(),+ end_time: new Date(Date.now() + 3600000).toISOString(),+ is_all_day: 0,+ status: "confirmed",+ hangout_link: null,+ conference_data: null,+ organizer_email: null,+ attendees_count: 0,+ };+ }++ this.broadcastToWindows("meeting-detected-start-recording", {+ event,+ source,+ detectionId,+ });+ });++ notif.on("close", () => {+ this._dismiss(source, key);+ const detection = this.activeDetections.get(detectionId);+ if (detection) detection.dismissed = true;+ });++ notif.show();++ this.broadcastToWindows("meeting-detected", {+ detectionId,+ source,+ data,+ imminentEvent,+ });+ }++ handleUserResponse(detectionId, action) {+ if (action === "dismiss") {+ const detection = this.activeDetections.get(detectionId);+ if (detection) {+ this._dismiss(detection.source, detection.key);+ detection.dismissed = true;+ }+ }+ }++ _dismiss(source, key) {+ if (source === "process") {+ this.meetingProcessDetector.dismiss(key);+ } else if (source === "audio") {+ this.audioActivityDetector.dismiss();+ }+ }++ setPreferences(prefs) {+ Object.assign(this.preferences, prefs);++ if (this.preferences.processDetection) {+ this.meetingProcessDetector.start();+ } else {+ this.meetingProcessDetector.stop();+ }++ if (this.preferences.audioDetection) {+ this.audioActivityDetector.start();+ } else {+ this.audioActivityDetector.stop();+ }+ }++ getPreferences() {+ return { ...this.preferences };+ }++ start() {+ if (this.preferences.processDetection) this.meetingProcessDetector.start();+ if (this.preferences.audioDetection) this.audioActivityDetector.start();+ }++ stop() {+ this.meetingProcessDetector.stop();+ this.audioActivityDetector.stop();+ this.activeDetections.clear();+ }++ broadcastToWindows(channel, data) {+ const windows = BrowserWindow.getAllWindows();+ windows.forEach((win) => {+ if (!win.isDestroyed()) {+ win.webContents.send(channel, data);+ }+ });+ }+}++module.exports = MeetingDetectionEngine;diff --git a/src/helpers/meetingProcessDetector.js b/src/helpers/meetingProcessDetector.jsnew file mode 100644index 000000000..0720d9bf0--- /dev/null+++ b/src/helpers/meetingProcessDetector.js@@ -0,0 +1,163 @@+const { execSync } = require("child_process");+const EventEmitter = require("events");+const debugLogger = require("./debugLogger");++const POLL_INTERVAL_MS = 20 * 1000;+const EXEC_OPTS = { timeout: 3000, encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] };++const MEETING_APPS = {+ darwin: [+ { processKey: "zoom", appName: "Zoom", check: () => hasProcessExact("CptHost") },+ {+ processKey: "teams",+ appName: "Microsoft Teams",+ check: () => hasProcess("MSTeams") && hasActiveAudio("MSTeams"),+ },+ {+ processKey: "facetime",+ appName: "FaceTime",+ check: () => hasProcessExact("FaceTime") && hasActiveAudio("FaceTime"),+ },+ { processKey: "webex", appName: "Webex", check: () => hasProcess("webexmeetingsapp") },+ ],+ win32: [+ {+ processKey: "zoom",+ appName: "Zoom",+ check: () => {+ const out = execSync('tasklist /FI "IMAGENAME eq CptHost.exe" /NH', EXEC_OPTS);+ return out.includes("CptHost");+ },+ },+ {+ processKey: "teams",+ appName: "Microsoft Teams",+ check: () => {+ const out = execSync(+ "powershell -NoProfile -Command \"(Get-Process -Name 'ms-teams_modulehost' -ErrorAction SilentlyContinue).Count -gt 0\"",+ EXEC_OPTS+ );+ return out.trim() === "True";+ },+ },+ {+ processKey: "webex",+ appName: "Webex",+ check: () => {+ const out = execSync('tasklist /FI "IMAGENAME eq webexmeetingsapp.exe" /NH', EXEC_OPTS);+ return out.includes("webexmeetingsapp");+ },+ },+ ],+ linux: [+ { processKey: "zoom", appName: "Zoom", check: () => hasProcess("zoom") },+ { processKey: "teams", appName: "Microsoft Teams", check: () => hasProcess("teams") },+ ],+};++function hasProcess(name) {+ try {+ if (process.platform === "win32") {+ const out = execSync(`tasklist | findstr /I "${name}"`, EXEC_OPTS);+ return out.trim().length > 0;+ }+ execSync(`pgrep -f "${name}"`, EXEC_OPTS);+ return true;+ } catch {+ return false;+ }+}++function hasProcessExact(name) {+ try {+ execSync(`pgrep -x "${name}"`, EXEC_OPTS);+ return true;+ } catch {+ return false;+ }+}++function hasActiveAudio(appName) {+ if (process.platform !== "darwin") return true;+ try {+ const out = execSync(`lsof -c "${appName}" 2>/dev/null | grep -i coreaudio`, EXEC_OPTS);+ return out.trim().length > 0;+ } catch {+ return false;+ }+}++class MeetingProcessDetector extends EventEmitter {+ constructor() {+ super();+ this.pollInterval = null;+ this.detectedProcesses = new Map();+ this.dismissedProcesses = new Set();+ }++ start() {+ if (this.pollInterval) return;+ debugLogger.info("Starting meeting process detector", {}, "meeting");+ this._poll();+ this.pollInterval = setInterval(() => this._poll(), POLL_INTERVAL_MS);+ }++ stop() {+ if (this.pollInterval) {+ clearInterval(this.pollInterval);+ this.pollInterval = null;+ }+ this.detectedProcesses.clear();+ debugLogger.info("Stopped meeting process detector", {}, "meeting");+ }++ dismiss(processKey) {+ this.dismissedProcesses.add(processKey);+ }++ getDetectedProcesses() {+ return Array.from(this.detectedProcesses.entries()).map(([processKey, { detectedAt }]) => ({+ processKey,+ appName: this._getAppName(processKey),+ detectedAt,+ }));+ }++ _getAppName(processKey) {+ const apps = MEETING_APPS[process.platform] || [];+ const entry = apps.find((a) => a.processKey === processKey);+ return entry ? entry.appName : processKey;+ }++ _poll() {+ try {+ const apps = MEETING_APPS[process.platform] || [];++ for (const { processKey, appName, check } of apps) {+ let isRunning = false;+ try {+ isRunning = check();+ } catch {+ isRunning = false;+ }++ if (isRunning) {+ if (!this.detectedProcesses.has(processKey) && !this.dismissedProcesses.has(processKey)) {+ const detectedAt = Date.now();+ this.detectedProcesses.set(processKey, { detectedAt });+ debugLogger.info("Meeting process detected", { processKey, appName }, "meeting");+ this.emit("meeting-process-detected", { processKey, appName, detectedAt });+ }+ } else if (this.detectedProcesses.has(processKey)) {+ this.detectedProcesses.delete(processKey);+ debugLogger.info("Meeting process ended", { processKey, appName }, "meeting");+ this.emit("meeting-process-ended", { processKey, appName });+ }+ }+ } catch (err) {+ debugLogger.warn("Poll error", { error: err.message }, "meeting");+ }+ }+}++module.exports = MeetingProcessDetector;diff --git a/src/hooks/useMeetingRecording.ts b/src/hooks/useMeetingRecording.tsindex 8b2f8efdc..b412c37c4 100644--- a/src/hooks/useMeetingRecording.ts+++ b/src/hooks/useMeetingRecording.ts@@ -223,6 +223,15 @@ export function useMeetingRecording(): UseMeetingRecordingReturn {});if (startRecordingCleanup) cleanups.push(startRecordingCleanup);+ const detectedStartCleanup = window.electronAPI?.onMeetingDetectedStartRecording?.(+ (data: any) => {+ if (data?.event && !activeMeetingRef.current) {+ startRecording(data.event);+ }+ }+ );+ if (detectedStartCleanup) cleanups.push(detectedStartCleanup);+return () => {cleanups.forEach((fn) => fn());cleanup();diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 02f055c34..2363943c2 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -515,7 +515,15 @@"noUpcoming": "No upcoming events","meetingStarting": "Meeting starting now","today": "Today",- "tomorrow": "Tomorrow"+ "tomorrow": "Tomorrow",+ "detection": {+ "title": "Meeting Detection",+ "description": "Automatically detect unscheduled meetings",+ "processDetection": "App Detection",+ "processDescription": "Detect meetings in Zoom, Teams, and FaceTime",+ "audioDetection": "Audio Detection",+ "audioDescription": "Prompt when sustained conversation is detected"+ }},"cleanupPrompt": "Cleanup","developerSection": {diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.tsindex 34fff77a4..4c19de687 100644--- a/src/stores/settingsStore.ts+++ b/src/stores/settingsStore.ts@@ -56,6 +56,8 @@ const BOOLEAN_SETTINGS = new Set(["audioCuesEnabled","floatingIconAutoHide","gcalConnected",+ "meetingProcessDetection",+ "meetingAudioDetection","isSignedIn",]);@@ -87,6 +89,8 @@ export interface SettingsStatefloatingIconAutoHide: boolean;gcalConnected: boolean;gcalEmail: string;+ meetingProcessDetection: boolean;+ meetingAudioDetection: boolean;setUseLocalWhisper: (value: boolean) => void;setWhisperModel: (value: string) => void;@@ -130,6 +134,8 @@ export interface SettingsStatesetFloatingIconAutoHide: (enabled: boolean) => void;setGcalConnected: (value: boolean) => void;setGcalEmail: (value: string) => void;+ setMeetingProcessDetection: (value: boolean) => void;+ setMeetingAudioDetection: (value: boolean) => void;setIsSignedIn: (value: boolean) => void;updateTranscriptionSettings: (settings: Partial<TranscriptionSettings>) => void;@@ -243,6 +249,8 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({floatingIconAutoHide: readBoolean("floatingIconAutoHide", false),gcalConnected: readBoolean("gcalConnected", false),gcalEmail: readString("gcalEmail", ""),+ meetingProcessDetection: readBoolean("meetingProcessDetection", true),+ meetingAudioDetection: readBoolean("meetingAudioDetection", true),isSignedIn: readBoolean("isSignedIn", false),setUseLocalWhisper: createBooleanSetter("useLocalWhisper"),@@ -378,6 +386,8 @@ export const useSettingsStore = create<SettingsState>()((set, get) => ({setGcalConnected: createBooleanSetter("gcalConnected"),setGcalEmail: createStringSetter("gcalEmail"),+ setMeetingProcessDetection: createBooleanSetter("meetingProcessDetection"),+ setMeetingAudioDetection: createBooleanSetter("meetingAudioDetection"),setIsSignedIn: (value: boolean) => {if (isBrowser) localStorage.setItem("isSignedIn", String(value));diff --git a/src/types/calendar.ts b/src/types/calendar.tsindex 7fa0760ee..8fe4c01a8 100644--- a/src/types/calendar.ts+++ b/src/types/calendar.ts@@ -25,3 +25,19 @@ export interface CalendarConnectionStatus {connected: boolean;email: string | null;}++export interface MeetingDetectionPreferences {+ processDetection: boolean;+ audioDetection: boolean;+}++export interface MeetingDetection {+ detectionId: string;+ source: "calendar" | "process" | "audio";+ data: {+ appName?: string;+ durationMs?: number;+ detectedAt: number;+ };+ imminentEvent?: CalendarEvent | null;+}diff --git a/src/types/electron.ts b/src/types/electron.tsindex e633518ad..fd1a44a97 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -899,6 +899,17 @@ declare global {onGcalStartRecording?: (callback: (data: any) => void) => () => void;onGcalConnectionChanged?: (callback: (data: any) => void) => () => void;onGcalEventsSynced?: (callback: (data: any) => void) => () => void;++ meetingDetectionGetPreferences?: () => Promise<{ success: boolean; preferences?: any }>;+ meetingDetectionSetPreferences?: (+ prefs: Record<string, boolean>+ ) => Promise<{ success: boolean }>;+ meetingDetectionRespond?: (+ detectionId: string,+ action: string+ ) => Promise<{ success: boolean }>;+ onMeetingDetected?: (callback: (data: any) => void) => () => void;+ onMeetingDetectedStartRecording?: (callback: (data: any) => void) => () => void;};api?: {