@echo off setlocal enabledelayedexpansion title Church Transcription — Launcher :: ════════════════════════════════════════════════════════════════════════════ :: CONFIGURATION — edit these lines before first use :: ════════════════════════════════════════════════════════════════════════════ :: Your HuggingFace access token (required for speaker diarization) :: Get one at https://huggingface.co/settings/tokens set HF_TOKEN=PASTE_YOUR_TOKEN_HERE :: Whisper model to use: :: large-v3 — most accurate, needs ~6 GB VRAM, ~3 s latency :: distil-large-v3 — faster (~2 s latency), very slightly less accurate :: medium — fallback if VRAM is limited (~4 GB VRAM) set WHISPER_MODEL=large-v3 :: ════════════════════════════════════════════════════════════════════════════ :: Check the token has been set if "%HF_TOKEN%"=="PASTE_YOUR_TOKEN_HERE" ( echo. echo ERROR: HuggingFace token not configured. echo. echo Open start.bat in Notepad and replace PASTE_YOUR_TOKEN_HERE echo with your token from https://huggingface.co/settings/tokens echo. echo See SETUP.md Part 7 for full instructions. echo. pause exit /b 1 ) :: Check virtual environment exists if not exist .venv\Scripts\activate.bat ( echo. echo ERROR: Virtual environment not found. echo Please run install.bat first. echo. pause exit /b 1 ) :: Check Mosquitto is running sc query mosquitto | find "RUNNING" >nul 2>&1 if errorlevel 1 ( echo Starting Mosquitto MQTT broker... net start mosquitto >nul 2>&1 if errorlevel 1 ( echo WARNING: Could not start Mosquitto. Is it installed? echo See SETUP.md Part 4. pause exit /b 1 ) ) echo. echo ============================================================ echo Church Live Transcription Display echo ============================================================ echo. echo Starting Whisper server in a new window... echo Starting bridge in a new window... echo. echo Both windows must stay open during the service. echo Close this window or both others to shut down. echo. :: Activate venv and launch WhisperLiveKit in its own window start "Whisper Transcription Server" cmd /k ^ "call .venv\Scripts\activate.bat && ^ set HF_TOKEN=%HF_TOKEN% && ^ echo Starting WhisperLiveKit (%WHISPER_MODEL%) with diarization... && ^ wlk --model %WHISPER_MODEL% --language en --diarization --hf-token %HF_TOKEN%" :: Brief pause so Whisper can begin loading before the bridge connects timeout /t 5 /nobreak >nul :: Activate venv and launch the bridge (speaker UI opens in this process) start "Transcription Bridge" cmd /k ^ "call .venv\Scripts\activate.bat && ^ echo Starting bridge... && ^ python bridge\bridge.py" echo Both windows launched. You can minimise this window. echo. pause