Repository navigation
Expand file tree
/
Copy pathsetup-python.bat
More file actions
88 lines (76 loc) · 2.45 KB
/
Copy pathsetup-python.bat
File metadata and controls
88 lines (76 loc) · 2.45 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@echo off
REM Setup script for Dividr Python dependencies (Windows)
REM Run this script to install faster-whisper and dependencies
echo ==================================================
echo 🐍 Dividr Python Setup (Windows)
echo ==================================================
echo.
REM Check if Python is installed
where python >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ❌ Python is not installed or not in PATH!
echo.
echo Please install Python 3.9 or higher from:
echo https://www.python.org/downloads/
echo.
echo ⚠️ Make sure to check "Add Python to PATH" during installation!
pause
exit /b 1
)
REM Check Python version
for /f "tokens=2" %%i in ('python --version 2^>^&1') do set PYTHON_VERSION=%%i
echo ✅ Found Python %PYTHON_VERSION%
echo.
REM Check if pip is available
python -m pip --version >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ❌ pip is not installed!
echo Installing pip...
python -m ensurepip --upgrade
)
echo 📦 Installing Python dependencies...
echo.
REM Install requirements
python -m pip install -r requirements.txt
if %ERRORLEVEL% NEQ 0 (
echo.
echo ❌ Installation failed!
echo Try running as Administrator or check your internet connection
pause
exit /b 1
)
echo.
echo 🔧 Applying DeepFilterNet compatibility patch...
echo.
REM Run patch script if it exists and DeepFilterNet is installed
REM Get the directory where this batch file is located
set "SCRIPT_DIR=%~dp0"
set "PATCH_SCRIPT=%SCRIPT_DIR%src\backend\python\scripts\patch_deepfilternet_io.py"
if exist "%PATCH_SCRIPT%" (
python "%PATCH_SCRIPT%" 2>nul
if %ERRORLEVEL% EQU 0 (
echo ✅ DeepFilterNet patch applied successfully
) else (
echo ⚠️ DeepFilterNet patch skipped (package may not be installed or already patched)
)
) else (
echo ⚠️ Patch script not found at: %PATCH_SCRIPT%
echo Continuing anyway...
)
echo.
echo ==================================================
echo ✅ Setup Complete!
echo ==================================================
echo.
echo 🎤 Faster-Whisper and DeepFilterNet are now installed
echo.
echo Next steps:
echo 1. Run 'yarn start' to start Dividr in dev mode
echo 2. Test transcription with an audio/video file
echo.
echo 💡 Tips:
echo - First transcription will download the model (~150MB for base)
echo - Models are cached in %%USERPROFILE%%\.cache\huggingface\hub\
echo - For GPU support, see PYTHON_SETUP.md
echo.
pause