argmaxinc / WhisperKit

On-device Speech Recognition for Apple Silicon
http://argmaxinc.com/blog/whisperkit
MIT License
3.92k stars 331 forks source link

Publish WhisperKit CLI on Homebrew #36

Closed atiorh closed 8 months ago

atiorh commented 8 months ago

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.

jkrukowski commented 8 months ago

I can give it a try

ZachNagengast commented 8 months ago

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

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 commented 8 months ago

@ZachNagengast I'm gonna take the following steps here

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> ...]

Some questions here:

ZachNagengast commented 8 months ago

This plan sounds great @jkrukowski thanks for the research here

atiorh commented 8 months ago

Thanks @jkrukowski!

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