Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy install for non developers on windows #20

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added zipping functionality
  • Loading branch information
Adarsha-gg committed Jul 18, 2023
commit a516c85758a7016a937a054b2ca30f79860a7120
24 changes: 3 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,9 @@ The --api flag will use the whisper api for transcriptions. This significantly e

### For Non-Developers

After doing all the above steps, install pyinstaller:

```
pip install pyinstaller
```

Run the below code by replacing the path with where your files are located

```
pyinstaller --noconfirm --onedir --console --add-data "path/to/every/file/in/the/directory
```

This should generate a new directory with the required files without installing any dependencies. Run the main.exe file to execute everything easily.

Alternatively,

You can go to
```
https://drive.google.com/file/d/1-vwPC_zwVHiqrM4hZ35lYBlltspLIA8g/view?usp=drive_link
```
and download the .rar file to easily extract it and run main.py without installing any dependencies.
Run the
``` generate_binary.bat```
file by replacing all of the paths to the ones in your local machine. It should generate a zip file with everything compiled. To run the program simply go to output > dist > transcribe.exe > transcribe.exe.

### ⚡️ Limitations ⚡️

Expand Down
14 changes: 8 additions & 6 deletions generate_binary.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
REM Define variables for different hard coded paths
SET SOURCE_DIR=C:\git\transcribe
SET OUTPUT_DIR=C:\git\output
SET LIBSITE_PACAGES_DIR=C:\pyenv\transcribe\Lib\site-packages
REM Define variables for different hard coded paths (Change everything to your local PATHs)
SET SOURCE_DIR=D:\Code\transcribe
SET OUTPUT_DIR=D:\Code\transcribe\output
SET LIBSITE_PACAGES_DIR=D:\Code\transcribe\venv\Lib\site-packages
SET EXECUTABLE_NAME=transcribe.exe
SET ZIP_FILE_NAME=transcribe.zip
SET ZIP_FILE_DIR=D:\Code\transcribe\transcribe.rar
SET WINRAR=C:\Program Files\WinRAR\winRAR.exe

REM pyinstaller --clean --noconfirm --specpath C:\\git\\output --distpath C:\\git\\output\dist -n transcribe.exe --log-level DEBUG --recursive-copy-metadata "openai-whisper" main.py

Expand All @@ -26,4 +27,5 @@ copy %ASSETS_DIR_SRC%\mel_filters.npz %ASSETS_DIR_DEST%
copy %ASSETS_DIR_SRC%\gpt2.tiktoken %ASSETS_DIR_DEST%

REM Code for zipping the final package
REM Need to add whisper manuallyy
"%WINRAR%" a -r -ep1 -df "%ZIP_FILE_DIR%" "%OUTPUT_DIR%"

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Wave==0.0.2
openai==0.27.6
customtkinter==5.1.3
PyAudioWPatch==0.2.12.5
pyinstaller==5.13.0
--extra-index-url https://download.pytorch.org/whl/cu117
torch
pyperclip
pyperclip