Push-to-talk voice transcription for Windows. Hold a hotkey, speak, release. Your words appear at the cursor in any application.
- TalkKey runs in the system tray
- Hold Right Shift (or your configured key)
- Speak
- Release: audio is sent to OpenAI Whisper, transcribed text is typed into whatever window has focus
- Windows 10/11
- Python 3.9+
- OpenAI API key
pip install -e .Create a .env file in the project root:
OPENAI_API_KEY=sk-...
Or enter the key directly in the settings window after launch.
talkkeyOpens the settings window and starts the tray icon. Close the window to minimize to tray; use Quit from the tray menu to exit.
Transcribe an audio file directly:
talkkey audio.mp3
talkkey audio.wav --language en
talkkey audio.mp3 --timestamps --output result.txtAccessible from the tray icon → Settings:
| Setting | Default | Description |
|---|---|---|
| Hotkey | Right Shift | Key to hold for push-to-talk |
| Microphone | System default | Input device |
| Hold to start | 1.0 s | Minimum hold time before recording begins |
| Max duration | 60 s | Auto-stops recording at this limit |
| Launch on startup | Off | Add to Windows startup |
Settings are saved to %APPDATA%\TalkKey\config.json.
| Component | Library |
|---|---|
| Hotkey listener | pynput |
| Audio recording | sounddevice + numpy |
| Transcription | OpenAI Whisper API |
| Text injection | pynput + pyperclip |
| GUI / tray | PySide6 |
| Visual indicators | tkinter |
| Config | JSON (python-dotenv for .env fallback) |
| Windows autostart | Registry (winreg) |
src/talkkey/
├── main.py # Entry point; dispatches GUI or CLI
├── app.py # Controller + state machine (IDLE/RECORDING/TRANSCRIBING)
├── hotkey.py # Global hotkey listener with min-hold-time logic
├── recorder.py # Microphone capture → temp WAV
├── transcriber.py # OpenAI Whisper API wrapper
├── paster.py # Types transcribed text into the focused window
├── config.py # Settings dataclass + JSON persistence
├── indicator.py # Recording/transcribing overlay windows
├── autostart.py # Windows registry startup helper
└── gui/ # PySide6 settings window + tray icon
pip install -e ".[dev]"
pytest