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): scope 1-on-1 attendee resolution to the note being recorded
Gabriel Steinbe2c6e8d1e78
diff --git a/src/components/notes/PersonalNotesView.tsx b/src/components/notes/PersonalNotesView.tsxindex a35370527..3aa1bbf9b 100644--- a/src/components/notes/PersonalNotesView.tsx+++ b/src/components/notes/PersonalNotesView.tsx@@ -172,7 +172,7 @@ export default function PersonalNotesView({recordingNoteIdRef.current = activeNoteRef.current;const note = notes.find((n) => n.id === activeNoteRef.current);const seedSegments = note?.transcript ? parseTranscriptSegments(note.transcript) : [];- await startTranscription({ seedSegments });+ await startTranscription({ seedSegments, noteId: activeNoteRef.current });}, [notes, startTranscription]);const stopRecording = useCallback(async () => {@@ -478,7 +478,7 @@ export default function PersonalNotesView({recordingNoteIdRef.current = meetingRecordingRequest.noteId;const note = notes.find((n) => n.id === meetingRecordingRequest.noteId);const seedSegments = note?.transcript ? parseTranscriptSegments(note.transcript) : [];- startTranscription({ seedSegments });+ startTranscription({ seedSegments, noteId: meetingRecordingRequest.noteId });onMeetingRecordingRequestHandled?.();}, [meetingRecordingRequest,diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex 872107245..802ff829e 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -205,6 +205,27 @@ class IPCHandlers {return map;}+ _resolveOneOnOneOtherParticipant(participantsJson) {+ if (!participantsJson) return null;+ let participants;+ try {+ participants = JSON.parse(participantsJson);+ } catch (_) {+ return null;+ }+ if (!Array.isArray(participants) || participants.length === 0) return null;+ const googleEmails = new Set(+ this.databaseManager.getGoogleAccounts().map((a) => a.email.toLowerCase())+ );+ const isSelf = (p) => p.self === true || googleEmails.has((p.email || "").toLowerCase());+ const others = participants.filter((p) => !isSelf(p));+ if (others.length !== 1) return null;+ const displayName = others[0].displayName || others[0].email;+ if (!displayName) return null;+ const email = (others[0].email || "").toLowerCase().trim() || null;+ return { displayName, email };+ }+_rebuildMirror(basePath) {const markdownMirror = require("./markdownMirror");if (basePath) markdownMirror.init(basePath);@@ -3683,33 +3704,14 @@ class IPCHandlers {const shouldSuppressMicTranscriptSegment = (startedAt, endedAt = Date.now()) =>meetingEchoLeakDetector.shouldSuppressMicSegment(startedAt, endedAt);- const resolveOneOnOneAttendee = () => {+ const resolveOneOnOneAttendeeForNote = (noteId) => {+ if (!noteId) return null;try {- const activeEvents = this.databaseManager.getActiveEvents();- if (!activeEvents.length) return null;-- const googleEmails = new Set(- this.databaseManager.getGoogleAccounts().map((a) => a.email.toLowerCase())- );- const isSelf = (p) => p.self === true || googleEmails.has((p.email || "").toLowerCase());-- for (const event of activeEvents) {- let attendees;- try {- attendees = JSON.parse(event.attendees || "[]");- } catch (_) {- continue;- }- if (!Array.isArray(attendees)) continue;-- const others = attendees.filter((a) => !isSelf(a));- if (others.length === 1) {- const displayName = others[0].displayName || others[0].email;- if (displayName) return { displayName, email: others[0].email || null };- }- }- } catch (_) {}- return null;+ const note = this.databaseManager.getNote(noteId);+ return this._resolveOneOnOneOtherParticipant(note?.participants);+ } catch (_) {+ return null;+ }};const bindOneOnOneAttendeeToSpeaker = (speakerId) => {@@ -4365,7 +4367,7 @@ class IPCHandlers {const systemAudioPlan = await getMeetingSystemAudioPlan();let { mode: systemAudioMode, strategy: systemAudioStrategy } = systemAudioPlan;meetingEchoLeakDetector.reset();- meetingOneOnOneAttendee = resolveOneOnOneAttendee();+ meetingOneOnOneAttendee = resolveOneOnOneAttendeeForNote(options.noteId);meetingOneOnOneProfileBound = false;if (systemAudioMode === "unsupported" && this._meetingSystemStreaming?.isConnected) {@@ -6701,27 +6703,9 @@ class IPCHandlers {setImmediate(async () => {try {const note = this.databaseManager.getNote(noteId);- if (!note?.participants) return;-- let participants;- try {- participants = JSON.parse(note.participants);- } catch (_) {- return;- }- if (!Array.isArray(participants) || participants.length === 0) return;-- const googleEmails = new Set(- this.databaseManager.getGoogleAccounts().map((a) => a.email.toLowerCase())- );- const isSelf = (p) => p.self === true || googleEmails.has((p.email || "").toLowerCase());- const otherParticipants = participants.filter((p) => !isSelf(p));- if (otherParticipants.length !== 1) return;-- const other = otherParticipants[0];- const displayName = other.displayName || other.email;- if (!displayName) return;- const email = (other.email || "").toLowerCase().trim() || null;+ const other = this._resolveOneOnOneOtherParticipant(note?.participants);+ if (!other) return;+ const { displayName, email } = other;const embeddings = this.databaseManager.getNoteSpeakerEmbeddings(noteId);if (!embeddings.length) return;diff --git a/src/hooks/useMeetingTranscription.ts b/src/hooks/useMeetingTranscription.tsindex b73839840..dbffb9af2 100644--- a/src/hooks/useMeetingTranscription.ts+++ b/src/hooks/useMeetingTranscription.ts@@ -57,7 +57,10 @@ interface UseMeetingTranscriptionReturn {error: string | null;diarizationSessionId: string | null;prepareTranscription: () => Promise<void>;- startTranscription: (_options?: { seedSegments?: TranscriptSegment[] }) => Promise<void>;+ startTranscription: (_options?: {+ seedSegments?: TranscriptSegment[];+ noteId?: number | null;+ }) => Promise<void>;stopTranscription: () => Promise<void>;lockSpeaker: (speakerId: string, displayName: string) => void;}@@ -639,7 +642,7 @@ export function useMeetingTranscription(): UseMeetingTranscriptionReturn {}, []);const startTranscription = useCallback(- async (_options?: { seedSegments?: TranscriptSegment[] }) => {+ async (_options?: { seedSegments?: TranscriptSegment[]; noteId?: number | null }) => {if (isRecordingRef.current || isStartingRef.current) return;isStartingRef.current = true;const systemAudioAccessPromise =@@ -686,7 +689,10 @@ export function useMeetingTranscription(): UseMeetingTranscriptionReturn {prepareMeetingSystemAudioCapture(initialSystemAudioAccess);const [startResult, micResult, initialSystemCaptureResult] = await Promise.all([- window.electronAPI?.meetingTranscriptionStart?.(getMeetingTranscriptionOptions()),+ window.electronAPI?.meetingTranscriptionStart?.({+ ...getMeetingTranscriptionOptions(),+ noteId: _options?.noteId ?? null,+ }),getMeetingMicConstraints().then(async (constraints) => {try {return await navigator.mediaDevices.getUserMedia(constraints);diff --git a/src/types/electron.ts b/src/types/electron.tsindex 84f167151..5d517d3ca 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -1371,6 +1371,7 @@ declare global {provider?: string;model?: string;language?: string;+ noteId?: number | null;}) => Promise<{success: boolean;error?: string;