v5.4.0 - robustness
Key Changes
Centralized Logging Infrastructure: Added a new logging_config.py module that sets up rotating file handlers with daily log files, replacing scattered logging.getLogger() calls throughout the codebase. All modules now use a consistent logging pattern with appropriate log levels for file output (INFO) and console output (WARNING).
Custom Exception Hierarchy: Introduced a new exceptions.py module with domain-specific exceptions (ModelLoadError, AudioRecordingError, AudioSaveError, TranscriptionError, ConfigurationError) that inherit from a base TranscriberError class. This enables more precise error handling and clearer error messages to users.
Temporary File Management: Added a singleton TempFileManager class that tracks all temporary WAV files, ensures proper cleanup on application exit via atexit, and provides thread-safe file creation and deletion. This prevents temp file leaks that could occur when transcription errors interrupted normal cleanup.
Model Metadata Refactoring: Extracted model information (names, translation support, quantization overrides) into a dedicated ModelMetadata class with a clean data-driven approach using dataclasses, removing hardcoded lists scattered across the GUI code.
Improved Error Propagation: The controller now emits structured error_occurred signals that the main window displays via QMessageBox dialogs, giving users clear feedback when operations fail. Status bar messages are now user-friendly summaries while full details go to logs.
Resource Cleanup Hardening: Added timeout-based thread termination with fallback to terminate() if threads don't stop gracefully, and improved mutex handling with proper try/finally patterns to prevent deadlocks.