* feat: Implement comprehensive Whisper speech recognition support 🎯 Complete Whisper Implementation: - Proper model size validation and mapping (small->base, medium->small, large->medium) - GPU/CPU device detection and automatic model placement - Efficient in-memory audio processing (no temporary files) - Custom model cache directory for organized storage - Enhanced error handling with detailed logging - Optimized transcription parameters for better accuracy 🔧 Technical Improvements: - Replace temporary file approach with direct tensor processing - Add torch.no_grad() context for efficient inference - Implement proper audio normalization and padding - Add comprehensive error handling and recovery - Support for both CPU and CUDA acceleration 📦 Installation Integration: - Add --with-whisper flag to installation script - Update setup.py with correct openai-whisper dependencies - Include torch and torchaudio in whisper extras - Automatic and manual installation options 🧪 Testing & Validation: - Add comprehensive test suite for Whisper functionality - Test model size mapping, initialization, and transcription - Mock-based testing for environments without Whisper installed - Integration with existing test infrastructure 💡 Performance Optimizations: - Efficient audio buffer processing without file I/O - GPU acceleration when available - Optimized Whisper parameters for real-time usage - Memory-efficient model loading and caching 🔄 Backward Compatibility: - Maintains full compatibility with existing VOSK implementation - Graceful fallback when Whisper dependencies are missing - No breaking changes to existing API This implementation provides a production-ready Whisper integration that significantly improves transcription accuracy while maintaining the performance characteristics needed for real-time voice dictation. * feat: Add comprehensive Whisper installation support and error handling 🎯 Enhanced User Experience: - Add intelligent Whisper import error detection in settings dialog - Show helpful installation instructions when Whisper is missing - Automatically revert to VOSK when Whisper selection fails - Provide multiple installation methods and troubleshooting tips 📋 New Installation Helper: - Create install-whisper.sh script for dedicated Whisper installation - Support multiple installation methods (standard, trusted hosts, break-system-packages) - Comprehensive error handling and fallback options - Clear instructions for SSL issues and alternative approaches 🔧 Improved Error Handling: - Detect Whisper import errors specifically in settings dialog - Show user-friendly dialog with installation instructions - Graceful fallback to VOSK when Whisper unavailable - Detailed logging for troubleshooting 💡 User Guidance: - Step-by-step installation instructions in error dialog - Multiple installation options for different environments - Clear explanation of disk space and time requirements - Troubleshooting tips for common SSL issues 🛠️ Technical Features: - Automatic virtual environment detection - Installation verification and model listing - SSL issue detection and workarounds - Comprehensive error reporting and recovery This addresses the immediate issue where users get cryptic errors when trying to use Whisper without proper installation, providing clear guidance and multiple solutions for different scenarios. * feat: Enhance Whisper support and improve Settings UI ## Whisper Implementation Fixes - Fix Whisper transcription by removing unnecessary audio padding - Fix API usage: pass numpy array directly instead of torch tensor - Remove confusing model size remapping (users select exact model names) - Add fp16=False for CPU to prevent warnings - Fix missing 'import torch' in install-whisper.sh verification ## Audio System Improvements - Add ALSA error handler to suppress noisy warnings - Process remaining audio buffer when stopping recognition (fixes test button) ## Settings Dialog UI Enhancements - Add model metadata display (download status, size, recommendations) - Show ✓ for downloaded models, ↓ for pending downloads, ★ for recommended - Add system-based model recommendations (based on RAM/GPU) - Implement auto-apply settings on change (remove Apply button) - Fix VOSK settings visibility when Whisper is selected - Add VOSK model info panel with same features as Whisper - Fix test recognition to show results in dialog instead of injecting text - Fix race condition in test result display ## Startup Improvements - Load saved config on startup (engine/model now persists correctly) - Settings are remembered between app restarts ## Code Quality - Add get_text_callbacks/set_text_callbacks methods for test isolation - Update tests with proper mocking
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.