adding a usage file as an example

pull/534/head
Todd Fisher 1 year ago
parent f3523d24ba
commit 24d7ec3b23
No known key found for this signature in database
GPG Key ID: 15A1619895B1FB4A

@ -0,0 +1,12 @@
# Ruby Guide
We expose Whisper::Context and Whisper::Params. The Context object can be used to transcribe.
Parameters can be set on the Params object to customize how the transcription is generated.
```
whisper = Whisper::Context.new('ggml-base.en.bin')
params = Whisper::Params.new
whisper.transcribe('jfk.wav', params) {|text|
assert_match /ask not what your country can do for you, ask what you can do for your country/, text
}
```
Loading…
Cancel
Save