Cargo fmt
This commit is contained in:
parent
8d462f5dd3
commit
81e2b0476b
2 changed files with 5 additions and 6 deletions
|
|
@ -11,8 +11,9 @@ fn main() -> Result<(), &'static str> {
|
||||||
// Load a context and model.
|
// Load a context and model.
|
||||||
let ctx = WhisperContext::new_with_params(
|
let ctx = WhisperContext::new_with_params(
|
||||||
"example/path/to/model/whisper.cpp/models/ggml-base.en.bin",
|
"example/path/to/model/whisper.cpp/models/ggml-base.en.bin",
|
||||||
WhisperContextParameters::default()
|
WhisperContextParameters::default(),
|
||||||
).expect("failed to load model");
|
)
|
||||||
|
.expect("failed to load model");
|
||||||
// Create a state
|
// Create a state
|
||||||
let mut state = ctx.create_state().expect("failed to create key");
|
let mut state = ctx.create_state().expect("failed to create key");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,8 @@ use whisper_rs::{FullParams, SamplingStrategy, WhisperContext, WhisperContextPar
|
||||||
// more dependencies than the base library.
|
// more dependencies than the base library.
|
||||||
pub fn usage() -> Result<(), &'static str> {
|
pub fn usage() -> Result<(), &'static str> {
|
||||||
// load a context and model
|
// load a context and model
|
||||||
let ctx = WhisperContext::new_with_params(
|
let ctx = WhisperContext::new_with_params("path/to/model", WhisperContextParameters::default())
|
||||||
"path/to/model",
|
.expect("failed to load model");
|
||||||
WhisperContextParameters::default()
|
|
||||||
).expect("failed to load model");
|
|
||||||
// make a state
|
// make a state
|
||||||
let mut state = ctx.create_state().expect("failed to create state");
|
let mut state = ctx.create_state().expect("failed to create state");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue