From e4ac7e7cc955bda093456a5a8d776aa0e74364fa Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 6 Jan 2025 10:25:29 -0500 Subject: [PATCH] fix(whisper.cpp) closes #8318 --- .../ggerganov/whisper.cpp/package.yml | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/projects/github.com/ggerganov/whisper.cpp/package.yml b/projects/github.com/ggerganov/whisper.cpp/package.yml index 90f1d128d0..018f14a6a0 100644 --- a/projects/github.com/ggerganov/whisper.cpp/package.yml +++ b/projects/github.com/ggerganov/whisper.cpp/package.yml @@ -11,11 +11,13 @@ platforms: provides: - bin/whisper.cpp + - bin/whisper-cli dependencies: libsdl.org: '*' linux: openmp.llvm.org: 18 # as of 1.7.0 + gnu.org/gcc/libstdcxx: 14 companions: huggingface.co: '*' @@ -45,14 +47,29 @@ build: - run: cp ggml/src/ggml-metal.metal {{prefix}}/bin if: '>=1.7<1.7.3' + # deprecation warning blocks valid bin names for some reason + - run: sed -i 's/add_subdirectory(deprecation-warning)/#add_subdirectory(deprecation-warning)/' CMakeLists.txt + working-directory: examples + if: '>=1.7.4' + - 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' + - run: install -D main {{prefix}}/bin/whisper-cli + working-directory: build/bin + if: '=1.7.3' + + - run: install -D whisper-cli {{prefix}}/bin/whisper-cli + working-directory: build/bin + if: '>=1.7.4' + + - run: ln -s whisper-cli whisper.cpp + working-directory: ${{prefix}}/bin + - 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 @@ -62,5 +79,5 @@ test: 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" - + - curl https://github.com/ggerganov/whisper.cpp/raw/master/samples/jfk.wav | whisper-cli --model "$model" - cache: $HOME/.cache/huggingface