Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional WhisperGrammar and WhisperContextParameters fixes #101

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

codesoda
Copy link
Contributor

I found 2 more issues

  • WhisperGrammar and WhisperGrammarElementType weren't exposed by lib.rs so you couldn't make an object to pass to ctx.set_grammar(Option<&[WhisperGrammarElement]>)
  • You couldn't create a custom WhisperContextParameters to pass to WhisperContext.new_with_x since you'd get a borrow checker issue as soon as you tried to call ctx_params.use_gpu(true) because it was moving the object not borrowing.

@codesoda
Copy link
Contributor Author

@tazz4843 p.s. Did you mean to make the WhisperContextParameters have a fluent API so you can chain calls (even though it only has 1 method) where as the WhisperContext (with more methods) is more flat and you have to call methods on the original object each time.

@codesoda codesoda mentioned this pull request Nov 24, 2023
@tazz4843
Copy link
Owner

I've been meaning to convert the FullParams API to be more friendly but haven't gotten around to it just yet.

@tazz4843 tazz4843 merged commit 1ad60ec into tazz4843:whisper.cpp-1.5 Nov 24, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants