-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-whisper.bat
More file actions
77 lines (62 loc) · 2.45 KB
/
install-whisper.bat
File metadata and controls
77 lines (62 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
@echo off
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
echo Installing Whisper and dependencies
call :runcmd winget install miniconda3
echo Restart with conda.exe in your path
echo.
echo Then run the following at least once from an administrative powershell prompt:
echo conda init powershell
echo.
echo The rest can be run from a regular administrative command prompt:
echo %WINDIR%\System32\cmd.exe "/K %USERPROFILE%\miniconda3\Scripts\activate.bat C:\Users\maritime6626\miniconda3"
echo pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu126
echo pip3 install openai-whisper
echo pip3 install install deepmultilingualpunctuation
echo python
echo from deepmultilingualpunctuation import PunctuationModel
echo PunctuationModel() # triggers download
@REM REM install choco first
@REM echo checking for choco.exe
@REM set haspath=0
@REM call :checkpath choco.exe
@REM if "!haspath!" equ "0" (
@REM echo installing chocolatey and updating path
@REM call :runcmd winget install --id Chocolatey.Chocolatey --scope machine
@REM set PATH=C:\ProgramData\chocolatey\bin;"%PATH%"
@REM ) else (
@REM echo choco.exe found
@REM )
@REM exit /b 0
@REM REM call :runcmd winget install --id Python.Python.3.9 --location c:\python39
@REM REM set PATH=C:\python39\Scripts\;C:\python39\;%PATH%
@REM REM choco includes refreshenv
@REM REM call refreshenv
@REM rem call :runcmd choco install pyenv-win -y
@REM rem call refreshenv
@REM rem call pyenv install 3.9.13
@REM rem call pyenv global 3.9.13
@REM call :runcmd winget install --id Python.Python.3.10 --location c:\python310
@REM set PATH=C:\python310\Scripts\;C:\python310\;%PATH%
@REM REM if pip isn't already installed
@REM rem python -m ensurepip
@REM call python -m pip install --upgrade pip
@REM REM call refreshenv
@REM REM ffmpeg-full didn't seem to work for whisper...
@REM call choco install -y ffmpeg
@REM @REM call refreshenv
@REM call pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu126
@REM @REM call pip3 install torchaudio --index-url https://download.pytorch.org/whl/cu126 --no-cache-dir --force
@REM REM call python -m pip install numpy==1.26.4 openai-whisper --no-input
@REM call pip3 install openai-whisper --no-input
@REM call refreshenv
@REM @REM echo DONT FORGET TO UPDATE PATH
@REM @REM echo %PATH%
@REM exit /b 0
:runcmd
echo Executing %*
%*
exit /b %ERRORLEVEL%
:checkpath
set haspath=0
if "%~$PATH:1" NEQ "" set haspath=1
exit /b 0