Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

feat: config-driven STT routing with streaming provider adapter (#324)

Gabriel Steind41598c66681
diff --git a/preload.js b/preload.js
index f278ef679..db9736420 100644
--- a/preload.js
+++ b/preload.js
@@ -333,6 +333,7 @@ contextBridge.exposeInMainWorld("electronAPI", {
cloudUsage: () => ipcRenderer.invoke("cloud-usage"),
cloudCheckout: (plan) => ipcRenderer.invoke("cloud-checkout", plan),
cloudBillingPortal: () => ipcRenderer.invoke("cloud-billing-portal"),
+ getSttConfig: () => ipcRenderer.invoke("get-stt-config"),
// Cloud audio file transcription
transcribeAudioFileCloud: (filePath) =>
diff --git a/src/App.jsx b/src/App.jsx
index f67609df8..8cb9cedb0 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -7,7 +7,6 @@ import { LoadingDots } from "./components/ui/LoadingDots";
import { useHotkey } from "./hooks/useHotkey";
import { useWindowDrag } from "./hooks/useWindowDrag";
import { useAudioRecording } from "./hooks/useAudioRecording";
-import { useAuth } from "./hooks/useAuth";
import { useSettingsStore } from "./stores/settingsStore";
// Sound Wave Icon Component (for idle/hover states)
@@ -79,7 +78,6 @@ export default function App() {
const { t } = useTranslation();
const { hotkey } = useHotkey();
const { isDragging, handleMouseDown, handleMouseUp } = useWindowDrag();
- const { isSignedIn } = useAuth();
const [dragStartPos, setDragStartPos] = useState(null);
const [hasDragged, setHasDragged] = useState(false);
@@ -148,25 +146,10 @@ export default function App() {
setWindowInteractivity(false);
}, [setWindowInteractivity]);
- const {
- isRecording,
- isProcessing,
- toggleListening,
- cancelRecording,
- cancelProcessing,
- warmupStreaming,
- } = useAudioRecording(toast, {
- onToggle: handleDictationToggle,
- });
-
- // Trigger streaming warmup when user signs in (covers first-time account creation).
- // Pass isSignedIn directly to bypass the localStorage race condition where
- // useAuth's useEffect may not have written localStorage yet.
- useEffect(() => {
- if (isSignedIn) {
- warmupStreaming({ isSignedIn: true });
- }
- }, [isSignedIn, warmupStreaming]);
+ const { isRecording, isProcessing, toggleListening, cancelRecording, cancelProcessing } =
+ useAudioRecording(toast, {
+ onToggle: handleDictationToggle,
+ });
// Sync auto-hide from main process — setState directly to avoid IPC echo
useEffect(() => {
diff --git a/src/components/notes/NoteEditor.tsx b/src/components/notes/NoteEditor.tsx
index 1d54cae2b..22a6a8674 100644
--- a/src/components/notes/NoteEditor.tsx
+++ b/src/components/notes/NoteEditor.tsx
@@ -1,6 +1,6 @@
import { useState, useRef, useEffect, useLayoutEffect, useMemo, useCallback } from "react";
import { useTranslation } from "react-i18next";
-import { Download, Loader2, FileText, Sparkles, AlignLeft } from "lucide-react";
+import { Download, Loader2, FileText, Sparkles, AlignLeft, Radio } from "lucide-react";
import { MarkdownTextarea } from "../ui/MarkdownTextarea";
import {
DropdownMenu,
@@ -14,6 +14,7 @@ import type { ActionProcessingState } from "../../hooks/useActionProcessing";
import ActionProcessingOverlay from "./ActionProcessingOverlay";
import DictationWidget from "./DictationWidget";
import { normalizeDbDate } from "../../utils/dateFormatting";
+import { useSettingsStore } from "../../stores/settingsStore";
function formatNoteDate(dateStr: string): string {
const date = normalizeDbDate(dateStr);
@@ -151,6 +152,24 @@ export default function NoteEditor({
const titleRef = useRef<HTMLDivElement>(null);
const prevNoteIdRef = useRef<number>(note.id);
+ const isSignedIn = useSettingsStore((s) => s.isSignedIn);
+ const cloudMode = useSettingsStore((s) => s.cloudTranscriptionMode);
+ const useLocalWhisper = useSettingsStore((s) => s.useLocalWhisper);
+ const canStream = isSignedIn && cloudMode === "openwhispr" && !useLocalWhisper;
+
+ const [liveMode, setLiveMode] = useState(() => {
+ const pref = localStorage.getItem("notesStreamingPreference");
+ return pref === "streaming" || (pref !== "batch" && canStream);
+ });
+
+ const handleLiveToggle = useCallback(() => {
+ setLiveMode((prev) => {
+ const next = !prev;
+ localStorage.setItem("notesStreamingPreference", next ? "streaming" : "batch");
+ return next;
+ });
+ }, []);
+
const cursorPosRef = useRef(0);
const selectionEndRef = useRef(0);
const dictationRef = useRef<DictationRange | null>(null);
@@ -669,6 +688,21 @@ export default function NoteEditor({
</button>
</div>
)}
+ {canStream && (
+ <button
+ onClick={handleLiveToggle}
+ className={cn(
+ "shrink-0 h-6 px-1.5 flex items-center gap-1 rounded-md text-xs font-medium transition-colors duration-150",
+ liveMode
+ ? "bg-primary/8 text-primary/70 hover:bg-primary/12 dark:bg-primary/12 dark:text-primary/80"
+ : "bg-foreground/3 dark:bg-white/3 text-foreground/25 hover:text-foreground/40 hover:bg-foreground/6 dark:hover:bg-white/6"
+ )}
+ aria-label={t("notes.editor.live")}
+ >
+ <Radio size={9} />
+ {t("notes.editor.live")}
+ </button>
+ )}
{onExportNote && (
<DropdownMenu>
<DropdownMenuTrigger asChild>
diff --git a/src/helpers/audioManager.js b/src/helpers/audioManager.js
index 157e260be..33e315a0d 100644
--- a/src/helpers/audioManager.js
+++ b/src/helpers/audioManager.js
@@ -26,6 +26,33 @@ const isValidApiKey = (key, provider = "openai") => {
return key !== placeholder;
};
+const STREAMING_PROVIDERS = {
+ deepgram: {
+ warmup: (opts) => window.electronAPI.deepgramStreamingWarmup(opts),
+ start: (opts) => window.electronAPI.deepgramStreamingStart(opts),
+ send: (buf) => window.electronAPI.deepgramStreamingSend(buf),
+ finalize: () => window.electronAPI.deepgramStreamingFinalize(),
+ stop: () => window.electronAPI.deepgramStreamingStop(),
+ status: () => window.electronAPI.deepgramStreamingStatus(),
+ onPartial: (cb) => window.electronAPI.onDeepgramPartialTranscript(cb),
+ onFinal: (cb) => window.electronAPI.onDeepgramFinalTranscript(cb),
+ onError: (cb) => window.electronAPI.onDeepgramError(cb),
+ onSessionEnd: (cb) => window.electronAPI.onDeepgramSessionEnd(cb),
+ },
+ assemblyai: {
+ warmup: (opts) => window.electronAPI.assemblyAiStreamingWarmup(opts),
+ start: (opts) => window.electronAPI.assemblyAiStreamingStart(opts),
+ send: (buf) => window.electronAPI.assemblyAiStreamingSend(buf),
+ finalize: () => window.electronAPI.assemblyAiStreamingForceEndpoint(),
+ stop: () => window.electronAPI.assemblyAiStreamingStop(),
+ status: () => window.electronAPI.assemblyAiStreamingStatus(),
+ onPartial: (cb) => window.electronAPI.onAssemblyAiPartialTranscript(cb),
+ onFinal: (cb) => window.electronAPI.onAssemblyAiFinalTranscript(cb),
+ onError: (cb) => window.electronAPI.onAssemblyAiError(cb),
+ onSessionEnd: (cb) => window.electronAPI.onAssemblyAiSessionEnd(cb),
+ },
+};
+
class AudioManager {
constructor() {
this.mediaRecorder = null;
@@ -69,6 +96,8 @@ class AudioManager {
this.streamingFallbackRecorder = null;
this.streamingFallbackChunks = [];
this.skipReasoning = false;
+ this.context = "dictation";
+ this.sttConfig = null;
}
getWorkletBlobUrl() {
@@ -138,6 +167,19 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
this.skipReasoning = skip;
}
+ setContext(context) {
+ this.context = context;
+ }
+
+ setSttConfig(config) {
+ this.sttConfig = config;
+ }
+
+ getStreamingProvider() {
+ const providerName = this.sttConfig?.streamingProvider || "deepgram";
+ return STREAMING_PROVIDERS[providerName] || STREAMING_PROVIDERS.deepgram;
+ }
+
async getAudioConstraints() {
const { preferBuiltInMic: preferBuiltIn, selectedMicDeviceId: selectedDeviceId } =
getSettings();
@@ -1731,17 +1773,27 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
shouldUseStreaming(isSignedInOverride) {
const s = getSettings();
- const cloudTranscriptionMode = s.cloudTranscriptionMode;
const isSignedIn = isSignedInOverride ?? s.isSignedIn;
- const useLocalWhisper = s.useLocalWhisper;
- const streamingDisabled = localStorage.getItem("deepgramStreaming") === "false";
-
- return (
- !useLocalWhisper &&
- cloudTranscriptionMode === "openwhispr" &&
- isSignedIn &&
- !streamingDisabled
- );
+ if (s.useLocalWhisper || s.cloudTranscriptionMode !== "openwhispr" || !isSignedIn) {
+ return false;
+ }
+
+ // For notes context, check user preference first
+ if (this.context === "notes") {
+ const userPref = localStorage.getItem("notesStreamingPreference");
+ if (userPref === "streaming") return true;
+ if (userPref === "batch") return false;
+ }
+
+ // Config-driven: check mode for this context
+ if (this.sttConfig) {
+ const contextConfig =
+ this.context === "notes" ? this.sttConfig.notes : this.sttConfig.dictation;
+ return contextConfig?.mode === "streaming";
+ }
+
+ // Fallback when config not yet loaded
+ return localStorage.getItem("deepgramStreaming") !== "false";
}
async warmupStreamingConnection({ isSignedIn: isSignedInOverride } = {}) {
@@ -1751,11 +1803,12 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
}
try {
+ const provider = this.getStreamingProvider();
const [, wsResult] = await Promise.all([
this.cacheMicrophoneDeviceId(),
withSessionRefresh(async () => {
const warmupLang = getSettings().preferredLanguage;
- const res = await window.electronAPI.deepgramStreamingWarmup({
+ const res = await provider.warmup({
sampleRate: 16000,
language: warmupLang && warmupLang !== "auto" ? warmupLang : undefined,
keyterms: this.getKeyterms(),
@@ -1807,7 +1860,7 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
}
logger.info(
- "Deepgram streaming connection warmed up",
+ "Streaming connection warmed up",
{ alreadyWarm: wsResult.alreadyWarm, micCached: !!this.cachedMicDeviceId },
"streaming"
);
@@ -1816,11 +1869,11 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
logger.debug("Streaming warmup skipped - API not configured", {}, "streaming");
return false;
} else {
- logger.warn("Deepgram warmup failed", { error: wsResult.error }, "streaming");
+ logger.warn("Streaming warmup failed", { error: wsResult.error }, "streaming");
return false;
}
} catch (error) {
- logger.error("Deepgram warmup error", { error: error.message }, "streaming");
+ logger.error("Streaming warmup error", { error: error.message }, "streaming");
return false;
}
}
@@ -1900,10 +1953,11 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
}
this.streamingProcessor = new AudioWorkletNode(audioContext, "pcm-streaming-processor");
+ const provider = this.getStreamingProvider();
this.streamingProcessor.port.onmessage = (event) => {
if (!this.isStreaming) return;
- window.electronAPI.deepgramStreamingSend(event.data);
+ provider.send(event.data);
};
this.isStreaming = true;
@@ -1917,13 +1971,13 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
this.streamingTextResolve = null;
this.streamingTextDebounce = null;
- const partialCleanup = window.electronAPI.onDeepgramPartialTranscript((text) => {
+ const partialCleanup = provider.onPartial((text) => {
this.streamingPartialText = text;
this.onPartialTranscript?.(text);
});
- const finalCleanup = window.electronAPI.onDeepgramFinalTranscript((text) => {
- // text = accumulated final text from deepgramStreaming.
+ const finalCleanup = provider.onFinal((text) => {
+ // text = accumulated final text from streaming provider.
// Extract just the new segment (delta from previous accumulated final).
const prevLen = this.streamingFinalText.length;
this.streamingFinalText = text;
@@ -1934,8 +1988,8 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
}
});
- const errorCleanup = window.electronAPI.onDeepgramError((error) => {
- logger.error("Deepgram streaming error", { error }, "streaming");
+ const errorCleanup = provider.onError((error) => {
+ logger.error("Streaming provider error", { error }, "streaming");
this.onError?.({
title: "Streaming Error",
description: error,
@@ -1952,8 +2006,8 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
}
});
- const sessionEndCleanup = window.electronAPI.onDeepgramSessionEnd((data) => {
- logger.debug("Deepgram session ended", data, "streaming");
+ const sessionEndCleanup = provider.onSessionEnd((data) => {
+ logger.debug("Streaming session ended", data, "streaming");
if (data.text) {
this.streamingFinalText = data.text;
}
@@ -1968,7 +2022,7 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
// so Deepgram receives data immediately (no idle timeout).
const result = await withSessionRefresh(async () => {
const preferredLang = getSettings().preferredLanguage;
- const res = await window.electronAPI.deepgramStreamingStart({
+ const res = await provider.start({
sampleRate: 16000,
language: preferredLang && preferredLang !== "auto" ? preferredLang : undefined,
keyterms: this.getKeyterms(),
@@ -2120,14 +2174,14 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
await new Promise((resolve) => setTimeout(resolve, 120));
this.isStreaming = false;
- // 4. Finalize tells Deepgram to process any buffered audio and send final Results.
- // Wait briefly so the server sends back the from_finalize transcript before
- // CloseStream triggers connection close.
- window.electronAPI.deepgramStreamingFinalize?.();
+ // 4. Finalize tells the provider to process any buffered audio and send final results.
+ // Wait briefly so the server sends back the finalized transcript before disconnect.
+ const provider = this.getStreamingProvider();
+ provider.finalize?.();
await new Promise((resolve) => setTimeout(resolve, 300));
const tForceEndpoint = performance.now();
- const stopResult = await window.electronAPI.deepgramStreamingStop().catch((e) => {
+ const stopResult = await provider.stop().catch((e) => {
logger.debug("Streaming disconnect error", { error: e.message }, "streaming");
return { success: false };
});
@@ -2186,7 +2240,7 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
customPrompt: this.getCustomPrompt(),
language: stSettings.preferredLanguage || "auto",
locale: stSettings.uiLanguage || "en",
- sttProvider: "deepgram",
+ sttProvider: this.sttConfig?.streamingProvider || "deepgram",
sttModel: streamingSttModel,
sttProcessingMs: streamingSttProcessingMs,
sttWordCount: streamingSttWordCount,
@@ -2272,7 +2326,7 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
this.onTranscriptionComplete?.({
success: true,
text: finalText,
- source: "deepgram-streaming",
+ source: `${this.sttConfig?.streamingProvider || "deepgram"}-streaming`,
});
if (!usedBatchFallback) {
@@ -2284,7 +2338,7 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
durationSeconds ?? 0,
{
sendLogs: !usedCloudReasoning,
- sttProvider: "deepgram",
+ sttProvider: this.sttConfig?.streamingProvider || "deepgram",
sttModel: streamingSttModel,
sttProcessingMs: streamingSttProcessingMs,
sttLanguage: streamingSttLanguage,
@@ -2406,7 +2460,7 @@ registerProcessor("pcm-streaming-processor", PCMStreamingProcessor);
this.workletBlobUrl = null;
}
try {
- window.electronAPI?.deepgramStreamingStop?.();
+ this.getStreamingProvider().stop?.();
} catch (e) {
// Ignore errors during cleanup (page may be unloading)
}
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index 8785591b3..a5fb9896a 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -1907,6 +1907,33 @@ class IPCHandlers {
fetchStripeUrl(event, "/api/stripe/portal", "Cloud billing portal error")
);
+ ipcMain.handle("get-stt-config", async (event) => {
+ try {
+ const apiUrl = getApiUrl();
+ if (!apiUrl) throw new Error("OpenWhispr API URL not configured");
+
+ const cookieHeader = await getSessionCookies(event);
+ if (!cookieHeader) throw new Error("No session cookies available");
+
+ const response = await fetch(`${apiUrl}/api/stt-config`, {
+ headers: { Cookie: cookieHeader },
+ });
+
+ if (!response.ok) {
+ if (response.status === 401) {
+ return { success: false, error: "Session expired", code: "AUTH_EXPIRED" };
+ }
+ throw new Error(`API error: ${response.status}`);
+ }
+
+ const data = await response.json();
+ return { success: true, ...data };
+ } catch (error) {
+ debugLogger.error("STT config fetch error:", error);
+ return null;
+ }
+ });
+
ipcMain.handle("transcribe-audio-file-cloud", async (event, filePath) => {
const fs = require("fs");
try {
diff --git a/src/hooks/useAudioRecording.js b/src/hooks/useAudioRecording.js
index af2fdbfbd..1728c0333 100644
--- a/src/hooks/useAudioRecording.js
+++ b/src/hooks/useAudioRecording.js
@@ -133,12 +133,22 @@ export const useAudioRecording = (toast, options = {}) => {
});
}
- audioManagerRef.current.warmupStreamingConnection();
+ if (audioManagerRef.current.sttConfig?.dictation?.mode === "streaming") {
+ audioManagerRef.current.warmupStreamingConnection();
+ }
}
},
});
- audioManagerRef.current.warmupStreamingConnection();
+ audioManagerRef.current.setContext("dictation");
+ window.electronAPI.getSttConfig?.().then((config) => {
+ if (config && audioManagerRef.current) {
+ audioManagerRef.current.setSttConfig(config);
+ if (config.dictation?.mode === "streaming") {
+ audioManagerRef.current.warmupStreamingConnection();
+ }
+ }
+ });
const handleToggle = async () => {
if (!audioManagerRef.current) return;
@@ -230,10 +240,6 @@ export const useAudioRecording = (toast, options = {}) => {
}
};
- const warmupStreaming = useCallback((opts) => {
- audioManagerRef.current?.warmupStreamingConnection(opts);
- }, []);
-
return {
isRecording,
isProcessing,
@@ -245,6 +251,5 @@ export const useAudioRecording = (toast, options = {}) => {
cancelRecording,
cancelProcessing,
toggleListening,
- warmupStreaming,
};
};
diff --git a/src/hooks/useNoteRecording.ts b/src/hooks/useNoteRecording.ts
index 5637c8177..5c1180040 100644
--- a/src/hooks/useNoteRecording.ts
+++ b/src/hooks/useNoteRecording.ts
@@ -82,12 +82,22 @@ export function useNoteRecording({
}) => {
if (result.success) {
callbacksRef.current.onTranscriptionComplete(result.text);
- manager.warmupStreamingConnection();
+ if (manager.shouldUseStreaming()) {
+ manager.warmupStreamingConnection();
+ }
}
},
});
- manager.warmupStreamingConnection();
+ manager.setContext("notes");
+ window.electronAPI.getSttConfig?.().then((config) => {
+ if (config && audioManagerRef.current) {
+ audioManagerRef.current.setSttConfig(config);
+ if (manager.shouldUseStreaming()) {
+ manager.warmupStreamingConnection();
+ }
+ }
+ });
return () => {
manager.cleanup();
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index c1c2a084a..6662ff6c9 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -1333,7 +1333,8 @@
"saving": "Wird gespeichert",
"wordsCount": "{{count}} Wörter",
"startWriting": "Schreibe los...",
- "staleIndicator": "Der Inhalt hat sich seit der Verbesserung geändert"
+ "staleIndicator": "Der Inhalt hat sich seit der Verbesserung geändert",
+ "live": "Live"
},
"upload": {
"title": "Audio hochladen",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 13e0a06bd..8bb770af4 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -1369,7 +1369,8 @@
"saving": "Saving",
"wordsCount": "{{count}} words",
"startWriting": "Start writing...",
- "staleIndicator": "Content has changed since enhancement"
+ "staleIndicator": "Content has changed since enhancement",
+ "live": "Live"
},
"upload": {
"title": "Upload Audio",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index bb9e8657a..84d29ce48 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -1337,7 +1337,8 @@
"saving": "Guardando",
"wordsCount": "{{count}} palabras",
"startWriting": "Comienza a escribir...",
- "staleIndicator": "El contenido ha cambiado desde la mejora"
+ "staleIndicator": "El contenido ha cambiado desde la mejora",
+ "live": "En vivo"
},
"upload": {
"title": "Subir audio",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index 4ccd8abc3..c49bac4b2 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -1373,7 +1373,8 @@
"saving": "Enregistrement",
"wordsCount": "{{count}} mots",
"startWriting": "Commencez à écrire...",
- "staleIndicator": "Le contenu a changé depuis l'amélioration"
+ "staleIndicator": "Le contenu a changé depuis l'amélioration",
+ "live": "En direct"
},
"upload": {
"title": "Téléverser un fichier audio",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index e7805021f..fedc97805 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -1337,7 +1337,8 @@
"saving": "Salvataggio",
"wordsCount": "{{count}} parole",
"startWriting": "Inizia a scrivere...",
- "staleIndicator": "Il contenuto è cambiato dall'ultimo miglioramento"
+ "staleIndicator": "Il contenuto è cambiato dall'ultimo miglioramento",
+ "live": "Dal vivo"
},
"upload": {
"title": "Carica audio",
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index 6a9b17f59..8a0529189 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -1232,6 +1232,7 @@
"editor": {
"transcribe": "文字起こし",
"staleIndicator": "強化後にコンテンツが変更されました",
+ "live": "ライブ",
"untitled": "無題",
"noteTitle": "ノートのタイトル",
"stop": "停止",
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index 4387d5672..9ca65e2c6 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -1337,7 +1337,8 @@
"saving": "Salvando",
"wordsCount": "{{count}} palavras",
"startWriting": "Comece a escrever...",
- "staleIndicator": "O conteúdo mudou desde o aprimoramento"
+ "staleIndicator": "O conteúdo mudou desde o aprimoramento",
+ "live": "Ao vivo"
},
"upload": {
"title": "Enviar áudio",
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index 3989d31f8..f6c2be5b0 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -1337,7 +1337,8 @@
"saving": "Сохранение",
"wordsCount": "{{count}} слов",
"startWriting": "Начните писать...",
- "staleIndicator": "Содержимое изменилось после улучшения"
+ "staleIndicator": "Содержимое изменилось после улучшения",
+ "live": "Живой"
},
"upload": {
"title": "Загрузить аудио",
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index 8fd8d17a0..7c51e2a91 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -1333,7 +1333,8 @@
"saving": "保存中",
"wordsCount": "{{count}} 个词",
"startWriting": "开始书写...",
- "staleIndicator": "内容在增强后已更改"
+ "staleIndicator": "内容在增强后已更改",
+ "live": "实时"
},
"upload": {
"title": "上传音频",
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index ef2dbd9aa..4c3749b6a 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -1333,7 +1333,8 @@
"saving": "儲存中",
"wordsCount": "{{count}} 個字",
"startWriting": "開始撰寫...",
- "staleIndicator": "內容在增強後已變更"
+ "staleIndicator": "內容在增強後已變更",
+ "live": "即時"
},
"upload": {
"title": "上傳音訊",
diff --git a/src/types/electron.ts b/src/types/electron.ts
index e90e772e9..93719001c 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -270,6 +270,14 @@ declare global {
onStartDictation?: (callback: () => void) => () => void;
onStopDictation?: (callback: () => void) => () => void;
+ // STT config
+ getSttConfig?: () => Promise<{
+ success: boolean;
+ dictation: { mode: string };
+ notes: { mode: string };
+ streamingProvider: string;
+ } | null>;
+
// Database operations
saveTranscription: (text: string) => Promise<{ id: number; success: boolean }>;
getTranscriptions: (limit?: number) => Promise<TranscriptionItem[]>;