Major improvements and fixes: 🐛 Bug Fixes: - Fix VOSK model download URL (v0.42 -> v0.22 for large model) - Fix resource path resolution across different installation methods - Fix missing error handling for audio library imports - Fix text injection return value handling - Fix test compatibility issues with updated imports ✨ New Features: - Add centralized ResourceManager for consistent resource access - Add ActionHandler for voice commands (delete, undo, redo, select, etc.) - Add keyboard shortcut support for text injection - Add comprehensive dependency checking with helpful error messages - Add resource validation with detailed reporting 🔧 Improvements: - Eliminate code duplication in resource path finding - Enhance error handling with user-friendly messages - Improve Wayland/X11 compatibility - Add proper return type annotations - Enhance test coverage and fix failing tests 📁 New Files: - src/vocalinux/utils/resource_manager.py - Centralized resource management - src/vocalinux/ui/action_handler.py - Voice command action processing - src/vocalinux/utils/__init__.py - Utils package initialization 🧪 Testing: - All tests now pass (76 passed, 28 skipped) - Updated test mocks for new architecture - Fixed import issues in test files This makes VocaLinux production-ready with robust error handling, complete feature implementation, and improved maintainability.
Vocalinux
A seamless voice dictation system for Linux, comparable to the built-in solutions on macOS and Windows.
Overview
Vocalinux provides a user-friendly speech-to-text solution for Linux users with:
- Activation via double-tap Ctrl keyboard shortcut
- Real-time transcription with minimal latency
- Universal compatibility across applications
- Offline operation for privacy and reliability
- Visual indicators for microphone status
- Audio feedback for recognition status
Quick Start
Prerequisites
- Ubuntu 22.04 or newer (may work on other Linux distributions)
- Python 3.8 or newer
- X11 or Wayland desktop environment
Installation
# Clone the repository
git clone https://github.com/jatinkrmalik/vocalinux.git
cd vocalinux
# Run the installer script
./install.sh
The installer will set up everything you need, including system dependencies and a Python virtual environment.
For detailed installation instructions and options, see docs/INSTALL.md.
Running Vocalinux
After installation:
# Activate the virtual environment
source activate-vocalinux.sh
# Run Vocalinux
vocalinux
Usage
Voice Dictation
- Double-tap the Ctrl key to start recording
- Speak clearly into your microphone
- Double-tap Ctrl again or pause speaking to stop recording
Voice Commands
| Command | Action |
|---|---|
| "new line" | Inserts a line break |
| "period" | Types a period (.) |
| "comma" | Types a comma (,) |
| "question mark" | Types a question mark (?) |
| "delete that" | Deletes the last sentence |
| "capitalize" | Capitalizes the next word |
For a complete user guide, see docs/USER_GUIDE.md.
Configuration
Configuration is stored in ~/.config/vocalinux/config.json. You can customize:
- Recognition engine (VOSK or Whisper)
- Model size (small, medium, large)
- Keyboard shortcuts
- Audio feedback
- UI behavior
- And more
Features
Custom Icons
Vocalinux includes custom icons for system trays and application launchers that visually indicate:
- Microphone inactive state
- Microphone active state
- Speech processing state
Custom Sounds
Audio feedback is provided for:
- Start of recording
- End of recording
- Error conditions
You can customize these sounds by replacing the files in resources/sounds/.
Advanced Usage
# With debugging enabled
vocalinux --debug
# With a specific speech recognition engine
vocalinux --engine whisper
# With a specific model size
vocalinux --model medium
# Force Wayland compatibility mode
vocalinux --wayland
Documentation
- Installation Guide - Detailed installation instructions
- User Guide - Complete user documentation
- Contributing - Development setup and contribution guidelines
Roadmap
Future development plans include:
Custom icon design✅ (Implemented in v0.1.0)- Graphical settings dialog
- Advanced voice commands for specific applications
- Multi-language support
- Better integration with popular applications
- Improved model management
- Customizable keyboard shortcuts via GUI
- More audio feedback options
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for development setup instructions and contribution guidelines.
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.