Files
local-transcription/main.py
jknapp 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

3.6 KiB