Skip to content

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

refactor: Reuse audio manager and stabilize dictation toggle callback to fix recording latency.

Gabriel Stein199ad5511ee8
diff --git a/src/App.jsx b/src/App.jsx
index c7669e633..5b22d4554 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -101,13 +101,15 @@ export default function App() {
}
}, [isCommandMenuOpen, isHovered, setWindowInteractivity]);
+ const handleDictationToggle = React.useCallback(() => {
+ setIsCommandMenuOpen(false);
+ setWindowInteractivity(false);
+ }, [setWindowInteractivity]);
+
const { isRecording, isProcessing, toggleListening } = useAudioRecording(
toast,
{
- onToggle: () => {
- setIsCommandMenuOpen(false);
- setWindowInteractivity(false);
- },
+ onToggle: handleDictationToggle,
}
);