When console=False in PyInstaller builds on Windows, stdout/stderr are
not available. This causes subprocess/multiprocessing operations to fail
when they try to write output, breaking RealtimeSTT initialization.
The fix:
- Check if running as frozen executable on Windows
- Test if stdout/stderr are available (try to flush)
- If not available, redirect to io.StringIO() null streams
- This allows subprocess/multiprocessing to write without errors
This fixes the "Failed to start Recording" error that only occurred
in builds with console=False but worked fine with console=True or
when running with uv.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The icon wasn't working in frozen executables because:
1. LocalTranscription.png wasn't being bundled in the PyInstaller build
2. The code was using Path(__file__).parent which doesn't work in frozen exes
Changes:
- Added LocalTranscription.png to datas in local-transcription.spec
- Updated main.py to use sys._MEIPASS for frozen executables
- Updated gui/main_window_qt.py to use sys._MEIPASS for frozen executables
- Both files now detect if running frozen and adjust icon path accordingly
The icon will now appear correctly in:
- Window titlebar
- Taskbar (Windows) / Dock (macOS)
- Alt-Tab switcher
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extended the freeze_support fix to work on Linux and macOS, not just Windows.
The spawn loop can occur on any platform when PyInstaller bundles apps that
use multiprocessing.
Changes:
- Removed Windows-only condition for freeze_support()
- Added multiprocessing.set_start_method('spawn', force=True)
- Set spawn method for consistency across all platforms
- Prevents fork-related issues on Linux with PyInstaller
Why this is needed:
- PyTorch, faster-whisper, and RealtimeSTT all use multiprocessing
- PyInstaller frozen executables need explicit spawn method configuration
- Linux defaults to 'fork' which can cause issues with frozen executables
- 'spawn' method is more reliable with PyInstaller on all platforms
This ensures the app launches only once on Windows, Linux, and macOS.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
CRITICAL FIX: Added multiprocessing.freeze_support() to prevent the
frozen executable from spawning infinite copies of itself on Windows.
The issue:
When PyInstaller bundles Python apps that use multiprocessing (which
PyTorch, faster-whisper, and RealtimeSTT all use), Windows treats each
spawn as a new process that re-executes the script. Without freeze_support(),
this creates an infinite loop of processes spawning until the system crashes.
The fix:
- Added multiprocessing.freeze_support() at the very top of main.py
- Called before any imports that might use multiprocessing
- Windows-only (wrapped in sys.platform check)
- Must be before QApplication or any Qt imports
This is a standard requirement for all PyInstaller apps that use
multiprocessing on Windows.
Resolves: App spawns infinite copies when running from PyInstaller build
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added platform-specific icon support for both the running application
and compiled executables:
New files:
- create_icons.py: Script to convert PNG to platform-specific formats
- Generates .ico for Windows (16, 32, 48, 256px sizes)
- Generates .iconset for macOS (ready for iconutil conversion)
- LocalTranscription.png: Source icon image
- LocalTranscription.ico: Windows icon file (multi-size)
- LocalTranscription.iconset/: macOS icon set (needs iconutil on macOS)
GUI changes:
- main.py: Set application-wide icon for taskbar/dock
- main_window_qt.py: Set window icon for GUI window
Build configuration:
- local-transcription.spec: Use platform-specific icons in PyInstaller
- Windows builds use LocalTranscription.ico
- macOS builds use LocalTranscription.icns (when generated)
To generate macOS .icns file on macOS:
iconutil -c icns LocalTranscription.iconset
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Splash Screen Features:**
- Shows "Local Transcription" branding during startup
- Displays progress messages as app initializes
- Prevents users from clicking multiple times while loading
- Clean dark theme matching app design
**Implementation:**
- Created splash screen with custom pixmap drawing
- Updates messages during initialization phases:
- "Loading configuration..."
- "Creating user interface..."
- "Starting web server..."
- "Loading Whisper model..."
- Automatically closes when main window is ready
- Always stays on top to remain visible
**Benefits:**
- Better user experience during model loading (2-5 seconds)
- Prevents multiple app instances from confusion
- Professional appearance
- Clear feedback that app is starting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Phase 1 Complete - Standalone Desktop Application
Features:
- Real-time speech-to-text with Whisper (faster-whisper)
- PySide6 desktop GUI with settings dialog
- Web server for OBS browser source integration
- Audio capture with automatic sample rate detection and resampling
- Noise suppression with Voice Activity Detection (VAD)
- Configurable display settings (font, timestamps, fade duration)
- Settings apply without restart (with automatic model reloading)
- Auto-fade for web display transcriptions
- CPU/GPU support with automatic device detection
- Standalone executable builds (PyInstaller)
- CUDA build support (works on systems without CUDA hardware)
Components:
- Audio capture with sounddevice
- Noise reduction with noisereduce + webrtcvad
- Transcription with faster-whisper
- GUI with PySide6
- Web server with FastAPI + WebSocket
- Configuration system with YAML
Build System:
- Standard builds (CPU-only): build.sh / build.bat
- CUDA builds (universal): build-cuda.sh / build-cuda.bat
- Comprehensive BUILD.md documentation
- Cross-platform support (Linux, Windows)
Documentation:
- README.md with project overview and quick start
- BUILD.md with detailed build instructions
- NEXT_STEPS.md with future enhancement roadmap
- INSTALL.md with setup instructions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>