2023-05-04 23:49:17 +03:00
|
|
|
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:
|
2023-05-14 07:16:14 +03:00
|
|
|
libsdl.org: '*'
|
2023-05-04 23:49:17 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
freedesktop.org/pkg-config: ~0.29
|
|
|
|
gnu.org/patch: '*'
|
2023-11-22 01:41:31 +03:00
|
|
|
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 }}
|
|
|
|
|
2023-11-22 01:41:31 +03:00
|
|
|
# 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
|
|
|
|
2023-11-22 01:41:31 +03:00
|
|
|
- install -D main {{prefix}}/bin/whisper.cpp
|
|
|
|
|
|
|
|
- install -D examples/command/commands.txt {{prefix}}/share/whisper.cpp/commands.txt
|
2023-05-04 23:49:17 +03:00
|
|
|
|
|
|
|
test:
|
2023-11-22 01:41:31 +03:00
|
|
|
env:
|
|
|
|
cache: $HOME/.cache/huggingface
|
2023-05-04 23:49:17 +03:00
|
|
|
script: |
|
2023-11-22 01:41:31 +03:00
|
|
|
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
|