From 24d7ec3b2301958ed23108055dba78e9316c689e Mon Sep 17 00:00:00 2001 From: Todd Fisher Date: Sat, 25 Feb 2023 16:04:41 -0500 Subject: [PATCH] adding a usage file as an example --- bindings/ruby/USAGE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bindings/ruby/USAGE.md diff --git a/bindings/ruby/USAGE.md b/bindings/ruby/USAGE.md new file mode 100644 index 0000000..e56b8ad --- /dev/null +++ b/bindings/ruby/USAGE.md @@ -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 + } +```