7 Commits

Author SHA1 Message Date
f035bdb927 Fix recording failure in Windows PyInstaller builds with console=False
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>
2025-12-28 20:57:49 -08:00
95e9e8ebad Fix application icon not showing in PyInstaller builds
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>
2025-12-28 20:35:53 -08:00
52aa73bfaa Fix infinite spawn loop on all platforms with PyInstaller
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>
2025-12-28 20:17:23 -08:00
371d5d9a28 Fix infinite spawn loop on Windows PyInstaller builds
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>
2025-12-28 20:09:43 -08:00
20a7764bab Add application icon support for GUI and compiled executables
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>
2025-12-28 18:59:24 -08:00
eeeb488529 Add loading splash screen for app startup
**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>
2025-12-27 06:33:44 -08:00
472233aec4 Initial commit: Local Transcription App v1.0
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>
2025-12-25 18:48:23 -08:00