diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-12-25 00:02:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-25 00:02:15 +0000 |
commit | 88b151ed65f145dd1939bfc16cd3fa25a9321020 (patch) | |
tree | 2fdd7ad1c0377d6f6fc1e012ad02cb9646d9c331 /pkgs/tools/audio | |
parent | 33c8153ba7780ea69c678acd740305cc4a346089 (diff) | |
parent | 65a62c9f75dc97714f836cae40656c254261f7a3 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/openai-whisper-cpp/default.nix | 7 | ||||
-rw-r--r-- | pkgs/tools/audio/openai-whisper-cpp/download-models.patch | 10 |
2 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/tools/audio/openai-whisper-cpp/default.nix b/pkgs/tools/audio/openai-whisper-cpp/default.nix index f19425201cde2..eac34e30b08c0 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/default.nix +++ b/pkgs/tools/audio/openai-whisper-cpp/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "whisper-cpp"; - version = "1.4.2"; + version = "1.5.2"; src = fetchFromGitHub { owner = "ggerganov"; repo = "whisper.cpp"; rev = "refs/tags/v${version}" ; - hash = "sha256-Qea9zGLJ41D+l8h1Sg/KJI6Ou02jtbRIxYPGoabM8nY="; + hash = "sha256-7pJbROifDajBJUE07Nz8tARB901fWCB+TS4okcnEsvc="; }; # The upstream download script tries to download the models to the @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { WHISPER_COREML_ALLOW_FALLBACK = "1"; }; - makeFlags = [ "main" "stream" ]; + makeFlags = [ "main" "stream" "command" ]; installPhase = '' runHook preInstall @@ -44,6 +44,7 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cp ./main $out/bin/whisper-cpp cp ./stream $out/bin/whisper-cpp-stream + cp ./command $out/bin/whisper-cpp-command cp models/download-ggml-model.sh $out/bin/whisper-cpp-download-ggml-model diff --git a/pkgs/tools/audio/openai-whisper-cpp/download-models.patch b/pkgs/tools/audio/openai-whisper-cpp/download-models.patch index 39cb00c3a0c39..c470231b59e89 100644 --- a/pkgs/tools/audio/openai-whisper-cpp/download-models.patch +++ b/pkgs/tools/audio/openai-whisper-cpp/download-models.patch @@ -19,18 +19,18 @@ index 749b409..831f4c0 100755 -models_path="$(get_script_path)" - # Whisper models - models=( "tiny.en" "tiny" "base.en" "base" "small.en" "small" "medium.en" "medium" "large-v1" "large" ) - -@@ -54,8 +42,6 @@ fi + models=( + "tiny.en" +@@ -82,8 +70,6 @@ fi printf "Downloading ggml model $model from '$src' ...\n" --cd $models_path +-cd "$models_path" - if [ -f "ggml-$model.bin" ]; then printf "Model $model already exists. Skipping download.\n" exit 0 -@@ -77,7 +63,7 @@ if [ $? -ne 0 ]; then +@@ -105,7 +91,7 @@ if [ $? -ne 0 ]; then exit 1 fi |