Go to file
Ilgiz Kalmetyev 9058cf7404 fix: make history deletion independent of cache cleanup 2026-04-10 14:31:17 +05:00
app feat: add audio cache settings and history actions 2026-04-10 14:10:19 +05:00
asr feat: download missing model from settings save flow 2026-04-09 09:18:38 +05:00
audio feat: add audio cache settings and history actions 2026-04-10 14:10:19 +05:00
core feat: add audio cache settings and history actions 2026-04-10 14:10:19 +05:00
history feat: add audio cache settings and history actions 2026-04-10 14:10:19 +05:00
hotkeys feat: add global hotkey service using win32 registration 2026-04-08 23:07:12 +05:00
injection fix: keep transcript in application field when target is absent 2026-04-09 15:01:56 +05:00
logging_ext feat: add configurable logging service with file rotation 2026-04-08 21:45:49 +05:00
packaging fix: make pyinstaller spec portable-friendly 2026-04-09 16:06:01 +05:00
platform fix: add frozen-safe platform compatibility layer 2026-04-09 16:23:03 +05:00
resources/icons chore: bootstrap repository structure for voice ptt app 2026-04-08 19:50:57 +05:00
tests ui: reorder history audio actions and align checkbox column 2026-04-10 14:28:02 +05:00
ui fix: make history deletion independent of cache cleanup 2026-04-10 14:31:17 +05:00
.gitignore chore: route generated test artifacts to ignored temp roots 2026-04-09 15:21:58 +05:00
AGENTS.md add AGENTS.md 2026-04-08 19:56:30 +05:00
README.md docs: expand README with architecture and gpu build overview 2026-04-09 20:20:47 +05:00
pyproject.toml chore: bootstrap repository structure for voice ptt app 2026-04-08 19:50:57 +05:00
requirements.txt chore: bootstrap repository structure for voice ptt app 2026-04-08 19:50:57 +05:00

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:

  1. PttController starts recording and captures the foreground target window snapshot.
  2. AudioCaptureService records microphone input into an in-memory buffer.
  3. TranscriptionWorker sends the audio buffer to ModelManager and Faster-Whisper.
  4. TextInjector and the Windows platform helpers insert the transcript into the captured target window.
  5. HistoryStore persists the session and HistoryPruner enforces 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 bootstrap
  • core/ - configuration, runtime diagnostics, error handling, orchestration
  • ui/ - main window, settings dialog, tray controller, history and model dialogs
  • audio/ - microphone discovery and audio capture
  • asr/ - model registry, locator, downloader, manager, transcription worker
  • hotkeys/ - hotkey parsing and global hotkey service
  • injection/ - target-window capture and text insertion
  • history/ - SQLite history store and pruning
  • logging_ext/ - configurable rotating file logging
  • platform/windows/ - Win32-specific hotkey, focus, input, and clipboard helpers
  • packaging/ - PyInstaller and CTranslate2 packaging helpers
  • tests/ - 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