forked from cyberofficial/Synthalingua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.bat
52 lines (42 loc) · 1.35 KB
/
setup.bat
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
@echo off
Title Realtime Whipser Translation App
cls
if exist "data_whisper" (
set /p reinstall="Python environment already exists. Do you want to reinstall? [y/n]: "
if /i "%reinstall%"=="y" (
echo Deleting existing environment...
REM call data_whisper\Scripts\deactivate.bat :: Not Needed for now
rmdir /s /q data_whisper
) else (
echo Exiting...
exit /b
)
)
Echo Creating python environment...
python -m venv data_whisper
Echo Created Env...
call data_whisper\Scripts\activate.bat
Echo Installing Whisper
Echo Updating pip
python.exe -m pip install --upgrade pip
Echo Installing Requirements...
pip install wheel
pip install setuptools-rust
pip install -r requirements_static.txt
:cuda-patch
Echo Fixing CUDA Since Whisper installs non gpu version.
pip uninstall --yes torch torchvision torchaudio
pip cache purge
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Echo. Setup Completed!
:creating shortcut
Echo Creating example shortcut in %cd%
Echo You can edit with notepad anytime.
Echo.
Echo @echo off > livetranslation.bat
Echo cls >> livetranslation.bat
Echo call "data_whisper\Scripts\activate.bat" >> livetranslation.bat
Echo python "transcribe_audio.py" --ram 4gb --non_english --translate >> livetranslation.bat
Echo pause >> livetranslation.bat
pause
:eof