-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependencies.bat
More file actions
54 lines (47 loc) · 1.18 KB
/
Copy pathdependencies.bat
File metadata and controls
54 lines (47 loc) · 1.18 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
@echo off
setlocal
echo =========================================
echo TTSPython dependency installer
echo =========================================
echo.
echo This script installs missing dependencies only.
echo It does NOT upgrade Python or pip.
echo.
where py >nul 2>&1
if errorlevel 1 goto no_python
echo Python version:
py -V
echo.
call :CheckPackage pyttsx3
call :CheckPackage pywin32
call :CheckPackage numpy
call :CheckPackage sounddevice
call :CheckPackage faster-whisper
call :CheckPackage Pillow
echo =========================================
echo Complete.
echo Missing packages were installed when possible.
echo =========================================
echo.
exit /b 0
:no_python
echo [ERROR] Python launcher (py) not found in PATH.
echo Install Python and run this script again.
exit /b 1
:CheckPackage
set "PKG=%~1"
echo Checking %PKG%...
py -m pip show "%PKG%" >nul 2>&1
if errorlevel 1 (
echo MISSING - installing...
py -m pip install "%PKG%"
if errorlevel 1 (
echo [ERROR] Install failed for %PKG%
exit /b 1
)
py -m pip show "%PKG%" | findstr /b /c:"Name:" /c:"Version:"
) else (
py -m pip show "%PKG%" | findstr /b /c:"Name:" /c:"Version:"
)
echo.
exit /b 0