install.bat 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. title Church Transcription — Installation
  4. echo.
  5. echo ============================================================
  6. echo Church Live Transcription Display — One-time Setup
  7. echo ============================================================
  8. echo.
  9. echo This will install all required software into a local
  10. echo virtual environment (.venv). It will NOT affect other
  11. echo Python programs on this computer.
  12. echo.
  13. echo Estimated time: 10-20 minutes (depends on internet speed).
  14. echo.
  15. pause
  16. :: ── Check Python ────────────────────────────────────────────────────────────
  17. echo [1/6] Checking Python version...
  18. python --version >nul 2>&1
  19. if errorlevel 1 (
  20. echo.
  21. echo ERROR: Python is not installed or not in PATH.
  22. echo Please install Python 3.11 from https://python.org
  23. echo Make sure you tick "Add Python to PATH" during install.
  24. echo.
  25. pause
  26. exit /b 1
  27. )
  28. for /f "tokens=2 delims= " %%v in ('python --version 2^>^&1') do set PYVER=%%v
  29. echo Found Python %PYVER%
  30. :: ── Create virtual environment ───────────────────────────────────────────────
  31. echo.
  32. echo [2/6] Creating virtual environment in .venv\ ...
  33. if exist .venv (
  34. echo .venv already exists — skipping creation.
  35. ) else (
  36. python -m venv .venv
  37. if errorlevel 1 (
  38. echo ERROR: Failed to create virtual environment.
  39. pause
  40. exit /b 1
  41. )
  42. )
  43. call .venv\Scripts\activate.bat
  44. :: ── Upgrade pip ──────────────────────────────────────────────────────────────
  45. echo.
  46. echo [3/6] Upgrading pip...
  47. python -m pip install --upgrade pip --quiet
  48. :: ── Install PyTorch with CUDA ─────────────────────────────────────────────────
  49. echo.
  50. echo [4/6] Installing PyTorch with CUDA support (~2.5 GB download)...
  51. echo This is the longest step. Please wait.
  52. echo.
  53. pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
  54. if errorlevel 1 (
  55. echo.
  56. echo ERROR: PyTorch installation failed.
  57. echo Check your internet connection and try again.
  58. pause
  59. exit /b 1
  60. )
  61. :: ── Install WhisperLiveKit ────────────────────────────────────────────────────
  62. echo.
  63. echo [5/6] Installing WhisperLiveKit and dependencies...
  64. echo.
  65. pip install whisperlivekit pyannote.audio
  66. if errorlevel 1 (
  67. echo.
  68. echo ERROR: WhisperLiveKit installation failed.
  69. pause
  70. exit /b 1
  71. )
  72. :: ── Install bridge dependencies ───────────────────────────────────────────────
  73. echo.
  74. echo [6/6] Installing bridge script dependencies...
  75. pip install -r bridge\requirements.txt
  76. if errorlevel 1 (
  77. echo.
  78. echo ERROR: Bridge dependencies failed to install.
  79. pause
  80. exit /b 1
  81. )
  82. :: ── Pre-download Whisper model ────────────────────────────────────────────────
  83. echo.
  84. echo Downloading Whisper large-v3 model (~3 GB) — this only happens once.
  85. echo.
  86. python -c "from faster_whisper import WhisperModel; WhisperModel('large-v3', device='cuda', compute_type='float16')"
  87. if errorlevel 1 (
  88. echo.
  89. echo WARNING: Model pre-download failed. It will download on first start instead.
  90. echo This is not critical — continuing.
  91. )
  92. :: ── Done ─────────────────────────────────────────────────────────────────────
  93. echo.
  94. echo ============================================================
  95. echo Installation complete.
  96. echo ============================================================
  97. echo.
  98. echo Next steps:
  99. echo 1. Edit start.bat and add your HuggingFace token
  100. echo (see SETUP.md Part 7 for instructions)
  101. echo 2. Double-click start.bat to launch the system
  102. echo.
  103. pause