Skip to content

Upgrade whisper.cpp from v1.7.2 fork to upstream v1.8.4#651

Open
dharmab wants to merge 4 commits intomainfrom
upgrade-whisper-cpp-v1.8.4
Open

Upgrade whisper.cpp from v1.7.2 fork to upstream v1.8.4#651
dharmab wants to merge 4 commits intomainfrom
upgrade-whisper-cpp-v1.8.4

Conversation

@dharmab
Copy link
Owner

@dharmab dharmab commented Mar 24, 2026

Summary

  • Switch from dharmab/whisper.cpp fork (v1.7.2-windows-fix) to upstream ggml-org/whisper.cpp v1.8.4 — the Windows build fix from the fork is now in upstream
  • Replace Make-based whisper.cpp build with CMake (upstream dropped Makefile build system)
  • Update Go bindings to v1.8.4 and adapt Process() call for new 4-argument signature
  • Add cmake as a dependency across all platforms (Makefile install targets, CI, Dockerfile)
  • Add CGO_LDFLAGS=-fopenmp on macOS to link OpenMP runtime for ggml-cpu (Go bindings only specify -fopenmp on Linux)

Benchmarks (M4 MacBook Air)

Model v1.7.2 baseline v1.8.4 (this PR)
ggml-small (multilingual) 0.35-0.5s (.en variant) 0.26-0.46s
ggml-medium.en 1.1-1.5s 0.86-1.07s

~20-30% faster on the medium model.

Test plan

  • make whisper — cmake clone + build succeeds
  • make test — all 937 tests pass
  • make lint && make vet && make fix && make format && go mod tidy — CI checks pass
  • Benchmark with ggml-small.bin and ggml-medium.en.bin — performance equal or better
  • CI passes on Linux and Windows

🤖 Generated with Claude Code

dharmab and others added 4 commits March 23, 2026 19:26
Switch from dharmab/whisper.cpp fork (v1.7.2-windows-fix) to upstream
ggml-org/whisper.cpp v1.8.4. The Windows build fix from the fork is now
in upstream.

- Replace Make-based build with CMake
- Update LIBRARY_PATH for new cmake output layout (split ggml libraries)
- Add CGO_LDFLAGS=-fopenmp on macOS for ggml-cpu OpenMP linkage
- Pass CMAKE_C_COMPILER/CMAKE_CXX_COMPILER on macOS for Homebrew LLVM
- Add cmake to all platform dependency install targets and CI
- Update Go module to v1.8.4 bindings
- Adapt Process() call for new 4-argument signature (added EncoderBeginCallback)

Benchmarked on M4 MacBook Air: small model 0.26-0.46s (baseline 0.35-0.5s),
medium model 0.86-1.07s (baseline 1.1-1.5s) — ~20-30% faster on medium.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
macOS: Add -Wno-elaborated-enum-base to suppress Homebrew LLVM errors
from Apple SDK headers (vDSP.h) when compiling ggml-blas.

Windows: Force "MSYS Makefiles" generator and CMAKE_STATIC_LIBRARY_PREFIX=lib
so CMake outputs libggml.a instead of ggml.a, matching what -lggml expects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CMake on MSYS2 outputs ggml.a, ggml-base.a, ggml-cpu.a without the
"lib" prefix. CMAKE_STATIC_LIBRARY_PREFIX doesn't propagate to the ggml
subdirectory. Instead, rename any .a files missing the prefix after build
so the linker's -lggml flags can find them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant