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

Publish WhisperKit CLI on Homebrew #36

Closed
atiorh opened this issue Feb 27, 2024 · 5 comments
Closed

Publish WhisperKit CLI on Homebrew #36

atiorh opened this issue Feb 27, 2024 · 5 comments
Assignees
Labels
enhancement Improves existing code triaged This issue has been looked at and prioritized by a maintainer

Comments

@atiorh
Copy link
Contributor

atiorh commented Feb 27, 2024

It would be great if brew install whisperkit just works and the WhisperKit CLI target on macOS could become an out-of-the-box real-time transcription utility.

@ZachNagengast ZachNagengast added enhancement Improves existing code triaged This issue has been looked at and prioritized by a maintainer labels Feb 27, 2024
@jkrukowski
Copy link
Contributor

I can give it a try

@ZachNagengast
Copy link
Contributor

Cool! This will ideally be a github action that runs on any new release and does a couple of things:

  • Builds/tests the CLI in release mode
  • Uploads the artifact
  • Submits a PR into the homebrew repo with the new version

The last part will require a github token, so we can coordinate when you get to that point. There are some existing github actions which may be worth looking into.

@jkrukowski
Copy link
Contributor

@ZachNagengast I'm gonna take the following steps here

  • will submit manually the below WhisperKit formula to homebrew core repo.
class WhisperKit < Formula
  desc "Swift native on-device speech recognition with Whisper for Apple Silicon"
  homepage "https://github.com/argmaxinc/WhisperKit"
  url "https://github.com/argmaxinc/WhisperKit.git", tag: "v0.3.3", revision: "bfa357e897dadae0dca6314424bb119149e375d2"
  license "MIT"

  depends_on xcode: ["15.0", :build]

  def install
    system "swift", "build", "-c", "release", "--product", "transcribe", "--disable-sandbox"
    bin.install ".build/release/transcribe"
  end

  test do
    system "#{bin}/transcribe", "--help"
  end
end

it means that cli installation will be brew install whisper-kit and once installed user will be able to run it like this transcribe [<options>] [<supress-tokens> ...]

  • once the formula is merged I'll create a GitHub action to update it on every v<RELEASE_VERSION> tag

Some questions here:

  • you mentioned as well that it should "Upload the artifact", what did you mean by that?
  • let me know if the formula looks ok for so I can submit it

@ZachNagengast
Copy link
Contributor

This plan sounds great @jkrukowski thanks for the research here

  • Is there a way to make sure the install command is brew install whisperkit without the dash
  • Your plan for the github action sounds good
  • Due to unfamiliarity with homebrew I was unaware we could allow users to build the repo themselves, and assumed we'd need to compile and upload a pre-build version, so no action is needed if this works.
  • Is there a way to limit the formula to M1-M3 devices? Just curious

@atiorh
Copy link
Contributor Author

atiorh commented Mar 19, 2024

Thanks @jkrukowski!

brew install whisperkit-cli: https://x.com/zachnagengast/status/1770142591784296664?s=20

@atiorh atiorh closed this as completed Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves existing code triaged This issue has been looked at and prioritized by a maintainer
Projects
Status: Done
Development

No branches or pull requests

3 participants