Skip to content

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

fix: persist OpenAI key before onboarding test, correct Windows Python discovery output handling, keep ffmpeg debug schema boolean, and fix OpenWhispr doc paths

Gabriel Stein22fbc3a1dbcc
diff --git a/WINDOWS_TROUBLESHOOTING.md b/WINDOWS_TROUBLESHOOTING.md
index 96d2d45b4..d34e7ec9e 100644
--- a/WINDOWS_TROUBLESHOOTING.md
+++ b/WINDOWS_TROUBLESHOOTING.md
@@ -102,28 +102,28 @@ Debug mode creates detailed logs for troubleshooting:
### Method 1: Command Line
```batch
-cd "C:\Users\YourName\AppData\Local\Programs\OpenWispr"
+cd "C:\Users\YourName\AppData\Local\Programs\OpenWhispr"
OpenWhispr.exe --debug
```
### Method 2: Environment Variable
```batch
set OPENWISPR_DEBUG=true
-"C:\Users\YourName\AppData\Local\Programs\OpenWispr\OpenWhispr.exe"
+"C:\Users\YourName\AppData\Local\Programs\OpenWhispr\OpenWhispr.exe"
```
### Method 3: Debug File
```batch
-echo. > "%APPDATA%\OpenWispr\ENABLE_DEBUG"
+echo. > "%APPDATA%\OpenWhispr\ENABLE_DEBUG"
```
Then restart OpenWhispr normally.
### Find Debug Logs
-Logs are saved to: `%APPDATA%\OpenWispr\logs\`
+Logs are saved to: `%APPDATA%\OpenWhispr\logs\`
To open:
1. Press Win + R
-2. Type: `%APPDATA%\OpenWispr\logs`
+2. Type: `%APPDATA%\OpenWhispr\logs`
3. Press Enter
4. Open the most recent `debug-*.log` file
@@ -207,7 +207,7 @@ If none of these solutions work:
1. **Collect Debug Logs**
- Enable debug mode (see above)
- Reproduce the issue
- - Locate log file in `%APPDATA%\OpenWispr\logs`
+ - Locate log file in `%APPDATA%\OpenWhispr\logs`
2. **Report Issue**
- Go to: https://github.com/HeroTools/open-whispr/issues
@@ -231,8 +231,8 @@ If you want to completely uninstall and start fresh:
```batch
# Uninstall OpenWhispr first, then:
-rd /s /q "%APPDATA%\OpenWispr"
-rd /s /q "%LOCALAPPDATA%\OpenWispr"
+rd /s /q "%APPDATA%\OpenWhispr"
+rd /s /q "%LOCALAPPDATA%\OpenWhispr"
```
Then reinstall.
diff --git a/package.json b/package.json
index f4b60b593..c66a73c71 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "open-whispr",
- "version": "1.0.13",
+ "version": "1.0.14",
"description": "A desktop dictation application using OpenAI Whisper for speech-to-text transcription",
"main": "main.js",
"private": true,
diff --git a/src/components/OnboardingFlow.tsx b/src/components/OnboardingFlow.tsx
index 25f490dd6..144cb2e83 100644
--- a/src/components/OnboardingFlow.tsx
+++ b/src/components/OnboardingFlow.tsx
@@ -78,7 +78,6 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
setPreferredLanguage,
setCloudTranscriptionBaseUrl,
setCloudReasoningBaseUrl,
- setOpenaiApiKey,
setDictationKey,
updateTranscriptionSettings,
updateReasoningSettings,
@@ -139,6 +138,30 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
return buildApiUrl(base, "/models");
}, [usingCustomReasoningBase, normalizedReasoningBaseUrl]);
+ const persistOpenAIKey = useCallback(
+ async (nextKey: string) => {
+ const trimmedKey = nextKey.trim();
+ if (useLocalWhisper || !trimmedKey) {
+ return false;
+ }
+ if (trimmedKey === openaiApiKey.trim()) {
+ return true;
+ }
+
+ try {
+ if (window.electronAPI?.saveOpenAIKey) {
+ await window.electronAPI.saveOpenAIKey(trimmedKey);
+ }
+ updateApiKeys({ openaiApiKey: trimmedKey });
+ return true;
+ } catch (error) {
+ console.error("Failed to save OpenAI key", error);
+ return false;
+ }
+ },
+ [useLocalWhisper, updateApiKeys, openaiApiKey]
+ );
+
const reasoningModelRef = useRef(reasoningModel);
useEffect(() => {
reasoningModelRef.current = reasoningModel;
@@ -369,8 +392,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
localStorage.setItem("skipAuth", skipAuth.toString());
if (!useLocalWhisper && trimmedApiKey) {
- await window.electronAPI.saveOpenAIKey(trimmedApiKey);
- updateApiKeys({ openaiApiKey: trimmedApiKey });
+ await persistOpenAIKey(trimmedApiKey);
}
return true;
}, [
@@ -386,7 +408,7 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
reasoningBaseUrl,
updateTranscriptionSettings,
updateReasoningSettings,
- updateApiKeys,
+ persistOpenAIKey,
setCloudTranscriptionBaseUrl,
setCloudReasoningBaseUrl,
setDictationKey,
@@ -407,6 +429,9 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
}
setDictationKey(hotkey);
}
+ if (currentStep === 2 && !useLocalWhisper) {
+ await persistOpenAIKey(apiKey);
+ }
setCurrentStep(newStep);
@@ -416,7 +441,17 @@ export default function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
window.electronAPI.showDictationPanel();
}
}
- }, [currentStep, ensureHotkeyRegistered, hotkey, setCurrentStep, setDictationKey, steps.length]);
+ }, [
+ currentStep,
+ ensureHotkeyRegistered,
+ hotkey,
+ setCurrentStep,
+ setDictationKey,
+ steps.length,
+ useLocalWhisper,
+ persistOpenAIKey,
+ apiKey,
+ ]);
const prevStep = useCallback(() => {
if (currentStep > 0) {
diff --git a/src/helpers/debugLogger.js b/src/helpers/debugLogger.js
index 71dbe6083..dcbd38f1f 100644
--- a/src/helpers/debugLogger.js
+++ b/src/helpers/debugLogger.js
@@ -114,7 +114,8 @@ class DebugLogger {
size: stats.size,
isFile: stats.isFile(),
// Skip X_OK check on Windows (not reliable)
- isExecutable: process.platform !== "win32" ? !!(stats.mode & fs.constants.X_OK) : "N/A (Windows)",
+ isExecutable: process.platform !== "win32" ? !!(stats.mode & fs.constants.X_OK) : false,
+ executableCheckSkipped: process.platform === "win32",
permissions: stats.mode.toString(8),
modified: stats.mtime,
};
diff --git a/src/helpers/whisper.js b/src/helpers/whisper.js
index 224a55141..4da42fcca 100644
--- a/src/helpers/whisper.js
+++ b/src/helpers/whisper.js
@@ -674,12 +674,12 @@ class WhisperManager {
debugLogger.log(`Querying registry key: ${registryKey}`);
// List all Python versions in registry
- const { stdout } = await runCommand('reg', ['query', registryKey], {
+ const { output } = await runCommand('reg', ['query', registryKey], {
timeout: TIMEOUTS.QUICK_CHECK
});
// Parse version folders (e.g., "3.11", "3.12")
- const versionMatches = stdout.match(/PythonCore\\([\d.]+)/g);
+ const versionMatches = output.match(/PythonCore\\([\d.]+)/g);
debugLogger.log(`Found ${versionMatches?.length || 0} Python versions in ${registryKey}`);
if (versionMatches) {
@@ -689,7 +689,7 @@ class WhisperManager {
// Query InstallPath for this version
try {
const installPathKey = `${registryKey}\\${version}\\InstallPath`;
- const { stdout: pathOutput } = await runCommand('reg', ['query', installPathKey, '/ve'], {
+ const { output: pathOutput } = await runCommand('reg', ['query', installPathKey, '/ve'], {
timeout: TIMEOUTS.QUICK_CHECK
});
@@ -736,12 +736,12 @@ class WhisperManager {
try {
// Use 'where' command to find executable in PATH
- const { stdout } = await runCommand('where', [command], {
+ const { output } = await runCommand('where', [command], {
timeout: TIMEOUTS.QUICK_CHECK
});
// 'where' returns multiple paths, take the first one
- const paths = stdout.trim().split('\n');
+ const paths = output.trim().split('\n');
if (paths.length > 0) {
const resolvedPath = paths[0].trim();
if (fs.existsSync(resolvedPath)) {