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

WhisperKit CLI cleanup #68

Merged
merged 9 commits into from
Mar 12, 2024
Merged

Conversation

jkrukowski
Copy link
Contributor

@jkrukowski jkrukowski commented Mar 11, 2024

Before taking on #36 I decided to do a little cleanup in the CLI

  • moved command line arguments to a separate WhisperKitArguments struct
  • extracted a separate transcribe subcommand
  • changed executable name to whisper-kit

so rn in order to run the transcribe command the user has to type swift run whisper-kit transcribe
It's going to be convenient if we're going to add more subcommands in future (e.g. swift run whisper-kit translate)

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.

Good thinking in general with the cleanup, however this will break quite a bit of our benchmark/eval code as is, because it calls this function from python as a shell command, and would require updating all of that as well. If this is a blocker for the homebrew PR then we should discuss further, otherwise it would be ideal to keep the interfaces the same.

Sources/WhisperKitCLI/WhisperKitArguments.swift Outdated Show resolved Hide resolved
Sources/WhisperKitCLI/transcribe.swift Outdated Show resolved Hide resolved
Sources/WhisperKitCLI/Utils.swift Outdated Show resolved Hide resolved
@jkrukowski
Copy link
Contributor Author

Good thinking in general with the cleanup, however this will break quite a bit of our benchmark/eval code as is, because it calls this function from python as a shell command, and would require updating all of that as well. If this is a blocker for the homebrew PR then we should discuss further, otherwise it would be ideal to keep the interfaces the same.

Sounds fair. I could potentially add a PR in https://github.com/argmaxinc/whisperkittools repo to accommodate for these changes but I understand the concern. I reverted the renaming part, please take a 2nd look @ZachNagengast

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 great, will merge once tests pass 💯

@ZachNagengast ZachNagengast merged commit eca4a2e into argmaxinc:main Mar 12, 2024
2 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.

None yet

2 participants