Merge pull request #101 from codesoda/grammar-fixes

This commit is contained in:
Niko 2023-11-24 16:23:16 +00:00 committed by GitHub
commit 1ad60ec994
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -14,6 +14,7 @@ pub use standalone::*;
pub use utilities::*; pub use utilities::*;
pub use whisper_ctx::WhisperContext; pub use whisper_ctx::WhisperContext;
pub use whisper_ctx::WhisperContextParameters; pub use whisper_ctx::WhisperContextParameters;
pub use whisper_grammar::{WhisperGrammarElement, WhisperGrammarElementType};
pub use whisper_params::{FullParams, SamplingStrategy}; pub use whisper_params::{FullParams, SamplingStrategy};
pub use whisper_state::WhisperState; pub use whisper_state::WhisperState;

View file

@ -551,7 +551,7 @@ impl WhisperContextParameters {
pub fn new() -> Self { pub fn new() -> Self {
Self::default() 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.use_gpu = use_gpu;
self self
} }