-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
48 lines (40 loc) · 1.07 KB
/
Copy pathsetup.bat
File metadata and controls
48 lines (40 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
:: setup.bat — First-time setup. Run this once.
setlocal
set "SCRIPT_DIR=%~dp0"
cd /d "%SCRIPT_DIR%"
echo.
echo whisper-tools setup
echo -------------------
:: Check uv
where uv >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] uv not found. Install it from https://docs.astral.sh/uv/
pause
exit /b 1
)
:: Check ffmpeg
where ffmpeg >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] ffmpeg not found. Install it and add to PATH.
echo Download: https://ffmpeg.org/download.html
pause
exit /b 1
)
echo uv found
echo ffmpeg found
echo.
echo Installing Python dependencies...
uv sync
echo.
echo Downloading Whisper small model (first run only, ~250MB)...
uv run python -c "from faster_whisper import WhisperModel; WhisperModel('small', device='cpu', compute_type='int8', download_root='models')"
echo.
echo [DONE] Setup complete.
echo.
echo Usage:
echo - Drag an MP4 onto subtitles.bat to generate subtitles
echo - Double-click live.bat to start live transcription
echo - Or use bash: uv run python subtitles.py video.mp4
echo.
pause