-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Added Whisper Factory Options #302
Conversation
96a8d4a
to
401244a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (4)
- Whisper.net/Ggml/GgmlType.cs: Evaluated as low risk
- Whisper.net/LibraryLoader/RuntimeOptions.cs: Evaluated as low risk
- Whisper.net/WhisperFactory.cs: Evaluated as low risk
- Whisper.net/Internals/Native/Data.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)
Whisper.net/Internals/ModelLoader/ModelLoaderUtils.cs:30
- The ArgumentOutOfRangeException should include a more descriptive error message.
throw new ArgumentOutOfRangeException(nameof(preset), preset, null);
Whisper.net/Internals/ModelLoader/WhisperProcessorModelFileLoader.cs:33
- The variable 'aheadsHandle' is being redefined unnecessarily. It should use the existing 'aheadsHandle' field.
ModelLoaderUtils.GetWhisperAlignmentHeads(options.CustomAlignmentHeads, out var aheadsHandle);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 9 changed files in this pull request and generated 1 comment.
Files not reviewed (4)
- Whisper.net/Ggml/GgmlType.cs: Evaluated as low risk
- Whisper.net/WhisperFactory.cs: Evaluated as low risk
- Whisper.net/LibraryLoader/RuntimeOptions.cs: Evaluated as low risk
- Whisper.net/Internals/Native/Data.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
Whisper.net/WhisperAlignmentHeads.cs:68
- [nitpick] The parameter names
textLayer
andhead
should follow the naming convention and be renamed toTextLayer
andHead
respectively.
public readonly struct WhisperAlignmentHead(int textLayer, int head)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.
Files not reviewed (4)
- Whisper.net/Ggml/GgmlType.cs: Evaluated as low risk
- Whisper.net/LibraryLoader/RuntimeOptions.cs: Evaluated as low risk
- Whisper.net/Internals/ModelLoader/WhisperProcessorModelBufferLoader.cs: Evaluated as low risk
- Whisper.net/Internals/Native/Data.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
Whisper.net/WhisperAlignmentHeads.cs:70
- [nitpick] The property name 'TextLayer' is ambiguous. It should be renamed to 'LayerIndex' for better clarity.
public int TextLayer { get; } = textLayer;
As the options for creating a WhisperFactory were growing, took the initiative to migrate some of the options that are reusable to WhisperFactoryOptions and removing them from RuntimeOptions.
Now, RuntimeOptions remains only for Library loading (whisper.cpp Runtime) and any other options like GPU device, DTW options, etc. can be defined for each factory independent on the library itself.