Skip to content

Commit

Permalink
whisperkit-cli 0.4.0 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrukowski committed Mar 17, 2024
1 parent 0cf311a commit 8e7895f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Formula/w/whisperkit-cli.rb
@@ -0,0 +1,41 @@
class WhisperkitCli < 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.4.0",
revision: "59cb8516c708e3e2f18198002600026b5a1135ca"
license "MIT"

depends_on xcode: ["15.0", :build]
depends_on :macos
depends_on macos: :ventura
uses_from_macos "swift"

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

test do

Check failure on line 19 in Formula/w/whisperkit-cli.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

`brew test --verbose whisperkit-cli` failed on macOS Sonoma (14)!

isperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0588 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0000 / Completed: 0 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.0618 / Completed: 1 of 17 <NSProgress: 0x6000010f3580> : Parent: 0x6000010fc000 (portion: 1) / Fraction completed: 0.0500 / Completed: 5 of 100 [WhisperKit] <NSProgress: 0x6000010fc000> : Parent: 0x0 (portion: 0) / Fraction completed: 0.1176 / Completed: 2 of 17 <NSProgress: 0x6000010f9e00> : Parent: 0x6000010fc000 (
mkdir_p "#{testpath}/tokenizer"
mkdir_p "#{testpath}/model"
whisperkit_command = [
"#{bin}/whisperkit-cli",
"transcribe",
"--model",
"tiny",
"--download-model-path",
"#{testpath}/model",
"--download-tokenizer-path",
"#{testpath}/tokenizer",
"--audio-path",
test_fixtures("test.mp3"),
"--audio-encoder-compute-units",
"cpuOnly",
"--text-decoder-compute-units",
"cpuOnly",
"--verbose",
].join(" ")
assert_includes shell_output(whisperkit_command), "Transcription:"
end
end

0 comments on commit 8e7895f

Please sign in to comment.