-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Is the Go binding still being maintained? #2689
Comments
When migrating to CMake ~241214 , the libwhisper.a target was not included in the migration The Go code isn’t written by someone used to Go trying to avoid allocations. Working bindings are really helpful to test things |
I managed to build whisper v1.7.4, link it and run it with this: cmake ./whisper.cpp -B ./whisper.cpp/build
cmake --build ./whisper.cpp/build --config Release
WHISPER_DIR=$(abspath ../whisper.cpp)
INCLUDE_PATH=$(WHISPER_DIR)/include:$(WHISPER_DIR)/ggml/include
LIBRARY_PATH=$(WHISPER_DIR)/build/src/
C_INCLUDE_PATH="${INCLUDE_PATH}" LIBRARY_PATH="${LIBRARY_PATH}" LD_LIBRARY_PATH="${LIBRARY_PATH}" go run main.go |
On macOS 15.2 M that did not work: W='/opt/oth/whisper.cpp' C_INCLUDE_PATH="$W/include:$W/ggml/include" LIBRARY_PATH="$W/build/src" LD_LIBRARY_PATH="$LIBRARY_PATH" go run ./myGoMainDir /opt/homebrew/Cellar/go/1.23.4/libexec/pkg/tool/darwin_arm64/link: running cc failed: exit status 1 to get OpenMP on macOS:
result: find /opt/oth/whisper.cpp -name libwhisper.1.dylib |
Go bindings macOS 15.2 M 250109 hash 2ab2eb5 whisper.cpp with Core ML and OpenMP// run Go code using whisper.cpp as library// use model large-v3-turbo whisper_init_state: loading Core ML model from '/opt/oth/whisper.cpp/models/ggml-large-v3-turbo-encoder.mlmodelc' |
The documentation's sample code doesn't seem to even use the methods provided by the Context object. It has |
The Go package documentation outlines what is possible: Looking at this naive Go code, you can implement whatever you need:
sample-code invokes NewContext here:
For some reason, Context configuration is with flag parsing:
|
The download URL in the go binding sample |
Hi there,
Is the Go binding for whisper.cpp still being maintained?
Currently, the documentation for the Go binding contains many errors. Following the documentation, it’s even impossible to compile the basic libwhisper.a. It seems that the core code of whisper.cpp has undergone significant changes, but the Go binding hasn’t been updated accordingly.
I sincerely hope the authors or contributors could update the Go binding. If there’s anything I can help with, please feel free to let me know.
Personally, I believe that, besides C++, Golang is one of the most suitable programming languages for tasks like this. I really hope the Go binding will continue to be maintained and improved.
Thank you very much!
The text was updated successfully, but these errors were encountered: