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

Disallow invalid --language values #116

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

jkrukowski
Copy link
Contributor

Should resolve #103

In this PR:

Minor improvements:

  • allLanguageTokens becomes a set and a part of WhisperTokenizer protocol
  • allLanguageTokens is computed just once -- this property is used in text decoding, computing it for every decoding operation might be expensive

Copy link
Contributor

@ZachNagengast ZachNagengast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Sources/WhisperKit/Core/TextDecoder.swift Show resolved Hide resolved
@ZachNagengast ZachNagengast merged commit 3c28537 into argmaxinc:main Apr 15, 2024
7 of 9 checks passed
@jkrukowski jkrukowski deleted the disallow-invalid-lang-values branch April 15, 2024 19:56
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.

Disallow invalid --language values
2 participants