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

4.9 KiB