Push-to-talk voice dictation for Linux using Whisper AI
Project description
Praating-AI
Push-to-talk voice dictation for Linux. Hold a button, speak, release — text appears at your cursor.
Built for use with Claude Code, terminals, text editors, and any application.
Installation
1. Install system dependencies
sudo apt install xdotool portaudio19-dev libasound2-dev
2. Install praating-ai
With GPU support (recommended):
pip install praating-ai[cuda]
CPU only:
pip install praating-ai
Or install from GitHub:
pip install git+https://github.com/silentFred/praating-ai.git
3. Setup your push-to-talk button
praating --setup
This detects your mouse button and saves the config.
4. Run
praating
First run downloads the Whisper model (~3GB for large-v3). Subsequent starts are fast.
Usage
Hold your configured mouse button while speaking, release to transcribe.
Text is typed wherever your cursor is focused.
Commands
praating # Start dictation
praating --setup # Interactive CLI button setup
praating --setup-gui # Graphical setup wizard
praating --config # Show current settings
praating --set KEY=VALUE # Change a setting (e.g., --set model_size=medium)
Configuration
Config is stored at ~/.config/praating-ai/config.yaml:
# Input settings
mode: push_to_talk # push_to_talk or continuous
mouse_button: button9 # button8, button9, left, right, middle
model_size: large-v3 # tiny, base, small, medium, large-v3
device: cuda # cuda (GPU) or cpu
compute_type: float32 # float32, float16, int8
# Continuous mode settings (always listening, auto-detects speech)
silence_threshold: 0.01 # Audio level below this is silence (0.0-1.0)
silence_duration: 1.5 # Seconds of silence before processing
# Output behavior
add_trailing_space: true # Add a space after transcribed text
add_newline: false # Add a newline after transcribed text
press_enter: false # Press Enter after transcribing (useful for chat apps)
capitalize_first: true # Capitalize first letter of transcription
Modes
- push_to_talk: Hold mouse button while speaking, release to transcribe
- continuous: Always listening, automatically detects speech and transcribes when you pause
Finding your mouse button
praating --setup
Requirements
- Linux with X11 (uses xdotool for typing)
- Python 3.8+
- Microphone
- NVIDIA GPU recommended (falls back to CPU)
How It Works
- Loads Whisper speech recognition model on startup
- Listens for mouse button press → starts recording (beep)
- On button release → stops recording (beep)
- Transcribes audio using faster-whisper
- Types the text at cursor position using xdotool
Troubleshooting
No GPU acceleration
Make sure CUDA libraries are loaded. Use ./run.sh or set LD_LIBRARY_PATH to include the nvidia cudnn/cublas lib directories.
Text not appearing
- Ensure xdotool is installed:
sudo apt install xdotool - Check you're using X11:
echo $XDG_SESSION_TYPE - For Wayland, you'd need to use
ydotoolorwtypeinstead
Wrong mouse button
Run praating --setup to detect and configure your button.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file praating_ai-0.3.0.tar.gz.
File metadata
- Download URL: praating_ai-0.3.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9f7d6005b79dad8bb0f9858342a46b89debf5efef872d0844a1df2ac4bd7ccb
|
|
| MD5 |
6b1afc77ba631b1660d81d4f2838ea5f
|
|
| BLAKE2b-256 |
32836bb44e2d5f6a26addf7e99c7c1c84d0b9becc155d47a85a362a9b627fa38
|
File details
Details for the file praating_ai-0.3.0-py3-none-any.whl.
File metadata
- Download URL: praating_ai-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60014986950e26e3d6d40ea6da289c85f59765adf440b1293f066a43ec3602db
|
|
| MD5 |
d81eb10b7ce42d9b891f9c009fa7f7b1
|
|
| BLAKE2b-256 |
00fd90d8d128b3983be7b6ebffc78e05b381d270549b303e7ffc123678a42f21
|