Voice Recognition Bridge for Linux - Speak naturally, control your system, type hands-free
Project description
Termivox
Voice Recognition Bridge for Linux โ Speak naturally, control your system, type hands-free.
๐ฏ Overview
Termivox is a Linux-based voice recognition system that transforms your speech into text and system commands. Using offline voice recognition (Vosk), it provides:
- Hands-free dictation - Speak and watch your words appear
- Voice-controlled system commands - Copy, paste, click, scroll by voice
- Multi-language support - English and French recognition
- Toggle control - Pause/resume recognition instantly like a guitar pedal
- Privacy-first - All processing happens locally, no cloud required
โจ Features
๐ค Voice Recognition
- Offline speech-to-text powered by Vosk
- Bilingual support: English (
en) and French (fr) - Punctuation by voice - Say "comma", "period", "question mark"
- Edit commands - "new line", "tab", "new paragraph"
- System commands - "copy", "paste", "click", "scroll up/down"
๐๏ธ Toggle Control (NEW!)
Control voice recognition ON/OFF with multiple interfaces:
โจ๏ธ Global Hotkey
- Press
Ctrl+Alt+Vfrom anywhere to toggle - Customizable key combination
- Works across all applications
๐ฑ๏ธ Desktop Widget
- Minimal floating window (160ร70px)
- One-click toggle button
- Visual status: "LISTENING" (green) / "MUTED" (gray)
- Draggable, always-on-top
- Never steals cursor focus
๐๏ธ System Tray Icon
- Green/red status indicator
- Click to toggle
- Right-click menu
๐ฎ Hardware Support (Coming Soon)
- USB foot pedal support
- MIDI controller integration
- Custom button devices
๐ฆ Installation
Prerequisites
System Requirements:
- Linux (tested on Ubuntu 24.04)
- Python 3.8+
- Microphone input
System Dependencies:
sudo apt install python3-pyaudio xdotool sox portaudio19-dev -y
Setup
-
Clone the repository:
git clone https://github.com/Gerico1007/termivox.git cd termivox
-
Create virtual environment:
python3 -m venv termivox-env source termivox-env/bin/activate
-
Install Python dependencies:
pip install -r requirements.txt
-
Download voice model (if not already present):
python download_model.py -
Run Termivox:
./run.sh
๐ Usage
Quick Start
Launch with toggle control:
./run.sh
Original mode (no toggle):
source termivox-env/bin/activate
python src/main.py --no-toggle
Test voice recognition only:
source termivox-env/bin/activate
python src/test_voice_script.py --lang en
Toggle Control
Once Termivox is running, control it using:
Hotkey:
- Press
Ctrl+Alt+Vโ Pauses/resumes voice recognition - Works from any window, keeps cursor position
Widget:
- Click the floating "LISTENING" or "MUTED" button
- Drag the title bar to reposition
- Right-click to close widget
Indicator:
- Green = Voice recognition ACTIVE (listening)
- Gray/Red = Voice recognition MUTED (paused)
Voice Commands
Dictation:
"Hello world" โ types: Hello world
Punctuation:
"Hello comma world period" โ types: Hello, world.
Available punctuation:
- comma, period, question mark, exclamation mark
- colon, semicolon, dash, quote, apostrophe
Editing:
"new line" โ โต
"new paragraph" โ โตโต
"tab" โ โฅ
System Commands:
"copy" โ Ctrl+C
"paste" โ Ctrl+V
"select all" โ Ctrl+A
"click" โ Mouse click
"scroll up" โ Scroll wheel up
"scroll down" โ Scroll wheel down
Language Selection
English (default):
./run.sh
# or
python src/main.py --lang en
French:
python src/main.py --lang fr
โ๏ธ Configuration
Edit config/settings.json to customize behavior:
{
"interfaces": {
"hotkey": {
"enabled": true,
"key": "ctrl+alt+v" // Change hotkey here
},
"tray": {
"enabled": false // Enable system tray icon
},
"widget": {
"enabled": true, // Desktop widget
"position": {"x": 100, "y": 100},
"size": {"width": 160, "height": 70},
"always_on_top": true
}
},
"voice": {
"language": "en", // Default language
"auto_space": true // Auto-add spaces
}
}
Custom Hotkey Examples:
"ctrl+shift+v""ctrl+alt+t""super+v"
๐ Project Structure
termivox/
โโโ src/
โ โโโ main.py # Main entry point with toggle support
โ โโโ test_voice_script.py # Standalone testing utility
โ โโโ voice/
โ โ โโโ recognizer.py # Vosk voice recognition engine
โ โ โโโ __init__.py
โ โโโ bridge/
โ โ โโโ xdotool_bridge.py # System command executor
โ โ โโโ __init__.py
โ โโโ ui/ # Toggle control interfaces
โ โ โโโ toggle_controller.py # Central state management
โ โ โโโ hotkey_interface.py # Global hotkey listener
โ โ โโโ tray_interface.py # System tray icon
โ โ โโโ widget_interface.py # Desktop widget
โ โ โโโ hardware_interface.py # Hardware button stub
โ โ โโโ config_loader.py # Configuration system
โ โ โโโ __init__.py
โ โโโ utils/
โ โโโ __init__.py
โโโ config/
โ โโโ settings.json # User configuration
โโโ voice_models/ # Vosk language models
โ โโโ vosk-model-small-en-us-0.15/
โโโ requirements.txt # Python dependencies
โโโ run.sh # Launch script
โโโ download_model.py # Model downloader
โโโ README.md
๐ ๏ธ Dependencies
Python Packages:
Vosk- Offline speech recognitionpyaudio- Microphone inputnumpy- Audio processingpynput- Global hotkey supportpystray- System tray iconPillow- Icon generationxdotool- System command execution
System Packages:
python3-pyaudio- PyAudio bindingsxdotool- Keyboard/mouse automationsox- Audio utilitiesportaudio19-dev- Audio development headers
๐จ Toggle Widget Design
Minimal Professional Aesthetic:
โโโโโโโโโโโโโโโโโโโโโโโ
โ TERMIVOX โ โ โ Dark title bar (draggable)
โโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ LISTENING โ โ Green button (active state)
โ โ
โโโโโโโโโโโโโโโโโโโโโโโ
Features:
- Compact: 160ร70 pixels
- Unfocusable: Never steals cursor
- Draggable: Reposition anywhere
- Color-coded: Green (ON) / Gray (OFF)
- Always-on-top: Stays visible
๐งช Testing
Test voice recognition without typing:
source termivox-env/bin/activate
python src/test_voice_script.py --lang en
Test with toggle control:
./run.sh
# Then try:
# 1. Speak something
# 2. Press Ctrl+Alt+V
# 3. Speak again (should not type)
# 4. Press Ctrl+Alt+V
# 5. Speak (should type again)
Test different languages:
python src/test_voice_script.py --lang fr # French
python src/test_voice_script.py --lang en # English
๐ Troubleshooting
Hotkey doesn't work:
- Check terminal for errors
- Try different hotkey in
config/settings.json - Ensure pynput is installed:
pip list | grep pynput
No voice recognition:
- Check microphone:
arecord -l - Test PyAudio:
python -c "import pyaudio; print('OK')" - Verify Vosk model downloaded in
voice_models/
Widget not visible:
- Enable in config:
"widget": {"enabled": true} - Check if tkinter available:
python -c "import tkinter"
System tray icon missing:
- Desktop environment may not support system tray
- Use widget or hotkey instead
- Try enabling:
"tray": {"enabled": true}
๐ค Contributing
Contributions welcome! Areas for enhancement:
- Additional language models
- Custom wake word detection
- Audio feedback on toggle
- Hardware button integration
- Voice command macros
- GUI configuration tool
To contribute:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
๐ License
MIT License - See LICENSE file for details
๐ Acknowledgments
- Vosk - Offline speech recognition engine
- pynput - Cross-platform input control
- pystray - System tray integration
- xdotool - X11 automation
๐ฎ Roadmap
- Voice command macros
- Custom wake word support
- GUI settings editor
- Hardware button integration (foot pedal, MIDI)
- Audio feedback options
- Additional language models
- Plugin system for custom commands
- Cloud sync for settings (optional)
โ ๏ธ Nyro - Structural foundation, modular architecture ๐ฟ Aureon - Flow preservation, accessibility focus ๐ธ JamAI - Musical encoding, harmonic design
Built with recursive intention. Speak, toggle, flow.
Project details
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 termivox-0.1.0.tar.gz.
File metadata
- Download URL: termivox-0.1.0.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85c53c4c69f8f4b719b8869b9ba9e94bb9670aff3b78ad5212f38ffd4d4524dc
|
|
| MD5 |
74680d8774c589c41ae69c25a4e2cdb4
|
|
| BLAKE2b-256 |
bb4102bed611cb7401f3eb07f4799e1270ac586808147547cb596044965147b4
|
File details
Details for the file termivox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: termivox-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2d41a1b2989a0dd38ae536599552605b8f9583cebc05fa8f076f80f1ed3f86f
|
|
| MD5 |
88444a72abf6ab24064a54af84327755
|
|
| BLAKE2b-256 |
f54b02e8ac3416b6fbc91d5736d5fffbe555d2645bfb33860b0e0c8e172fe797
|