84ec79c76962887a61385eb4ec5f171c9dd121d9
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
fa17b88f74 |
chore: bump minimum Python from 3.8 to 3.9 (#336)
* chore: bump minimum Python from 3.8 to 3.9 and adopt PEP 585 builtins - Update requires-python, classifiers, mypy target, and black target in pyproject.toml - Replace Python 3.8 with 3.9 in CI matrix and nightly workflow - Replace typing.List/Dict/Tuple/Set with builtin list/dict/tuple/set (PEP 585) - Update all 3.8 version references in README, docs, website, and install.sh - Fix test_wayland_no_tools to mock IBus availability - Remove List from common_types re-exports and update test * style: reformat test files for Black 26.x and pin version in CI Black 26.x introduced parenthesized context manager formatting. Reformat 7 test files and pin Black>=26,<27 in CI to prevent future drift from unpinned version upgrades. |
||
|
|
58b635b8b9 |
feat: detect incompatible Intel GPUs and fallback to CPU (#239)
* feat: detect incompatible Intel GPUs and fallback to CPU Implements two-layer protection for users with older Intel GPUs that lack VK_KHR_16bit_storage support required by whisper.cpp Vulkan backend. Affected GPUs: Intel Gen7 and older (Ivy Bridge, Haswell, Sandy Bridge) - Intel HD Graphics 2500/4000 (Ivy Bridge) - Intel HD Graphics 4400/4600 (Haswell) Layer 1: Install-Time Detection (Prevention) - New check_vulkan_gpu_compatibility() function in install.sh - Parses GPU name from vulkaninfo output - Checks against known incompatible patterns - Shows clear warning and recommends CPU backend - Updates detect_whispercpp_backends() to skip Vulkan for incompatible GPUs Layer 2: Runtime Fallback (Safety Net) - Added error handling in recognition_manager.py _init_whispercpp() - Catches RuntimeError with "16-bit storage" or "Unsupported device" - Automatically disables Vulkan/CUDA and retries with CPU - Shows desktop notification explaining the fallback Fixes #238 * fix(gpu): improve compatibility detection and add tests |
||
|
|
94f71853e0 |
reliability: Microphone Reconnection and Audio Buffer Limits (#109)
* fix: implement microphone reconnection and audio buffer limits for reliability - Add microphone reconnection logic with exponential backoff - Implement audio buffer limits to prevent memory issues - Add configurable buffer size limits with clamping - Improve error handling for audio device failures - Add buffer statistics and monitoring capabilities - Graceful stream cleanup and resource management Resolves #92 Changes made: - Added _max_buffer_size, _reconnection_attempts, _max_reconnection_attempts attributes - Implemented _attempt_audio_reconnection() method with exponential backoff - Enhanced _record_audio() method with buffer limit checking and reconnection - Added set_buffer_limit() and get_buffer_stats() methods - Improved error handling for IOError/OSError during audio recording - Added test scripts to validate reliability improvements The implementation prevents memory issues by limiting audio buffer size and automatically reconnecting to audio devices when they fail, with proper exponential backoff to prevent rapid reconnection attempts. * fix: Address code review feedback for PR #109 - Add thread lock (_buffer_lock) for audio_buffer to prevent race conditions - Fix _last_audio_error_time reset in cleanup - Protect buffer access in stop_recognition and get_buffer_stats with lock - Fix test_max_reconnection_attempts to match actual counter behavior Addresses review feedback for microphone reconnection and audio buffer limits * style: fix lint errors * fix: add missing sys import in audio_feedback.py - Add sys import required by _is_ci_mode() function - Remove temporary test_reliability scripts * style: fix black formatting --------- Co-authored-by: OpenClaw Reviewer <review@openclaw.ai> |
||
|
|
1dc1d44665 |
feat: Alpha Launch v0.2.0 - Complete UX Overhaul 🚀🎤 (#39)
* feat: prepare for v0.2.0-alpha release * feat: prepare for v0.2.0-alpha release * chore: remove CHANGELOG.md, use GitHub Releases instead * refactor: use existing About dialog instead of Settings section * style: enhance About dialog UI readability * style: fix formatting with black and isort * feat: show VAD and silence timeout settings for Whisper engine - Renamed 'VOSK Settings' to 'Recognition Settings' - VAD Sensitivity and Silence Timeout now apply to both engines - Added tooltips explaining each setting - VOSK-specific model info only shown when VOSK selected * fix: resolve overlapping UI elements in settings dialog * fix: save VAD and silence timeout settings for both engines Previously these settings were only saved when VOSK was selected. Now they persist correctly for Whisper as well. * fix: show download progress when selecting undownloaded model Previously when auto-applying settings, models would download silently in the background without showing the progress dialog. Now: - Download progress dialog appears for undownloaded models - Model icons update correctly after download completes * feat: add download progress, speed, ETA and cancel button - Show real download progress percentage for VOSK models - Display download speed (MB/s) and estimated time remaining - Add Cancel button to abort downloads - Update status during extraction phase - Whisper downloads still pulse (uses internal downloader) * fix: defer model download until needed, don't block startup - App now starts instantly even if models aren't downloaded - Models are downloaded on-demand when selected in Settings - If user tries to dictate without a model, plays error sound - Added model_ready property to check if engine is usable * fix: improve first-run UX without downloaded models - Settings dialog now defaults to smallest available model, not saved config - Only show saved model if it's actually downloaded - Add desktop notification when trying to dictate without a model - Prevents auto-downloading large models on first launch * feat: add download progress tracking for Whisper models - Implement custom Whisper model download with progress/speed/ETA - Uses OpenAI's CDN URLs directly instead of whisper.load_model() - Progress callback works the same as VOSK downloads - Supports cancellation during download * fix: enable download progress callback for Whisper models Progress callback was only being set for VOSK downloads, not Whisper. Now both engines show real-time progress, speed, and ETA. * fix: update tests for defer_download and config manager mocking - test_main: Mock ConfigManager to prevent saved config from overriding test values - test_settings_dialog: Mock ModelDownloadDialog to prevent GTK init errors - test_speech_recognition: Use proper MockVoskModule class instead of MagicMock, pass defer_download=False for download test - test_whisper_support: Pass defer_download=False to trigger model loading in test * fix: resolve test failures for CI - test_main: Fix ConfigManager patch path to use source module - test_settings_dialog: Mock _is_vosk_model_downloaded and _is_whisper_model_downloaded to skip download flow, add missing dialog attributes - test_speech_recognition: Replace recognizer with properly configured mock that returns valid JSON, fixing test isolation issues when running all tests together * fix: mock _download_whisper_model in whisper test to avoid requests exception handling issue * fix: add gir1.2-girepository-2.0 dep for PyGObject on Ubuntu 24.04 - Add missing girepository-2.0 package for newer Ubuntu runners - Use --no-build-isolation for PyGObject to use system packages * fix: skip PyGObject pip install, use system python3-gi package - Use --no-deps for editable install to skip PyGObject - Install other deps explicitly without PyGObject - Add python3-gi-cairo for complete GTK support - Removes problematic girepository-2.0 build requirement * fix: install PyGObject via pip with proper build deps - Remove python3-gi/python3-gi-cairo (doesn't work with setup-python) - Install PyGObject from pip after installing build dependencies - Simplify venv setup without --system-site-packages hack * Fix GObject * fix: set GI_TYPELIB_PATH for pip-installed PyGObject to find AppIndicator3 |
||
|
|
917510d3f4 |
feat: Enhance Whisper Support & Improve Settings UI (#38)
* 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 |