Skip to content

pglira/psst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psst

Voice-to-text for Linux using whisper.cpp. Press a hotkey to record, press it again to transcribe, text is pasted at cursor.

Features

  • Global hotkey (default: Super+V) to toggle recording
  • Real-time VU meter overlay shown while recording (ESC to cancel)
  • GPU-accelerated transcription via whisper.cpp (CUDA)
  • Paste at cursor — transcribed text is typed into the focused window
  • Configurable via TOML config file
  • Model loaded once at startup — runs in background, always ready

Dependencies

Build

# Ubuntu/Debian
sudo apt install -y cmake build-essential pkg-config \
  libgtk-3-dev libpulse-dev \
  libxdo-dev libx11-dev

# For CUDA support (NVIDIA GPU)
# Ensure CUDA toolkit is installed (nvcc, libcublas, etc.)

# Fedora
sudo dnf install -y cmake gcc-c++ pkg-config \
  gtk3-devel pulseaudio-libs-devel \
  libxdo-devel libX11-devel

Runtime

# For text injection
sudo apt install xdotool xclip    # X11
sudo apt install wtype wl-clipboard  # Wayland

Build

cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON
cmake --build build -j$(nproc)

Without CUDA (CPU only):

cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=OFF
cmake --build build -j$(nproc)

Usage

# First run — will auto-download the whisper model (~466 MB for 'small')
./build/psst

# With custom config
./build/psst --config /path/to/config.toml

# Toggle recording from another process (for Wayland WM keybindings)
./build/psst --toggle

Configuration

Config file location: ~/.config/psst/config.toml

Copy the default config:

mkdir -p ~/.config/psst
cp config.toml ~/.config/psst/

See config.toml for all options.

Wayland Support

Global hotkeys on pure Wayland (without XWayland) are not supported by the X11 hotkey API. Workaround: bind a key in your compositor's config to run:

psst --toggle

Examples:

  • Hyprland: bind = SUPER, V, exec, psst --toggle
  • Sway: bindsym Mod4+v exec psst --toggle

Architecture

┌──────────────────────────────────────────────────┐
│  main.cpp — GTK3 Application + GLib main loop    │
│                                                  │
│  ┌──────────┐  ┌───────────┐  ┌────────────────┐ │
│  │ hotkey   │→ │ audio     │→ │ transcribe     │ │
│  │ listener │  │ recorder  │  │ (whisper.cpp)  │ │
│  └──────────┘  └─────┬─────┘  └───────┬────────┘ │
│                      │                │          │
│               ┌──────▼──────┐  ┌──────▼──────┐   │
│               │ overlay     │  │ inject      │   │
│               │ (VU meter)  │  │ (paste text)│   │
│               └─────────────┘  └─────────────┘   │
└──────────────────────────────────────────────────┘

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors