Skip to content

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

fix: send plain strings from dictation streaming IPC callbacks

Gabriel Steine1ccf75bc959
diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.js
index b55c902cf..60d41b862 100644
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@ -2261,9 +2261,9 @@ class IPCHandlers {
};
const setupDictationCallbacks = (streaming, event) => {
- streaming.onPartialTranscript = (text) => event.sender.send("dictation-realtime-partial", { text });
- streaming.onFinalTranscript = (text) => event.sender.send("dictation-realtime-final", { text });
- streaming.onError = (err) => event.sender.send("dictation-realtime-error", { error: err.message });
+ streaming.onPartialTranscript = (text) => event.sender.send("dictation-realtime-partial", text);
+ streaming.onFinalTranscript = (text) => event.sender.send("dictation-realtime-final", text);
+ streaming.onError = (err) => event.sender.send("dictation-realtime-error", err.message);
streaming.onSessionEnd = (data) => event.sender.send("dictation-realtime-session-end", data || {});
};
diff --git a/src/types/electron.ts b/src/types/electron.ts
index 06024d7d0..eb0a6888b 100644
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@ -1105,9 +1105,9 @@ declare global {
dictationRealtimeStart?: (options: { model?: string; mode?: "byok" | "openwhispr" }) => Promise<{ success: boolean; error?: string }>;
dictationRealtimeSend?: (buffer: ArrayBuffer) => void;
dictationRealtimeStop?: () => Promise<{ success: boolean; text: string }>;
- onDictationRealtimePartial?: (callback: (data: { text: string }) => void) => () => void;
- onDictationRealtimeFinal?: (callback: (data: { text: string }) => void) => () => void;
- onDictationRealtimeError?: (callback: (data: { error: string }) => void) => () => void;
+ onDictationRealtimePartial?: (callback: (text: string) => void) => () => void;
+ onDictationRealtimeFinal?: (callback: (text: string) => void) => () => void;
+ onDictationRealtimeError?: (callback: (error: string) => void) => () => void;
onDictationRealtimeSessionEnd?: (callback: (data: { text: string }) => void) => () => void;
// Desktop audio capture