pantry/projects/github.com/ggerganov/whisper.cpp/package.yml

50 lines
1.2 KiB
YAML
Raw Normal View History

distributable:
url: https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: ggerganov/whisper.cpp
platforms:
- darwin/aarch64
- linux
provides:
- bin/whisper.cpp
dependencies:
libsdl.org: '*'
build:
dependencies:
freedesktop.org/pkg-config: ~0.29
gnu.org/patch: '*'
gnu.org/coreutils: '*'
2023-11-07 22:17:11 +03:00
script:
- run: patch -p1 < props/illegal_instruction.patch
if: <1.4.3
- make --jobs {{ hw.concurrency }}
- make stream --jobs {{ hw.concurrency }}
- make command --jobs {{ hw.concurrency }}
# ggml-metal.metal must be installed alongside whisper.cpp sadly
- install -Dt {{prefix}}/bin
ggml-metal.metal
stream command
models/download-ggml-model.sh
2023-11-07 22:17:11 +03:00
- install -D main {{prefix}}/bin/whisper.cpp
- install -D examples/command/commands.txt {{prefix}}/share/whisper.cpp/commands.txt
test:
env:
cache: $HOME/.cache/huggingface
script: |
huggingface-cli download ggerganov/whisper.cpp ggml-base.en.bin
model="$(find "$cache" -name "ggml-base.en.bin")"
curl https://github.com/ggerganov/whisper.cpp/raw/master/samples/jfk.wav | whisper.cpp --model "$model" -
cache:
$HOME/.cache/huggingface