Skip to content

Commit b81c6c9

Browse files
authored
Merge pull request ggml-org#7 from rockerBOO/patch-1
Update readme with new usage
2 parents 0c84524 + a7cdb54 commit b81c6c9

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)