diff --git a/src/lib.rs b/src/lib.rs index ed17306..70b6d46 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,7 @@ pub use standalone::*; pub use utilities::*; pub use whisper_ctx::WhisperContext; pub use whisper_ctx::WhisperContextParameters; +pub use whisper_grammar::{WhisperGrammarElement, WhisperGrammarElementType}; pub use whisper_params::{FullParams, SamplingStrategy}; pub use whisper_state::WhisperState; diff --git a/src/whisper_ctx.rs b/src/whisper_ctx.rs index eaa8302..330391e 100644 --- a/src/whisper_ctx.rs +++ b/src/whisper_ctx.rs @@ -551,7 +551,7 @@ impl WhisperContextParameters { pub fn new() -> Self { Self::default() } - pub fn use_gpu(mut self, use_gpu: bool) -> Self { + pub fn use_gpu(&mut self, use_gpu: bool) -> &mut Self { self.use_gpu = use_gpu; self }