Skip to content

Commit

Permalink
Fix for whisper.dll (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
raivisdejus authored Jul 10, 2024
1 parent 50d6653 commit f0975e8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-python@v5
with:
python-version: "3.11.9"
Expand Down Expand Up @@ -197,7 +198,7 @@ jobs:
path: |
dist/Buzz*-windows.exe
dist/Buzz*-mac.dmg
dist/buzz-*.deb
dist/buzz_*.whl
publish-pypi:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "whisper.cpp"]
path = whisper.cpp
url = https://github.com/chidiwilliams/whisper.cpp
url = https://github.com/ggerganov/whisper.cpp
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
7. Enter repo folder `cd buzz`
8. Copy `whisper.dll` from the repo backup to `buzz` folder.
```
cp .\dll_backup\whisper.dll .\buzz\
cp .\dll_backup\*.dll .\buzz\
```
9. Activate the virtual environment `poetry shell`
10. Install the dependencies `poetry install`
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,20 @@ ifeq ($(UNAME_S),Darwin)
endif
else
ifeq ($(OS), Windows_NT)
CMAKE_FLAGS += -DBUILD_SHARED_LIBS=ON
CMAKE_FLAGS += -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
endif
endif

buzz/$(LIBWHISPER):
ifeq ($(OS),Windows_NT)
cp dll_backup/whisper.dll buzz || true
cp dll_backup/SDL2.dll buzz || true
else
cmake -S whisper.cpp -B whisper.cpp/build/ $(CMAKE_FLAGS)
cmake --build whisper.cpp/build --verbose
cp whisper.cpp/build/bin/Debug/$(LIBWHISPER) buzz || true
cp whisper.cpp/build/$(LIBWHISPER) buzz || true
endif

buzz/whisper_cpp.py: buzz/$(LIBWHISPER)
cd buzz && ctypesgen ../whisper.cpp/whisper.h -lwhisper -o whisper_cpp.py
Expand Down
6 changes: 6 additions & 0 deletions dll_backup/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DLLs extracted from whisper.cpp release v1.6.2
https://github.com/ggerganov/whisper.cpp/actions/runs/9251036100
https://github.com/ggerganov/whisper.cpp/commit/c7b6988678779901d02ceba1a8212d2c9908956e

whisper.cpp submodule commit version should match the commit where the
whisper.dll are extracted from to ensure compatibility.
Binary file added dll_backup/SDL2.dll
Binary file not shown.
Binary file modified dll_backup/whisper.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion whisper.cpp
Submodule whisper.cpp updated 217 files

0 comments on commit f0975e8

Please sign in to comment.