Skip to content

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

added loading state

Gabriel Steine78bde1586f8
diff --git a/index.html b/index.html
index d23da9213..397665aff 100644
--- a/index.html
+++ b/index.html
@@ -103,6 +103,55 @@
);
};
+ // Dot-flashing animation for loading/transcribing
+ const DotFlashing = () => (
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: 16 }}>
+ <div className="dot-flashing"></div>
+ <style>{`
+ .dot-flashing {
+ position: relative;
+ width: 5px;
+ height: 5px;
+ border-radius: 5px;
+ background-color: #ccc;
+ color: #ccc;
+ animation: dot-flashing 1s infinite linear alternate;
+ animation-delay: 0.5s;
+ }
+ .dot-flashing::before, .dot-flashing::after {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ top: 0;
+ }
+ .dot-flashing::before {
+ left: -8px;
+ width: 5px;
+ height: 5px;
+ border-radius: 5px;
+ background-color: #787777;
+ color: #787777;
+ animation: dot-flashing 1s infinite alternate;
+ animation-delay: 0s;
+ }
+ .dot-flashing::after {
+ left: 8px;
+ width: 5px;
+ height: 5px;
+ border-radius: 5px;
+ background-color: #787777;
+ color: #787777;
+ animation: dot-flashing 1s infinite alternate;
+ animation-delay: 1s;
+ }
+ @keyframes dot-flashing {
+ 0% { background-color: #787777; }
+ 50%, 100% { background-color: rgba(152, 128, 255, 0.2); }
+ }
+ `}</style>
+ </div>
+ );
+
// Main App Component
const App = () => {
const [isRecording, setIsRecording] = useState(false);
@@ -234,35 +283,50 @@
return () => document.removeEventListener('keydown', handleKeyPress);
}, []);
+ // Animated size for tab
+ let tabWidth = 40, tabHeight = 8, content = null;
+ if (isRecording) {
+ tabWidth = 70; tabHeight = 32;
+ content = <VoiceBar active={true} />;
+ } else if (isProcessing) {
+ tabWidth = 90; tabHeight = 24;
+ content = <DotFlashing />;
+ }
+ const transition = 'all 0.25s cubic-bezier(0.4,0.2,0.2,1)';
+
// Minimal always-visible tab UI (no bars when idle)
return (
<div style={{
+ position: 'absolute',
+ left: 0,
+ right: 0,
+ bottom: 0,
width: '100%',
height: '100%',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
pointerEvents: 'none',
}}>
<div
className="glass-effect"
style={{
- minWidth: 40,
- minHeight: 8,
- maxWidth: 40,
- maxHeight: 8,
+ position: 'absolute',
+ left: '50%',
+ bottom: 8,
+ transform: 'translateX(-50%)',
+ width: tabWidth,
+ height: tabHeight,
background: 'rgba(30,30,30,0.85)',
border: '1px solid #ccc',
- borderRadius: 10,
+ borderRadius: 20,
boxShadow: '0 1px 6px rgba(0,0,0,0.10)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
- padding: '1px 6px',
+ padding: 0,
pointerEvents: 'auto',
+ transition,
}}
>
- {(isRecording || isProcessing) ? <VoiceBar active={true} /> : null}
+ {content}
</div>
</div>
);
diff --git a/main.js b/main.js
index 81be8e938..70c7be8d5 100644
--- a/main.js
+++ b/main.js
@@ -8,10 +8,10 @@ let mainWindow
function createWindow() {
// Always show window by default
const display = screen.getPrimaryDisplay();
- const width = 80;
- const height = 20;
+ const width = 90;
+ const height = 60;
const x = display.bounds.x + Math.round((display.workArea.width - width) / 2);
- const y = display.bounds.y + display.workArea.height; // 2px margin from bottom
+ const y = display.workArea.height;
mainWindow = new BrowserWindow({
width,
@@ -64,10 +64,6 @@ function createWindow() {
app.whenReady().then(() => {
createWindow()
- console.log("🎤 Open Scribe started!")
- console.log("📋 Shortcuts:")
- console.log(" - Press ` (backtick) to start/stop dictation and auto-paste")
- console.log(" - ESC to close window")
})
app.on("window-all-closed", () => {
@@ -88,16 +84,12 @@ app.on("will-quit", () => {
// IPC handlers
ipcMain.handle("paste-text", async (event, text) => {
- console.log("Pasting text:", text)
-
// Copy text to clipboard and simulate paste
clipboard.writeText(text)
- console.log("Text copied to clipboard")
// Simulate Ctrl+V (or Cmd+V on Mac)
const { spawn } = require("child_process")
if (process.platform === "darwin") {
- console.log("Simulating Cmd+V on macOS")
spawn("osascript", ["-e", 'tell application "System Events" to keystroke "v" using command down'])
} else if (process.platform === "win32") {
console.log("Simulating Ctrl+V on Windows")
@@ -106,7 +98,6 @@ ipcMain.handle("paste-text", async (event, text) => {
'Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait("^v")',
])
} else {
- console.log("Simulating Ctrl+V on Linux")
// Linux
spawn("xdotool", ["key", "ctrl+v"])
}