diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a696309b9..5e9f5caf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,6 +102,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive + - uses: actions/setup-python@v5 with: python-version: "3.11.9" @@ -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 }} diff --git a/.gitmodules b/.gitmodules index b67c5d9fb..fa83e2209 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "whisper.cpp"] path = whisper.cpp - url = https://github.com/chidiwilliams/whisper.cpp + url = https://github.com/ggerganov/whisper.cpp diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7732781ed..4554649d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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` diff --git a/Makefile b/Makefile index 6b70f24f8..b83ebbd71 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/dll_backup/Readme.md b/dll_backup/Readme.md new file mode 100644 index 000000000..ecb57e326 --- /dev/null +++ b/dll_backup/Readme.md @@ -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. diff --git a/dll_backup/SDL2.dll b/dll_backup/SDL2.dll new file mode 100644 index 000000000..e26bcb1c3 Binary files /dev/null and b/dll_backup/SDL2.dll differ diff --git a/dll_backup/whisper.dll b/dll_backup/whisper.dll index 67d99a127..633079d5b 100644 Binary files a/dll_backup/whisper.dll and b/dll_backup/whisper.dll differ diff --git a/whisper.cpp b/whisper.cpp index 3b8c2dff5..c7b698867 160000 --- a/whisper.cpp +++ b/whisper.cpp @@ -1 +1 @@ -Subproject commit 3b8c2dff5729585f931a885fe9389f94253da71a +Subproject commit c7b6988678779901d02ceba1a8212d2c9908956e