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

fix(whisper.cpp) #8285

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions projects/github.com/ggerganov/whisper.cpp/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,50 @@ dependencies:
linux:
openmp.llvm.org: 18 # as of 1.7.0

companions:
huggingface.co: '*'

build:
dependencies:
freedesktop.org/pkg-config: ~0.29
gnu.org/patch: '*'
gnu.org/coreutils: '*'
cmake.org: 3 # as of 1.7.3
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 }}
- run:
- make --jobs {{ hw.concurrency }}
- make stream --jobs {{ hw.concurrency }}
- make command --jobs {{ hw.concurrency }}
- install -Dt {{prefix}}/bin
stream command
- install -D main {{prefix}}/bin/whisper.cpp
if: '<1.7.3'

# ggml-metal.metal must be installed alongside whisper.cpp sadly
- install -Dt {{prefix}}/bin
stream command
models/download-ggml-model.sh
- run: cp ggml-metal.metal {{prefix}}/bin
if: <1.7
- run: cp ggml/src/ggml-metal.metal {{prefix}}/bin
if: '>=1.7'
if: '>=1.7<1.7.3'

- install -D main {{prefix}}/bin/whisper.cpp
- run:
- cmake -B . -S ..
- cmake --build . --parallel {{ hw.concurrency }} --config Release
- cmake --install . --prefix {{prefix}}
- install -D bin/main {{prefix}}/bin/whisper.cpp
working-directory: build
if: '>=1.7.3'

- install -D models/download-ggml-model.sh {{prefix}}/bin/download-ggml-model.sh
- 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" -
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
Loading