vosk-api icon indicating copy to clipboard operation
vosk-api copied to clipboard

How can I implement Ruby client?

Open okuramasafumi opened this issue 1 year ago • 9 comments

Hi, I'm wondering if I could implement a Ruby client for Vosk. How should we process the development? Should we develop it in separate repository or should we write code in this repository and send a PR?

okuramasafumi avatar Jul 13 '22 11:07 okuramasafumi

Hi. A PR would be welcome! Both bindings for vosk-api and client example for vosk-server

nshmyrev avatar Jul 13 '22 11:07 nshmyrev

For API you can use https://github.com/ffi/ffi I suppose. For server https://github.com/imanel/websocket-ruby

nshmyrev avatar Jul 13 '22 11:07 nshmyrev

@nshmyrev Thank you, I'll take a look at Python code for a close example. If I have any question, I'll post it here.

okuramasafumi avatar Jul 13 '22 11:07 okuramasafumi

Sure, let us know please

nshmyrev avatar Jul 13 '22 11:07 nshmyrev

I even created a template

https://github.com/alphacep/vosk-api/tree/master/ruby

and also pushed to rubygems:

https://rubygems.org/gems/vosk

nshmyrev avatar Jul 13 '22 12:07 nshmyrev

Nice, after adding real code please add me to collaborators in rubygems!

okuramasafumi avatar Jul 13 '22 12:07 okuramasafumi

I added you as an owner! Thank you

nshmyrev avatar Jul 13 '22 12:07 nshmyrev

Should I build libvosk to test against it?

okuramasafumi avatar Jul 13 '22 13:07 okuramasafumi

You'd better download prebuilt library in releases:

https://github.com/alphacep/vosk-api/releases/tag/v0.3.42

nshmyrev avatar Jul 13 '22 13:07 nshmyrev