# Audio Recorder — EXE Launcher ## What's Included | File | Purpose | |------|---------| | `src/launcher.py` | GUI launcher — the entry point for the EXE | | `audio_recorder_server.py` | Flask recorder server (bundled into EXE) | | `AudioRecorder.spec` | PyInstaller build config | | `BUILD.bat` | One-click build script | | `build_tools/version_info.txt` | Windows EXE metadata | --- ## Building the EXE (one time, on your Windows PC) ### Requirements - Windows 10/11 - Python 3.8+ with pip (https://python.org) - Internet connection (to download PyInstaller + libraries) ### Steps 1. Put these files together in one folder: ``` 📁 AudioRecorder_Build\ ├── audio_recorder_server.py ← from previous step ├── AudioRecorder.spec ├── BUILD.bat ├── build_tools\ │ └── version_info.txt └── src\ └── launcher.py ``` 2. Double-click **BUILD.bat** 3. Wait ~2 minutes — PyInstaller bundles Python + all libraries 4. Find your EXE at: `dist\AudioRecorder.exe` That's it! The EXE is completely self-contained (~50–80 MB). --- ## What the EXE Does When you double-click `AudioRecorder.exe`: 1. **GUI launcher window opens** showing server status 2. **Flask server starts** silently in the background (no console) 3. **Browser opens automatically** to `http://localhost:5000` 4. **Taskbar window** stays open showing: - Server status (Running / Stopped) - Current recording state + elapsed time - Local URL + ESP32 IP address to enter in config - Quick Start / Pause / Stop / Save buttons - Settings (port, output folder, format, sample rate) - Audio device picker 5. **Closing the window** gracefully saves any active recording before shutting down --- ## Distributing to Others The `AudioRecorder.exe` is fully standalone — no Python installation needed on the target PC. Just copy the single EXE file. On first run it will: - Create a `recordings\` folder next to itself - Create a `recorder_config.json` for saved settings - Use the system's default audio input device --- ## Troubleshooting Build Issues **"UPX is not available"** → Open `AudioRecorder.spec`, change `upx=True` to `upx=False` **Antivirus flags the EXE** → This is a false positive common with PyInstaller. Add an exclusion or rebuild with `--key` option for obfuscation. **"Failed to execute script launcher"** → Run BUILD.bat again with the console visible to see the error, or test with `python src/launcher.py` first. **Missing sounddevice DLLs** → Make sure `sounddevice` is installed: `pip install sounddevice --upgrade`