From a7cdb545540e9bf04d65a06957327e5ed2e44f7f Mon Sep 17 00:00:00 2001 From: Dave Lage Date: Tue, 6 Dec 2022 19:57:42 -0500 Subject: [PATCH] Update readme with new usage --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a04d5fb..d05270b 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,14 @@ Rust bindings to [whisper.cpp](https://github.com/ggerganov/whisper.cpp/) ## Usage ```rust +use whisper_rs::{WhisperContext, FullParams, SamplingStrategy}; + fn main() { // load a context and model let mut ctx = WhisperContext::new("path/to/model").expect("failed to load model"); // create a params object - let mut params = FullParams::new(DecodeStrategy::Greedy { n_past: 0 }); + let mut params = FullParams::new(SamplingStrategy::Greedy { n_past: 0 }); // assume we have a buffer of audio data // here we'll make a fake one, floating point samples, 32 bit, 16KHz, mono