|
|
||
|---|---|---|
| app | ||
| asr | ||
| audio | ||
| core | ||
| history | ||
| hotkeys | ||
| injection | ||
| logging_ext | ||
| packaging | ||
| platform | ||
| resources/icons | ||
| tests | ||
| ui | ||
| .gitignore | ||
| AGENTS.md | ||
| README.md | ||
| pyproject.toml | ||
| requirements.txt | ||
README.md
Voice PTT
Voice PTT is a Windows desktop push-to-talk transcription app. It records audio from a selected microphone, runs local speech-to-text with Faster-Whisper, and can insert the transcript into the window that was active when recording started.
What The App Does
- Push-to-talk recording through a global hotkey or the main-window button
- Local transcription with Faster-Whisper and CTranslate2
- CPU and CUDA backend support with automatic fallback when needed
- Text insertion into the captured target window using direct typing first and clipboard fallback when required
- System tray support for background operation
- Persistent settings, logging, and transcription history
- Model download and local model management
- Audio device selection and microphone testing
Architecture Overview
The app is split into small services and controllers so long-running work stays off the UI thread.
The main flow is:
PttControllerstarts recording and captures the foreground target window snapshot.AudioCaptureServicerecords microphone input into an in-memory buffer.TranscriptionWorkersends the audio buffer toModelManagerand Faster-Whisper.TextInjectorand the Windows platform helpers insert the transcript into the captured target window.HistoryStorepersists the session andHistoryPrunerenforces the retention limit.
Supporting services provide configuration, runtime diagnostics, hotkey registration, logging, model discovery and download, and tray/main-window orchestration.
Main Components
app/- application entrypoint and bootstrapcore/- configuration, runtime diagnostics, error handling, orchestrationui/- main window, settings dialog, tray controller, history and model dialogsaudio/- microphone discovery and audio captureasr/- model registry, locator, downloader, manager, transcription workerhotkeys/- hotkey parsing and global hotkey serviceinjection/- target-window capture and text insertionhistory/- SQLite history store and pruninglogging_ext/- configurable rotating file loggingplatform/windows/- Win32-specific hotkey, focus, input, and clipboard helperspackaging/- PyInstaller and CTranslate2 packaging helperstests/- unit, integration, and manual validation coverage
Repository Structure
app/ Application entrypoint and bootstrap
asr/ Model registry, download, load, and transcription worker
audio/ Device discovery and audio capture
core/ Config, runtime info, orchestration, and diagnostics
history/ SQLite history storage and pruning
hotkeys/ Hotkey parsing and global registration
injection/ Target window capture and text insertion helpers
logging_ext/ Rotating application logging
platform/windows/ Win32 integration helpers
ui/ Main window, settings, tray, and dialogs
packaging/ PyInstaller and CTranslate2 build scripts
resources/ Icons and other packaged assets
tests/ Unit, integration, and manual tests
Technology Stack
- Python 3.11
- PySide6 for the GUI
- Faster-Whisper for transcription
- CTranslate2 as the inference backend
- sounddevice for microphone capture
- pywin32 and ctypes for Windows integration
- SQLite for history storage
- PyInstaller for EXE packaging
- pytest for automated testing
GPU Build
The project supports a CUDA-capable build for NVIDIA GPUs.
The target packaging flow keeps the app state in %APPDATA%\\VoicePTT\\..., while the EXE distribution itself is produced under dist\\VoicePTT\\.
Build the CTranslate2 runtime first:
powershell.exe -ExecutionPolicy Bypass -File .\packaging\ctranslate2\build_ctranslate2_cuda13.ps1 -SourceDir C:\src\CTranslate2 -CudaArchList 8.9
Then build the portable one-folder EXE distribution:
powershell.exe -ExecutionPolicy Bypass -File .\packaging\pyinstaller\build_portable.ps1
Optional ZIP packaging:
powershell.exe -ExecutionPolicy Bypass -File .\packaging\pyinstaller\build_portable.ps1 -CreateZip
The GPU build is still compatible with CPU fallback at runtime if CUDA is unavailable on the target machine.
Local Setup
Use Python 3.11 on Windows.
python -m pip install -r requirements.txt
python -m app.main