forked from OpenWhispr/openwhispr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.js
More file actions
48 lines (37 loc) · 1.46 KB
/
setup.js
File metadata and controls
48 lines (37 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const fs = require("fs");
console.log("Setting up OpenWhispr...");
const envTemplate = `# OpenAI API Configuration
# Get your API key from: https://platform.openai.com/api-keys
OPENAI_API_KEY=your_openai_api_key_here
# Optional: Customize the Whisper model
# Available models: whisper-1 (default), whisper-1-large, whisper-1-large-v2
WHISPER_MODEL=whisper-1
# Optional: Set language for better transcription accuracy
# Leave empty for auto-detection, or use language codes like 'en', 'es', 'fr', etc.
LANGUAGE=
# Optional: Debug mode (set to 'true' to enable verbose logging)
DEBUG=false`;
if (!fs.existsSync(".env")) {
fs.writeFileSync(".env", envTemplate);
console.log("✅ Created .env file template");
} else {
console.log("⚠️ .env file already exists");
}
console.log(`
🎉 Setup complete!
Next steps:
1. Add your OpenAI API key to the .env file
2. Install dependencies: npm install
3. Run the app: npm start
Features:
- Global hotkey: Customizable (default: backtick \`) - set your own in Control Panel
- Draggable dictation panel: Click and drag to position anywhere on screen
- ESC to close the app
- Automatic text pasting at cursor location
- FFmpeg bundled (no separate installation needed)
Note: Make sure you have the necessary system permissions for:
- Microphone access
- Accessibility permissions (for text pasting)
For local Whisper processing, OpenWhispr uses whisper.cpp (bundled with the app).
Models are downloaded automatically on first use.
`);