Skip to content

Commit a7cdb54

Browse files
authored
Update readme with new usage
1 parent 5fb138f commit a7cdb54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ Rust bindings to [whisper.cpp](https://github.com/ggerganov/whisper.cpp/)
44

55
## Usage
66
```rust
7+
use whisper_rs::{WhisperContext, FullParams, SamplingStrategy};
8+
79
fn main() {
810
// load a context and model
911
let mut ctx = WhisperContext::new("path/to/model").expect("failed to load model");
1012

1113
// create a params object
12-
let mut params = FullParams::new(DecodeStrategy::Greedy { n_past: 0 });
14+
let mut params = FullParams::new(SamplingStrategy::Greedy { n_past: 0 });
1315

1416
// assume we have a buffer of audio data
1517
// here we'll make a fake one, floating point samples, 32 bit, 16KHz, mono

0 commit comments

Comments
 (0)