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(speaker): link voice profiles to contact emails with attendee-aware picker
Gabriel Stein78a2b82d0f17
diff --git a/preload.js b/preload.jsindex c324636c3..70ccb8a01 100644--- a/preload.js+++ b/preload.js@@ -270,6 +270,8 @@ contextBridge.exposeInMainWorld("electronAPI", {removeSpeakerMapping: (noteId, speakerId) =>ipcRenderer.invoke("remove-speaker-mapping", noteId, speakerId),getSpeakerProfiles: () => ipcRenderer.invoke("get-speaker-profiles"),+ attachSpeakerEmail: (profileId, email) =>+ ipcRenderer.invoke("attach-speaker-email", profileId, email),saveNoteSpeakerEmbeddings: (noteId, embeddings) =>ipcRenderer.invoke("save-note-speaker-embeddings", noteId, embeddings),diff --git a/src/components/notes/MeetingTranscriptChat.tsx b/src/components/notes/MeetingTranscriptChat.tsxindex 50a1909e6..6874e2219 100644--- a/src/components/notes/MeetingTranscriptChat.tsx+++ b/src/components/notes/MeetingTranscriptChat.tsx@@ -1,6 +1,6 @@-import { useState, useEffect, useLayoutEffect, useRef } from "react";+import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Check, Sparkles, Users, X } from "lucide-react";+import { Check, Loader2, Sparkles, Users, X } from "lucide-react";import { Popover, PopoverTrigger, PopoverContent } from "../ui/popover";import { cn } from "../lib/utils";import type { TranscriptSegment } from "../../hooks/useMeetingTranscription";@@ -50,9 +50,15 @@ const STICKY_SCROLL_THRESHOLD_PX = 80;const getSpeakerKey = (segment: TranscriptSegment) => segment.speaker || segment.source;-const getSpeakerColorIndex = (speaker: string): number => {- const match = speaker.match(/speaker_(\d+)/);- return match ? Number(match[1]) % SPEAKER_COLORS.length : 0;+const getEffectiveSpeakerKey = (+ segment: TranscriptSegment,+ speakerMappings?: Record<string, string>+): string => {+ const mapped = segment.speaker ? speakerMappings?.[segment.speaker] : undefined;+ if (mapped) return `name:${mapped.toLowerCase()}`;+ if (segment.speakerName) return `name:${segment.speakerName.toLowerCase()}`;+ if (segment.speaker) return `id:${segment.speaker}`;+ return `src:${segment.source}`;};const getSpeakerNumber = (speakerId: string) => {@@ -124,24 +130,122 @@ function PartialBubble({);}+const isLikelyEmail = (value: string) => /.+@.+\..+/.test(value.trim());++const nameFromEmail = (email: string) => email.split("@")[0] || email;++interface SpeakerProfileLite {+ id?: number;+ display_name: string;+ email: string | null;+}+interface SpeakerPickerProps {- speakerProfiles?: Array<{ id?: number; display_name: string; email: string | null }>;+ speakerProfiles?: SpeakerProfileLite[];participants?: Array<{ email: string; displayName: string | null }>;onSelectName: (name: string, email?: string | null, profileId?: number) => void;t: (key: string, opts?: Record<string, unknown>) => string;}-function SpeakerPicker({- speakerProfiles,- participants,- onSelectName,+function AddContactButton({+ profile,+ onAttachEmail,t,-}: SpeakerPickerProps) {+}: {+ profile: { id: number; display_name: string };+ onAttachEmail: (profileId: number, email: string | null) => void;+ t: (key: string, opts?: Record<string, unknown>) => string;+}) {+ const [open, setOpen] = useState(false);+ const [draft, setDraft] = useState("");++ const canSave = isLikelyEmail(draft);++ const submit = () => {+ if (!canSave) return;+ onAttachEmail(profile.id, draft.trim().toLowerCase());+ setOpen(false);+ };++ return (+ <Popover+ open={open}+ onOpenChange={(next) => {+ setOpen(next);+ if (!next) setDraft("");+ }}+ >+ <PopoverTrigger asChild>+ <button+ className={cn(+ "inline-flex items-center mb-0.5 px-1.5 py-0.5 rounded-md text-[11px] outline-none cursor-pointer",+ "border border-dashed border-border/60 dark:border-white/15",+ "text-foreground/50 hover:text-foreground hover:border-border/90 dark:hover:border-white/30",+ "transition-colors duration-150 focus-visible:ring-1 focus-visible:ring-ring"+ )}+ >+ {t("notes.speaker.addContact")}+ </button>+ </PopoverTrigger>+ <PopoverContent className="w-64 p-3">+ <div className="text-xs font-medium text-foreground truncate mb-2">+ {profile.display_name}+ </div>+ <input+ value={draft}+ onChange={(e) => setDraft(e.target.value)}+ onKeyDown={(e) => {+ if (e.key === "Enter") {+ e.preventDefault();+ submit();+ } else if (e.key === "Escape") {+ setOpen(false);+ }+ }}+ placeholder={t("notes.speaker.emailPlaceholder")}+ className={cn(+ "w-full px-2 py-1.5 rounded-md bg-transparent text-xs text-foreground",+ "placeholder:text-foreground/25 outline-none",+ "border border-border/50 focus:border-border/90 transition-colors"+ )}+ autoFocus+ type="email"+ />+ <div className="flex justify-end gap-1 mt-2">+ <button+ onClick={() => setOpen(false)}+ className="px-2 py-1 rounded text-[11px] text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-colors cursor-pointer"+ >+ {t("notes.speaker.cancel")}+ </button>+ <button+ onClick={submit}+ disabled={!canSave}+ className={cn(+ "px-2 py-1 rounded text-[11px] font-medium transition-colors cursor-pointer",+ "bg-primary text-primary-foreground hover:bg-primary/90",+ "disabled:bg-primary/20 disabled:text-primary-foreground/40 disabled:pointer-events-none"+ )}+ >+ {t("notes.speaker.save")}+ </button>+ </div>+ </PopoverContent>+ </Popover>+ );+}++function SpeakerPicker({ speakerProfiles, participants, onSelectName, t }: SpeakerPickerProps) {const [search, setSearch] = useState("");const lower = search.toLowerCase();+ const trimmed = search.trim();+ const trimmedLower = trimmed.toLowerCase();const filteredParticipants = (participants || []).filter(- (p) => !search || (p.displayName || p.email).toLowerCase().includes(lower)+ (p) =>+ !search ||+ (p.displayName || "").toLowerCase().includes(lower) ||+ p.email.toLowerCase().includes(lower));const filteredProfiles = (speakerProfiles || []).filter((p) =>@@ -150,15 +254,39 @@ function SpeakerPicker({(p.email && p.email.toLowerCase().includes(lower)));+ const hasExactMatch =+ filteredParticipants.some(+ (p) =>+ (p.displayName || "").toLowerCase() === trimmedLower ||+ p.email.toLowerCase() === trimmedLower+ ) ||+ filteredProfiles.some(+ (p) =>+ p.display_name.toLowerCase() === trimmedLower ||+ (p.email && p.email.toLowerCase() === trimmedLower)+ );+ const canCreate = !!trimmed && !hasExactMatch;+ const inputIsEmail = isLikelyEmail(trimmed);++ const submitCreate = () => {+ if (!canCreate) return;+ if (inputIsEmail) {+ const email = trimmed.toLowerCase();+ onSelectName(nameFromEmail(email), email);+ } else {+ onSelectName(trimmed, null);+ }+ setSearch("");+ };+const handleKeyDown = (e: React.KeyboardEvent) => {- if (e.key === "Enter" && search.trim()) {+ if (e.key === "Enter" && canCreate) {e.preventDefault();- onSelectName(search.trim());- setSearch("");+ submitCreate();}};- const isEmpty = !filteredParticipants.length && !filteredProfiles.length;+ const isEmpty = !filteredParticipants.length && !filteredProfiles.length && !canCreate;return (<>@@ -167,12 +295,12 @@ function SpeakerPicker({value={search}onChange={(e) => setSearch(e.target.value)}onKeyDown={handleKeyDown}- placeholder={t("notes.speaker.typeNamePlaceholder")}+ placeholder={t("notes.speaker.nameOrEmailPlaceholder")}className="w-full px-2 py-1.5 rounded-md bg-transparent text-xs text-foreground placeholder:text-foreground/20 outline-none border-none appearance-none"autoFocus/></div>- <div className="max-h-40 overflow-y-auto">+ <div className="max-h-52 overflow-y-auto">{filteredParticipants.length > 0 && (<div className="p-1 border-b border-border/30"><div className="px-2 py-1 text-[11px] font-medium text-muted-foreground">@@ -184,13 +312,16 @@ function SpeakerPicker({onClick={() => onSelectName(p.displayName || p.email.split("@")[0], p.email)}className="flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-foreground/70 hover:bg-foreground/5 transition-colors cursor-pointer">- <span className="truncate">{p.displayName || p.email}</span>+ <span className="truncate flex-1 text-left">{p.displayName || p.email}</span>+ {p.displayName && (+ <span className="text-foreground/30 truncate text-[11px]">{p.email}</span>+ )}</button>))}</div>)}{filteredProfiles.length > 0 && (- <div className="p-1">+ <div className="p-1 border-b border-border/30"><div className="px-2 py-1 text-[11px] font-medium text-muted-foreground">{t("notes.speaker.knownSpeakers")}</div>@@ -200,7 +331,7 @@ function SpeakerPicker({onClick={() => onSelectName(p.display_name, p.email, p.id)}className="flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-foreground/70 hover:bg-foreground/5 transition-colors cursor-pointer">- <span className="truncate">{p.display_name}</span>+ <span className="truncate flex-1 text-left">{p.display_name}</span>{p.email && (<span className="text-foreground/30 truncate text-[11px]">{p.email}</span>)}@@ -208,9 +339,31 @@ function SpeakerPicker({))}</div>)}+ {canCreate && (+ <div className="p-1">+ <button+ onClick={submitCreate}+ className="flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-foreground/70 hover:bg-foreground/5 transition-colors cursor-pointer"+ >+ <span className="text-foreground/50 shrink-0">+ {t("notes.speaker.createNewPrefix")}+ </span>+ {inputIsEmail ? (+ <>+ <span className="text-foreground truncate">{nameFromEmail(trimmed)}</span>+ <span className="text-foreground/30 truncate text-[11px]">+ {trimmed.toLowerCase()}+ </span>+ </>+ ) : (+ <span className="text-foreground truncate">{trimmed}</span>+ )}+ </button>+ </div>+ )}{isEmpty && (<div className="px-3 py-4 text-center text-[11px] text-foreground/30">- {t("notes.speaker.typeNamePlaceholder")}+ {t("notes.speaker.nameOrEmailPlaceholder")}</div>)}</div>@@ -225,7 +378,7 @@ function SpeakerLabel({speakerProfiles,participants,colorIdx,- isYou,+ isOriginallyYou,onMap,onConfirm,onDismiss,@@ -234,10 +387,10 @@ function SpeakerLabel({speakerId: string;segment: TranscriptSegment;mappedName?: string;- speakerProfiles?: Array<{ id?: number; display_name: string; email: string | null }>;+ speakerProfiles?: SpeakerProfileLite[];participants?: Array<{ email: string; displayName: string | null }>;colorIdx: number;- isYou: boolean;+ isOriginallyYou: boolean;onMap?: (speakerId: string, name: string, email?: string | null, profileId?: number) => void;onConfirm?: (speakerId: string, name: string, profileId: number) => void;onDismiss?: (speakerId: string) => void;@@ -256,14 +409,6 @@ function SpeakerLabel({? "provisional": undefined);- if (isYou) {- return (- <span className="text-[11px] font-medium mb-0.5 px-1 text-primary/60">- {t("notes.speaker.you")}- </span>- );- }-const hasSuggestion = !!segment.suggestedName && !mappedName;if (hasSuggestion) {@@ -293,7 +438,9 @@ function SpeakerLabel({const displayLabel =mappedName ||segment.speakerName ||- t("notes.speaker.label", { n: getSpeakerNumber(speakerId) });+ (isOriginallyYou+ ? t("notes.speaker.you")+ : t("notes.speaker.label", { n: getSpeakerNumber(speakerId) }));const isUnmapped = !mappedName && !segment.speakerName;return (@@ -301,7 +448,7 @@ function SpeakerLabel({<PopoverTrigger asChild><buttonclassName={cn(- "inline-flex items-center gap-1 text-[11px] font-medium mb-0.5 px-1.5 py-0.5 rounded-md outline-none cursor-pointer",+ "inline-flex items-center text-[11px] font-medium mb-0.5 px-1.5 py-0.5 rounded-md outline-none cursor-pointer","border border-border/60 dark:border-white/20","hover:bg-foreground/5 hover:border-border/90 dark:hover:border-white/30","transition-colors duration-150 focus-visible:ring-1 focus-visible:ring-ring",@@ -367,7 +514,7 @@ export function SelectionBar({}: {count: number;onClear: () => void;- speakerProfiles?: Array<{ id?: number; display_name: string; email: string | null }>;+ speakerProfiles?: SpeakerProfileLite[];participants?: Array<{ email: string; displayName: string | null }>;onAssignName: (name: string, email?: string | null, profileId?: number) => void;t: (key: string, opts?: Record<string, unknown>) => string;@@ -417,9 +564,11 @@ interface MeetingTranscriptChatProps {systemPartialSpeakerId?: string | null;systemPartialSpeakerName?: string | null;speakerMappings?: Record<string, string>;- speakerProfiles?: Array<{ id?: number; display_name: string; email: string | null }>;+ speakerProfiles?: SpeakerProfileLite[];participants?: Array<{ email: string; displayName: string | null }>;selectedSegmentIds?: Set<string>;+ isRecording?: boolean;+ isDiarizing?: boolean;onMapSpeaker?: (speakerId: string,displayName: string,@@ -428,6 +577,7 @@ interface MeetingTranscriptChatProps {) => void;onConfirmSuggestion?: (speakerId: string, suggestedName: string, profileId: number) => void;onDismissSuggestion?: (speakerId: string) => void;+ onAttachSpeakerEmail?: (profileId: number, email: string | null) => void;onToggleSelect?: (segmentId: string) => void;}@@ -441,9 +591,12 @@ export function MeetingTranscriptChat({speakerProfiles,participants,selectedSegmentIds,+ isRecording,+ isDiarizing,onMapSpeaker,onConfirmSuggestion,onDismissSuggestion,+ onAttachSpeakerEmail,onToggleSelect,}: MeetingTranscriptChatProps) {const { t } = useTranslation();@@ -481,6 +634,21 @@ export function MeetingTranscriptChat({: "provisional": undefined;+ const colorByKey = useMemo(() => {+ const map = new Map<string, number>();+ let nextIdx = 0;+ for (const segment of segments) {+ if (segment.source === "mic" && !segment.speaker) continue;+ if (segment.speaker === "you") continue;+ const key = getEffectiveSpeakerKey(segment, speakerMappings);+ if (!map.has(key)) {+ map.set(key, nextIdx % SPEAKER_COLORS.length);+ nextIdx += 1;+ }+ }+ return map;+ }, [segments, speakerMappings]);+if (!hasContent) {return (<div className="h-full flex items-center justify-center px-5">@@ -491,26 +659,61 @@ export function MeetingTranscriptChat({);}+ const isSelfSide = (segment: TranscriptSegment): boolean => {+ if (segment.speaker === "you") return true;+ const mapped = segment.speaker ? speakerMappings?.[segment.speaker] : undefined;+ if (mapped) return mapped.trim().toLowerCase() === t("notes.speaker.you").toLowerCase();+ if (segment.speakerName) return false;+ return segment.source === "mic";+ };+return (<divref={scrollRef}className="h-full overflow-y-auto px-4 pt-3 pb-24 flex flex-col gap-1.5 agent-chat-scroll">- {segments.map((segment, i) => {- const isMic = segment.source === "mic";- const prevSegment = i > 0 ? segments[i - 1] : null;- const sameSpeaker = prevSegment- ? getSpeakerKey(prevSegment) === getSpeakerKey(segment)- : false;-- const hasSpeaker = !!segment.speaker;- const isYou = segment.speaker === "you";- const isSystemSpeaker = hasSpeaker && !isYou;- const colorIdx = isSystemSpeaker ? getSpeakerColorIndex(segment.speaker!) : 0;- const isSelected = selectedSegmentIds?.has(segment.id) ?? false;- const selectable = !!onToggleSelect;-- const labelElement = hasSpeaker && (+ {(isRecording || isDiarizing) && (+ <div className="flex items-center justify-center gap-1.5 pb-2">+ {isDiarizing ? (+ <Loader2 size={10} className="animate-spin text-foreground/40" />+ ) : (+ <Sparkles size={10} className="text-foreground/40" />+ )}+ <span className="text-[11px] text-foreground/50">+ {isDiarizing+ ? t("notes.speaker.identifyingSpeakers")+ : t("notes.speaker.liveAccuracyHint")}+ </span>+ </div>+ )}+ {segments.map((segment, i) => {+ const selfSide = isSelfSide(segment);+ const prevSegment = i > 0 ? segments[i - 1] : null;+ const sameSpeaker = prevSegment+ ? getSpeakerKey(prevSegment) === getSpeakerKey(segment)+ : false;++ const hasSpeaker = !!segment.speaker;+ const isOriginallyYou = segment.speaker === "you";+ const isSystemSpeaker = hasSpeaker && !selfSide;+ const effectiveKey = getEffectiveSpeakerKey(segment, speakerMappings);+ const colorIdx = isSystemSpeaker ? (colorByKey.get(effectiveKey) ?? 0) : 0;+ const isSelected = selectedSegmentIds?.has(segment.id) ?? false;+ const selectable = !!onToggleSelect;++ const activeName = speakerMappings?.[segment.speaker!] || segment.speakerName;+ const matchedProfile =+ activeName && speakerProfiles+ ? speakerProfiles.find((p) => p.id != null && p.display_name === activeName)+ : undefined;+ const canAddContact =+ !!matchedProfile &&+ matchedProfile.id != null &&+ !matchedProfile.email &&+ !!onAttachSpeakerEmail;++ const labelElement = hasSpeaker && (+ <div className="flex items-center gap-1"><SpeakerLabelspeakerId={segment.speaker!}segment={segment}@@ -518,88 +721,96 @@ export function MeetingTranscriptChat({speakerProfiles={speakerProfiles}participants={participants}colorIdx={colorIdx}- isYou={isYou}+ isOriginallyYou={isOriginallyYou}onMap={onMapSpeaker}onConfirm={onConfirmSuggestion}onDismiss={onDismissSuggestion}t={t}/>- );-- return (- <div- key={segment.id}- className={cn(- "group flex flex-col",- isMic ? "items-start" : "items-end",- !sameSpeaker && i > 0 && "mt-2",- selectable && (isMic ? "pl-6" : "pr-6")- )}- style={{ animation: "agent-message-in 200ms ease-out both" }}- >- {labelElement && !sameSpeaker && labelElement}- {labelElement && sameSpeaker && (- <div- className={cn(- "grid grid-rows-[0fr] opacity-0 pointer-events-none transition-[grid-template-rows,opacity] duration-150 ease-out",- "group-hover:grid-rows-[1fr] group-hover:opacity-100 group-hover:pointer-events-auto"- )}- >- <div className="overflow-hidden">{labelElement}</div>- </div>- )}- <div className="relative max-w-[80%]">- <div- className={cn(- "px-3 py-1.5 cursor-default",- "text-[13px] leading-relaxed",- isMic- ? cn(- "bg-primary/90 text-primary-foreground",- sameSpeaker ? "rounded-lg rounded-tl-sm" : "rounded-lg rounded-bl-sm"- )- : cn(- "bg-surface-2 border border-border/30 text-foreground",- sameSpeaker ? "rounded-lg rounded-tr-sm" : "rounded-lg rounded-br-sm",- isSystemSpeaker && cn("border-l-2", SPEAKER_BORDER_COLORS[colorIdx])- ),- isSelected && "ring-2 ring-primary/60"- )}- >- {segment.text}- </div>- {selectable && (- <SelectCheckbox- isSelected={isSelected}- onToggle={() => onToggleSelect?.(segment.id)}- className={cn("absolute top-1.5", isMic ? "-left-6" : "-right-6")}- />+ {canAddContact && matchedProfile && matchedProfile.id != null && (+ <AddContactButton+ profile={{ id: matchedProfile.id, display_name: matchedProfile.display_name }}+ onAttachEmail={onAttachSpeakerEmail!}+ t={t}+ />+ )}+ </div>+ );++ return (+ <div+ key={segment.id}+ className={cn(+ "group flex flex-col",+ selfSide ? "items-start" : "items-end",+ !sameSpeaker && i > 0 && "mt-2",+ selectable && (selfSide ? "pl-6" : "pr-6")+ )}+ style={{ animation: "agent-message-in 200ms ease-out both" }}+ >+ {labelElement && !sameSpeaker && labelElement}+ {labelElement && sameSpeaker && (+ <div+ className={cn(+ "grid grid-rows-[0fr] opacity-0 pointer-events-none transition-[grid-template-rows,opacity] duration-150 ease-out",+ "group-hover:grid-rows-[1fr] group-hover:opacity-100 group-hover:pointer-events-auto"+ )}+ >+ <div className="overflow-hidden">{labelElement}</div>+ </div>+ )}+ <div className="relative max-w-[80%]">+ <div+ className={cn(+ "px-3 py-1.5 cursor-default transition-colors",+ "text-[13px] leading-relaxed",+ selfSide+ ? cn(+ "bg-primary/90 text-primary-foreground",+ sameSpeaker ? "rounded-lg rounded-tl-sm" : "rounded-lg rounded-bl-sm"+ )+ : cn(+ "bg-surface-2 border border-border/30 text-foreground",+ sameSpeaker ? "rounded-lg rounded-tr-sm" : "rounded-lg rounded-br-sm",+ isSystemSpeaker && cn("border-l-2", SPEAKER_BORDER_COLORS[colorIdx])+ ),+ isSelected && "ring-2 ring-primary/60")}+ >+ {segment.text}</div>+ {selectable && (+ <SelectCheckbox+ isSelected={isSelected}+ onToggle={() => onToggleSelect?.(segment.id)}+ className={cn("absolute top-1.5", selfSide ? "-left-6" : "-right-6")}+ />+ )}</div>- );- })}-- {[- { text: micPartial, source: "mic" as const, speakerLabel: undefined },- {- text: systemPartial,- source: "system" as const,- speakerLabel: systemPartialSpeakerLabel,- },- ].map(- ({ text, source, speakerLabel }) =>- text && (- <PartialBubble- key={source}- text={text}- source={source}- speakerLabel={speakerLabel}- speakerState={source === "system" ? systemPartialSpeakerState : undefined}- t={t}- />- )- )}+ </div>+ );+ })}++ {[+ { text: micPartial, source: "mic" as const, speakerLabel: undefined },+ {+ text: systemPartial,+ source: "system" as const,+ speakerLabel: systemPartialSpeakerLabel,+ },+ ].map(+ ({ text, source, speakerLabel }) =>+ text && (+ <PartialBubble+ key={source}+ text={text}+ source={source}+ speakerLabel={speakerLabel}+ speakerState={source === "system" ? systemPartialSpeakerState : undefined}+ t={t}+ />+ )+ )}</div>);}diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsxindex 3311167ba..058745fa8 100644--- a/src/components/notes/NoteEditor.tsx+++ b/src/components/notes/NoteEditor.tsx@@ -431,6 +431,16 @@ export default function NoteEditor({[handleMapSpeaker]);+ const handleAttachSpeakerEmail = useCallback(+ async (profileId: number, email: string | null) => {+ const result = await window.electronAPI?.attachSpeakerEmail?.(profileId, email);+ if (result?.success) {+ refreshSpeakerProfiles();+ }+ },+ [refreshSpeakerProfiles]+ );+const handleDismissSuggestion = useCallback(async (speakerId: string) => {const currentSegments = displaySegments.map((s) =>@@ -796,35 +806,28 @@ export default function NoteEditor({<div className="flex-1 relative min-h-0"><div className="h-full overflow-y-auto">{viewMode === "transcript" && (hasChatSegments || isMeetingRecording) ? (- <>- <MeetingTranscriptChat- segments={displaySegments}- micPartial={isMeetingRecording ? meetingMicPartial : undefined}- systemPartial={isMeetingRecording ? meetingSystemPartial : undefined}- systemPartialSpeakerId={- isMeetingRecording ? meetingSystemPartialSpeakerId : undefined- }- systemPartialSpeakerName={- isMeetingRecording ? meetingSystemPartialSpeakerName : undefined- }- speakerMappings={speakerMappings}- speakerProfiles={knownSpeakers}- participants={parsedParticipants}- onMapSpeaker={handleMapSpeaker}- onConfirmSuggestion={handleConfirmSuggestion}- onDismissSuggestion={handleDismissSuggestion}- selectedSegmentIds={!isMeetingRecording ? selectedSegmentIds : undefined}- onToggleSelect={!isMeetingRecording ? handleToggleSelect : undefined}- />- {isDiarizing && (- <div className="flex items-center justify-center gap-1.5 py-2">- <Loader2 size={10} className="animate-spin text-foreground/30" />- <span className="text-[11px] text-foreground/30">- {t("notes.speaker.identifyingSpeakers")}- </span>- </div>- )}- </>+ <MeetingTranscriptChat+ segments={displaySegments}+ micPartial={isMeetingRecording ? meetingMicPartial : undefined}+ systemPartial={isMeetingRecording ? meetingSystemPartial : undefined}+ systemPartialSpeakerId={+ isMeetingRecording ? meetingSystemPartialSpeakerId : undefined+ }+ systemPartialSpeakerName={+ isMeetingRecording ? meetingSystemPartialSpeakerName : undefined+ }+ speakerMappings={speakerMappings}+ speakerProfiles={knownSpeakers}+ participants={parsedParticipants}+ isRecording={isMeetingRecording}+ isDiarizing={isDiarizing}+ onMapSpeaker={handleMapSpeaker}+ onConfirmSuggestion={handleConfirmSuggestion}+ onDismissSuggestion={handleDismissSuggestion}+ onAttachSpeakerEmail={handleAttachSpeakerEmail}+ selectedSegmentIds={!isMeetingRecording ? selectedSegmentIds : undefined}+ onToggleSelect={!isMeetingRecording ? handleToggleSelect : undefined}+ />) : viewMode === "transcript" && hasMeetingTranscript ? (<RichTextEditor value={effectiveTranscript} disabled />) : viewMode === "enhanced" && enhancement ? (diff --git a/src/helpers/database.js b/src/helpers/database.jsindex 76fbe8683..5f4e6f581 100644--- a/src/helpers/database.js+++ b/src/helpers/database.js@@ -1526,12 +1526,32 @@ class DatabaseManager {}}+ _normalizeEmail(email) {+ const trimmed = (email || "").trim().toLowerCase();+ return trimmed || null;+ }++ _findProfileByEmail(email) {+ const normalized = this._normalizeEmail(email);+ if (!normalized) return null;+ return this.db.prepare("SELECT * FROM speaker_profiles WHERE lower(email) = ?").get(normalized);+ }+upsertSpeakerProfile(name, email, embeddingBuffer, profileId = null) {try {if (!this.db) throw new Error("Database not initialized");- const existing = profileId+ const normalizedEmail = this._normalizeEmail(email);+ let existing = profileId? this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(profileId)- : this.db.prepare("SELECT * FROM speaker_profiles WHERE display_name = ?").get(name);+ : null;+ if (!existing && normalizedEmail) {+ existing = this._findProfileByEmail(normalizedEmail);+ }+ if (!existing) {+ existing = this.db+ .prepare("SELECT * FROM speaker_profiles WHERE display_name = ?")+ .get(name);+ }if (existing) {const stored = new Float32Array(existing.embedding.buffer,@@ -1548,18 +1568,28 @@ class DatabaseManager {updated[i] = 0.3 * incoming[i] + 0.7 * stored[i];}const updatedBuf = Buffer.from(updated.buffer);+ const finalEmail = normalizedEmail || existing.email || null;this.db.prepare("UPDATE speaker_profiles SET display_name = ?, email = ?, embedding = ?, sample_count = sample_count + 1, updated_at = CURRENT_TIMESTAMP WHERE id = ?")- .run(name, email || existing.email || null, updatedBuf, existing.id);- return this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(existing.id);+ .run(name, finalEmail, updatedBuf, existing.id);+ const resolved = this.db+ .prepare("SELECT * FROM speaker_profiles WHERE id = ?")+ .get(existing.id);+ if (normalizedEmail) {+ const collision = this.db+ .prepare("SELECT * FROM speaker_profiles WHERE lower(email) = ? AND id != ?")+ .get(normalizedEmail, existing.id);+ if (collision) {+ return this.mergeSpeakerProfiles(resolved, collision);+ }+ }+ return resolved;}const result = this.db- .prepare(- "INSERT INTO speaker_profiles (display_name, email, embedding) VALUES (?, ?, ?)"- )- .run(name, email || null, embeddingBuffer);+ .prepare("INSERT INTO speaker_profiles (display_name, email, embedding) VALUES (?, ?, ?)")+ .run(name, normalizedEmail, embeddingBuffer);return this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(result.lastInsertRowid);@@ -1569,6 +1599,86 @@ class DatabaseManager {}}+ attachEmailToProfile(profileId, email) {+ try {+ if (!this.db) throw new Error("Database not initialized");+ const normalizedEmail = this._normalizeEmail(email);+ const profile = this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(profileId);+ if (!profile) throw new Error(`Speaker profile ${profileId} not found`);++ if (!normalizedEmail) {+ this.db+ .prepare(+ "UPDATE speaker_profiles SET email = NULL, updated_at = CURRENT_TIMESTAMP WHERE id = ?"+ )+ .run(profileId);+ return this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(profileId);+ }++ const collision = this._findProfileByEmail(normalizedEmail);+ if (collision && collision.id !== profileId) {+ return this.mergeSpeakerProfiles(collision, profile);+ }++ this.db+ .prepare(+ "UPDATE speaker_profiles SET email = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?"+ )+ .run(normalizedEmail, profileId);+ return this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(profileId);+ } catch (error) {+ debugLogger.error(+ "Error attaching email to speaker profile",+ { error: error.message },+ "database"+ );+ throw error;+ }+ }++ mergeSpeakerProfiles(a, b) {+ const winner = (a.sample_count || 0) >= (b.sample_count || 0) ? a : b;+ const loser = winner === a ? b : a;++ const winnerEmb = new Float32Array(+ winner.embedding.buffer,+ winner.embedding.byteOffset,+ winner.embedding.byteLength / 4+ );+ const loserEmb = new Float32Array(+ loser.embedding.buffer,+ loser.embedding.byteOffset,+ loser.embedding.byteLength / 4+ );+ const wSamples = winner.sample_count || 1;+ const lSamples = loser.sample_count || 1;+ const total = wSamples + lSamples;+ const blended = new Float32Array(winnerEmb.length);+ for (let i = 0; i < winnerEmb.length; i++) {+ blended[i] = (winnerEmb[i] * wSamples + loserEmb[i] * lSamples) / total;+ }++ const finalEmail = winner.email || loser.email || null;+ const finalName = winner.display_name || loser.display_name;++ const tx = this.db.transaction(() => {+ this.db+ .prepare(+ "UPDATE speaker_profiles SET display_name = ?, email = ?, embedding = ?, sample_count = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?"+ )+ .run(finalName, finalEmail, Buffer.from(blended.buffer), total, winner.id);+ this.db+ .prepare(+ "UPDATE speaker_mappings SET profile_id = ?, display_name = ? WHERE profile_id = ?"+ )+ .run(winner.id, finalName, loser.id);+ this.db.prepare("DELETE FROM speaker_profiles WHERE id = ?").run(loser.id);+ });+ tx();++ return this.db.prepare("SELECT * FROM speaker_profiles WHERE id = ?").get(winner.id);+ }+getSpeakerProfiles(includeEmbedding = false) {try {if (!this.db) throw new Error("Database not initialized");@@ -1601,9 +1711,7 @@ class DatabaseManager {getSpeakerMappings(noteId) {try {if (!this.db) throw new Error("Database not initialized");- return this.db- .prepare("SELECT * FROM speaker_mappings WHERE note_id = ?")- .all(noteId);+ return this.db.prepare("SELECT * FROM speaker_mappings WHERE note_id = ?").all(noteId);} catch (error) {debugLogger.error("Error getting speaker mappings", { error: error.message }, "database");throw error;@@ -1636,9 +1744,7 @@ class DatabaseManager {getNoteSpeakerEmbeddings(noteId) {try {if (!this.db) throw new Error("Database not initialized");- return this.db- .prepare("SELECT * FROM note_speaker_embeddings WHERE note_id = ?")- .all(noteId);+ return this.db.prepare("SELECT * FROM note_speaker_embeddings WHERE note_id = ?").all(noteId);} catch (error) {debugLogger.error("Error getting note speaker embeddings",diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex b79919728..12586971a 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -5397,6 +5397,29 @@ class IPCHandlers {return this.databaseManager.getSpeakerProfiles();});+ ipcMain.handle("attach-speaker-email", async (_event, profileId, email) => {+ try {+ const profile = this.databaseManager.attachEmailToProfile(profileId, email);+ this._retroactiveMapping(profile);+ return {+ success: true,+ profile: {+ id: profile.id,+ display_name: profile.display_name,+ email: profile.email,+ sample_count: profile.sample_count,+ },+ };+ } catch (error) {+ debugLogger.error(+ "Failed to attach email to speaker profile",+ { error: error.message },+ "speaker"+ );+ return { success: false, error: error.message };+ }+ });+ipcMain.handle("save-note-speaker-embeddings", async (_event, noteId, embeddingsObj) => {const buffers = {};for (const [speakerId, arr] of Object.entries(embeddingsObj)) {diff --git a/src/helpers/speakerEmbeddings.js b/src/helpers/speakerEmbeddings.jsindex 65e49301e..e7e23f9df 100644--- a/src/helpers/speakerEmbeddings.js+++ b/src/helpers/speakerEmbeddings.js@@ -12,8 +12,8 @@ const FBANK_SAMPLE_RATE = 16000;const FBANK_FRAME_LENGTH_MS = 25;const FBANK_FRAME_SHIFT_MS = 10;const FBANK_NUM_MELS = 80;-const FBANK_FRAME_LENGTH = Math.round(FBANK_SAMPLE_RATE * FBANK_FRAME_LENGTH_MS / 1000);-const FBANK_FRAME_SHIFT = Math.round(FBANK_SAMPLE_RATE * FBANK_FRAME_SHIFT_MS / 1000);+const FBANK_FRAME_LENGTH = Math.round((FBANK_SAMPLE_RATE * FBANK_FRAME_LENGTH_MS) / 1000);+const FBANK_FRAME_SHIFT = Math.round((FBANK_SAMPLE_RATE * FBANK_FRAME_SHIFT_MS) / 1000);const FBANK_FFT_SIZE = 512;let _melFilterbank = null;@@ -30,13 +30,13 @@ function getMelFilterbank() {const melPoints = new Float64Array(FBANK_NUM_MELS + 2);for (let i = 0; i < melPoints.length; i++) {- const mel = melLow + (melHigh - melLow) * i / (FBANK_NUM_MELS + 1);+ const mel = melLow + ((melHigh - melLow) * i) / (FBANK_NUM_MELS + 1);melPoints[i] = 700 * (Math.exp(mel / 1127) - 1);}const binPoints = new Float64Array(melPoints.length);for (let i = 0; i < melPoints.length; i++) {- binPoints[i] = Math.floor((FBANK_FFT_SIZE + 1) * melPoints[i] / FBANK_SAMPLE_RATE);+ binPoints[i] = Math.floor(((FBANK_FFT_SIZE + 1) * melPoints[i]) / FBANK_SAMPLE_RATE);}_melFilterbank = new Array(FBANK_NUM_MELS);@@ -67,23 +67,32 @@ function realFFT(frame) {for (let i = 1, j = 0; i < n; i++) {let bit = n >> 1;- while (j & bit) { j ^= bit; bit >>= 1; }+ while (j & bit) {+ j ^= bit;+ bit >>= 1;+ }j ^= bit;- if (i < j) { [re[i], re[j]] = [re[j], re[i]]; }+ if (i < j) {+ [re[i], re[j]] = [re[j], re[i]];+ }}for (let len = 2; len <= n; len <<= 1) {- const angle = -2 * Math.PI / len;+ const angle = (-2 * Math.PI) / len;const wRe = Math.cos(angle);const wIm = Math.sin(angle);for (let i = 0; i < n; i += len) {- let curRe = 1, curIm = 0;+ let curRe = 1,+ curIm = 0;for (let j = 0; j < len / 2; j++) {- const uRe = re[i + j], uIm = im[i + j];+ const uRe = re[i + j],+ uIm = im[i + j];const vRe = re[i + j + len / 2] * curRe - im[i + j + len / 2] * curIm;const vIm = re[i + j + len / 2] * curIm + im[i + j + len / 2] * curRe;- re[i + j] = uRe + vRe; im[i + j] = uIm + vIm;- re[i + j + len / 2] = uRe - vRe; im[i + j + len / 2] = uIm - vIm;+ re[i + j] = uRe + vRe;+ im[i + j] = uIm + vIm;+ re[i + j + len / 2] = uRe - vRe;+ im[i + j + len / 2] = uIm - vIm;const tmpRe = curRe * wRe - curIm * wIm;curIm = curRe * wIm + curIm * wRe;curRe = tmpRe;@@ -100,12 +109,15 @@ function realFFT(frame) {}function computeFbank(samples) {- const numFrames = Math.max(0, Math.floor((samples.length - FBANK_FRAME_LENGTH) / FBANK_FRAME_SHIFT) + 1);+ const numFrames = Math.max(+ 0,+ Math.floor((samples.length - FBANK_FRAME_LENGTH) / FBANK_FRAME_SHIFT) + 1+ );if (numFrames === 0) return null;const hamming = new Float32Array(FBANK_FRAME_LENGTH);for (let i = 0; i < FBANK_FRAME_LENGTH; i++) {- hamming[i] = 0.54 - 0.46 * Math.cos(2 * Math.PI * i / (FBANK_FRAME_LENGTH - 1));+ hamming[i] = 0.54 - 0.46 * Math.cos((2 * Math.PI * i) / (FBANK_FRAME_LENGTH - 1));}const melBank = getMelFilterbank();diff --git a/src/hooks/useUsage.ts b/src/hooks/useUsage.tsindex 29ae09d0f..afce682eb 100644--- a/src/hooks/useUsage.ts+++ b/src/hooks/useUsage.ts@@ -113,7 +113,11 @@ export function useUsage(): UseUsageResult | null {const pendingRefetchRef = useRef(false);useEffect(() => {- if (!isLoaded || !isSignedIn) return;+ if (!isLoaded || !isSignedIn) {+ lastFetchRef.current = 0;+ setData(null);+ return;+ }const shouldFetch = Date.now() - lastFetchRef.current > USAGE_CACHE_TTL;if (shouldFetch) {diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex f28e7a5b3..792c41d80 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -1812,6 +1812,7 @@"them": "Gegenüber","label": "Sprecher {{n}}","identifyingSpeakers": "Sprecher werden identifiziert...",+ "liveAccuracyHint": "Sprecher werden noch identifiziert. Die Genauigkeit der Beschriftung verbessert sich, sobald das Gespräch endet.","speakersIdentified": "Sprecher identifiziert","typeNamePlaceholder": "Namen eingeben","knownSpeakers": "Bekannte Sprecher",@@ -1828,7 +1829,13 @@"confirmed": "Bestätigt","suggested": "Vorgeschlagen","locked": "Fixiert"- }+ },+ "createNewPrefix": "Erstellen",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "Name oder E-Mail eingeben",+ "addContact": "Kontakt hinzufügen",+ "save": "Speichern",+ "cancel": "Abbrechen"}},"dictionary": {diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex cbfff6d51..32a4c8db1 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -1921,10 +1921,17 @@"them": "Them","label": "Speaker {{n}}","identifyingSpeakers": "Identifying speakers...",+ "liveAccuracyHint": "Still identifying speakers. Labeling accuracy will improve once the call ends.","speakersIdentified": "Speakers identified","typeNamePlaceholder": "Type a name",+ "nameOrEmailPlaceholder": "Type a name or email","knownSpeakers": "Known speakers","meetingAttendees": "Meeting attendees",+ "createNewPrefix": "Create",+ "addContact": "Add contact",+ "emailPlaceholder": "[email protected]",+ "save": "Save",+ "cancel": "Cancel","assignName": "Assign name","isThisPerson": "Is this {{name}}?","selected": "{{n}} selected",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 35431dfdb..8da442895 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -1812,6 +1812,7 @@"them": "Ellos","label": "Participante {{n}}","identifyingSpeakers": "Identificando participantes...",+ "liveAccuracyHint": "Aún identificando participantes. La precisión de las etiquetas mejorará cuando termine la llamada.","speakersIdentified": "Participantes identificados","typeNamePlaceholder": "Escribe un nombre","knownSpeakers": "Hablantes conocidos",@@ -1828,7 +1829,13 @@"confirmed": "Confirmado","suggested": "Sugerido","locked": "Bloqueado"- }+ },+ "createNewPrefix": "Crear",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "Escribe un nombre o correo",+ "addContact": "Añadir contacto",+ "save": "Guardar",+ "cancel": "Cancelar"}},"dictionary": {diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex c5da6f351..14cf555b0 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -1873,6 +1873,7 @@"them": "Eux","label": "Intervenant {{n}}","identifyingSpeakers": "Identification des intervenants...",+ "liveAccuracyHint": "Identification des intervenants en cours. La précision des étiquettes s'améliorera à la fin de l'appel.","speakersIdentified": "Intervenants identifiés","typeNamePlaceholder": "Saisir un nom","knownSpeakers": "Interlocuteurs connus",@@ -1889,7 +1890,13 @@"confirmed": "Confirmé","suggested": "Suggéré","locked": "Verrouillé"- }+ },+ "createNewPrefix": "Créer",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "Tapez un nom ou un e-mail",+ "addContact": "Ajouter un contact",+ "save": "Enregistrer",+ "cancel": "Annuler"}},"dictionary": {diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex ea7847e8e..f4768103d 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -1812,6 +1812,7 @@"them": "Loro","label": "Partecipante {{n}}","identifyingSpeakers": "Identificazione dei partecipanti...",+ "liveAccuracyHint": "Identificazione dei partecipanti in corso. La precisione delle etichette migliorerà al termine della chiamata.","speakersIdentified": "Partecipanti identificati","typeNamePlaceholder": "Digita un nome","knownSpeakers": "Parlanti noti",@@ -1828,7 +1829,13 @@"confirmed": "Confermato","suggested": "Suggerito","locked": "Bloccato"- }+ },+ "createNewPrefix": "Crea",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "Inserisci nome o email",+ "addContact": "Aggiungi contatto",+ "save": "Salva",+ "cancel": "Annulla"}},"dictionary": {diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 9b0c3d867..bd036972a 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -1740,6 +1740,7 @@"them": "相手","label": "話者 {{n}}","identifyingSpeakers": "話者を識別中...",+ "liveAccuracyHint": "話者を識別中です。通話終了後にラベルの精度が向上します。","speakersIdentified": "話者を識別しました","typeNamePlaceholder": "名前を入力","knownSpeakers": "登録済みの話者",@@ -1756,7 +1757,13 @@"confirmed": "確認済み","suggested": "候補","locked": "固定"- }+ },+ "createNewPrefix": "作成",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "名前またはメールを入力",+ "addContact": "連絡先を追加",+ "save": "保存",+ "cancel": "キャンセル"}},"dictionary": {diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex c58c0a4c5..41e2f9f74 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -1812,6 +1812,7 @@"them": "Outro","label": "Participante {{n}}","identifyingSpeakers": "Identificando participantes...",+ "liveAccuracyHint": "Ainda identificando participantes. A precisão dos rótulos melhorará quando a chamada terminar.","speakersIdentified": "Participantes identificados","typeNamePlaceholder": "Digite um nome","knownSpeakers": "Falantes conhecidos",@@ -1828,7 +1829,13 @@"confirmed": "Confirmado","suggested": "Sugerido","locked": "Bloqueado"- }+ },+ "createNewPrefix": "Criar",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "Digite um nome ou e-mail",+ "addContact": "Adicionar contato",+ "save": "Salvar",+ "cancel": "Cancelar"}},"dictionary": {diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 56569f5bf..a26a6827f 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -1812,6 +1812,7 @@"them": "Собеседник","label": "Участник {{n}}","identifyingSpeakers": "Определение участников...",+ "liveAccuracyHint": "Ещё определяем участников. Точность меток улучшится после завершения звонка.","speakersIdentified": "Участники определены","typeNamePlaceholder": "Введите имя","knownSpeakers": "Известные собеседники",@@ -1828,7 +1829,13 @@"confirmed": "Подтверждено","suggested": "Предложен","locked": "Закреплён"- }+ },+ "createNewPrefix": "Создать",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "Введите имя или email",+ "addContact": "Добавить контакт",+ "save": "Сохранить",+ "cancel": "Отмена"}},"dictionary": {diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex eb3b2bd4c..8dcce26e6 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -1807,6 +1807,7 @@"them": "对方","label": "发言者 {{n}}","identifyingSpeakers": "正在识别发言者...",+ "liveAccuracyHint": "正在识别发言者。通话结束后,标签准确性会提升。","speakersIdentified": "已识别发言者","typeNamePlaceholder": "输入姓名","knownSpeakers": "已知说话者",@@ -1823,7 +1824,13 @@"confirmed": "已确认","suggested": "建议","locked": "锁定"- }+ },+ "createNewPrefix": "创建",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "输入姓名或邮箱",+ "addContact": "添加联系人",+ "save": "保存",+ "cancel": "取消"}},"dictionary": {diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 29c86e105..740eb9c50 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -1004,7 +1004,12 @@"annualEquivalent": "$16.67","includesPrefix": "所有 Pro 功能 +","badge": "最熱門",- "features": ["無限會議錄製", "代理模式", "與您的資料對話", "優先支援"],+ "features": [+ "無限會議錄製",+ "代理模式",+ "與您的資料對話",+ "優先支援"+ ],"cta": "開始使用","switchToAnnual": "切換為年付"},@@ -1807,6 +1812,7 @@"them": "對方","label": "發言者 {{n}}","identifyingSpeakers": "正在辨識發言者...",+ "liveAccuracyHint": "仍在辨識發言者。通話結束後,標籤準確度會提升。","speakersIdentified": "已辨識發言者","typeNamePlaceholder": "輸入姓名","knownSpeakers": "已知發言者",@@ -1823,7 +1829,13 @@"confirmed": "已確認","suggested": "建議","locked": "鎖定"- }+ },+ "createNewPrefix": "建立",+ "emailPlaceholder": "[email protected]",+ "nameOrEmailPlaceholder": "輸入姓名或電子郵件",+ "addContact": "新增聯絡人",+ "save": "儲存",+ "cancel": "取消"}},"dictionary": {diff --git a/src/types/electron.ts b/src/types/electron.tsindex 132f308a8..6043c295b 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -1430,6 +1430,19 @@ declare global {updated_at: string;}>>;+ attachSpeakerEmail?: (+ profileId: number,+ email: string | null+ ) => Promise<{+ success: boolean;+ error?: string;+ profile?: {+ id: number;+ display_name: string;+ email: string | null;+ sample_count: number;+ };+ }>;saveNoteSpeakerEmbeddings?: (noteId: number,embeddings: Record<string, number[]>