Push-to-talk speech recognition for Windows. Hold a key, speak, release — text appears at your cursor.
- Push-to-talk — configurable hotkey (default: Right Ctrl), no always-on listening
- Dual STT engines — Yandex SpeechKit and OpenAI Whisper, switchable at runtime
- Auto-paste — recognized text inserted at cursor via clipboard
- Visual feedback — animated overlay (recording: pulsing dot + sound bars; processing: spinner)
- System tray — color-coded status dot, recognition history, mic & engine switching
- Windows autostart — optional launch on login via Startup folder
- Single-file distribution — packages as standalone
.exevia PyInstaller
┌─────────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────┐
│ Hold Key │────▶│ Record Mic │────▶│ STT Engine │────▶│ Paste │
│ (hotkey) │ │ PCM 16kHz │ │ (API call) │ │ Ctrl+V │
└─────────────┘ └──────────────┘ └───────────────┘ └──────────┘
│ │
▼ ▼
┌──────────┐ ┌──────────────┐
│ Overlay │ │ History │
│ (tkinter)│ │ (tray menu) │
└──────────┘ └──────────────┘
Tray icon status dot: green = ready, red = recording, amber = processing.
- Windows 10 or 11
- Python 3.11+
- OpenAI API key (or Yandex Cloud service account key for Yandex engine)
git clone https://github.com/ak40u/push2talk.git
cd push2talk
python -m venv .venv
.venv\Scripts\activate
pip install -e .
copy .env.example .envEdit .env with your credentials (see Configuration below), then:
python run.pyThe app runs in the system tray. Hold your hotkey to start recording, release to transcribe.
Copy .env.example to .env and set the values:
| Variable | Default | Description |
|---|---|---|
HOTKEY |
right ctrl |
Push-to-talk key (any name accepted by the keyboard library) |
STT_ENGINE |
openai |
Active engine: openai or yandex |
LANGUAGE |
en-US |
BCP-47 language code for recognition |
SAMPLE_RATE |
16000 |
Microphone sample rate in Hz |
MICROPHONE_INDEX |
(empty) | Sounddevice device index — empty uses system default |
HISTORY_SIZE |
20 |
Maximum items kept in the tray history submenu |
SA_KEY_PATH |
sa-key.json |
Path to Yandex service account authorized key (JSON) |
OPENAI_API_KEY |
(empty) | OpenAI API key (required for default openai engine) |
Hotkey examples: right ctrl, f9, scroll lock, pause, insert
Language codes: ru-RU, en-US, de-DE, fr-FR (engine-dependent)
See docs/configuration.md for full setup guides for both STT providers.
pip install pyinstaller
pyinstaller --onefile --windowed --icon=push2talk.ico \
--add-data "push2talk.ico;." \
run.pyPlace .env and sa-key.json (if using Yandex) next to the generated .exe in dist/.
push2talk/
├── app.py # Push2Talk application class, hotkey handling
├── tray.py # System tray icon management
├── recorder.py # Audio recording via sounddevice (WASAPI)
├── recognizer.py # Yandex SpeechKit STT (REST API, chunked)
├── openai_recognizer.py # OpenAI Whisper STT
├── inserter.py # Text insertion at cursor via clipboard
├── sounds.py # Audio feedback (winsound beeps)
├── history.py # Thread-safe recognition history (deque)
├── recording_overlay.py # Animated overlay window (tkinter, click-through)
├── autostart.py # Windows autostart via Startup folder .bat
├── config.py # Configuration from .env
├── logging_setup.py # Rotating file logger
├── yandex_iam_auth.py # Yandex IAM token (JWT → IAM exchange, cached)
└── py.typed # PEP 561 marker
# Install with dev dependencies
pip install -e ".[dev]"
# Run
python run.py
# Lint & format
ruff check .
ruff format .
# Type check
mypy push2talk/
# Tests
pytest -vSee docs/development.md for the full development guide and docs/architecture.md for system design.
See CONTRIBUTING.md.
MIT — see LICENSE.