-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Golang bindings #269
Comments
Ive already made a start on this..
its not pretty, and id call myself "proficient" with go, but I've likely
done things that are not best practice.
Take a look, and submit pull requests as you like.
Once we have something good enough, ill be submitting back to ggerganov for
sure.
https://github.com/jaybinks/whisper.cpp/tree/master/bindings/go_whisper
I should also note, but I bumped in to someone else's effort for
whisper.cpp go bindings that seemed fairly advanced.
however Im struggling to find that URL right now, ill share it if / when I
find it again.
…On Tue, 13 Dec 2022 at 16:40, Chris Ward ***@***.***> wrote:
Just keen to see these, and I'm now looking how to make this happen - I'm
fairly new to this part of Go. Would anyone like to collaborate?
Ideally I'd like to be able to fire off set commands to Whisper and have
it trigger actions - a pretty standard affair, but not sure how to begin?
Chris
—
Reply to this email directly, view it on GitHub
<#269>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALQR65A4RQTBWQWJFONSTTWNAK65ANCNFSM6AAAAAAS42GCNE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Sincerely
Jay
|
I created the beginnings of some "golang" bindings here: https://github.com/djthorpe/go-whisper Specifically, the "sys/whisper" directory is staight bindings to the function calls in whisper.cpp and a more golang-style interface under "pkg/whisper". All needs a lot more work and some tests however. |
Here we go ... thankyou David !!
I think yours was the one that I bumped into.
This was the first time id implemented a C library in Go so I wanted to
keep playing around with that a bit more,
I also wasn't sure just how mature yours was, so I wasn't sure if I wanted
to wrap the C Calls in a class (that may or may not have been good for my
purpose) or just work directly with the underlying C calls.
Also, if I was being REALLY pedantic ...
id probably also call out that your code is pulls in a few other
dependencies that id try and minimise (my personal opinion)
EG : sdl2, stretchr/testify, djthorpe/go-errors (sdl2 makes sense if its
just for the streaming example I guess )
That all being said ... your addition of stream.go and main.go as well as
test cases etc etc
FAR outweighs anything I've done or contributed, and id suggest we adopt
your whisper.cpp go module and contribute to enhancing it !
Are you happy to merge it back in to ggerganov 's repo
…On Tue, 13 Dec 2022 at 20:14, David Thorpe ***@***.***> wrote:
I created the beginnings of some "golang" bindings here:
https://github.com/djthorpe/go-whisper
Specifically, the "sys/whisper" directory is staight bindings to the
function calls in whisper.cpp and a more golang-style interface under
"pkg/whisper". All needs a lot more work and some tests however.
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALQR62QVGSD37LASOFONMLWNBD7DANCNFSM6AAAAAAS42GCNE>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Sincerely
Jay
|
Well I took a bit of a different approach, but how about this... I'll clone your repository https://github.com/jaybinks/whisper.cpp and copy in my sys/whisper implementation into there. I'll send you a pull request, and when you're satisfied you can then send a pull request to the original author? I think that way, you can continue to have a say in how these get merged in? I should have some time over the next week. LMK what you think. |
Well done guys! I can assist by helping with testing and writing some quick apps/docs! |
Because your repo was so out-of-date @jaybinks I just made a PR directly against Georgi's. |
Awesome stuff David.
…On Sun, 18 Dec 2022 at 20:39, David Thorpe ***@***.***> wrote:
Because your repo was so out-of-date @jaybinks
<https://github.com/jaybinks> I just made a PR directly against Georgi's.
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALQR65B5FTBB5X2SMIOTHDWN3SUJANCNFSM6AAAAAAS42GCNE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Sincerely
Jay
|
@ggerganov probably worth closing this issue now that the go bindings (albeit early version) are merged (thanks!). If you have future issues around the go bindings, feel free to assign me and I will take a look. |
I just added a reference to the bindings in the main README.md and created a Github Discussion for future discussions on this topic: Thanks again for the contributions! |
Just keen to see these, and I'm now looking how to make this happen - I'm fairly new to this part of Go. Would anyone like to collaborate?
Ideally I'd like to be able to fire off set commands to Whisper and have it trigger actions - a pretty standard affair, but not sure how to begin?
Chris
The text was updated successfully, but these errors were encountered: