push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
replaceVars,
# build-system
setuptools,
# runtime
ffmpeg-headless,
# dependencies
more-itertools,
numba,
numpy,
triton,
tiktoken,
torch,
tqdm,
# tests
pytestCheckHook,
scipy,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "whisper";
version = "20250625";
pyproject = true;
src = fetchFromGitHub {
owner = "openai";
repo = "whisper";
rev = "v${version}";
hash = "sha256-Zn2HUCor1eCJBP7q0vpffqhw5SNguz8zCGoPgdt6P+c=";
};
patches = [
(replaceVars ./ffmpeg-path.patch {
ffmpeg = ffmpeg-headless;
})
];
build-system = [ setuptools ];
dependencies = [
more-itertools
numba
numpy
tiktoken
torch
tqdm
]
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform triton) [ triton ];
nativeCheckInputs = [
pytestCheckHook
scipy
writableTmpDirAsHomeHook
];
disabledTests = [
# requires network access to download models
"test_transcribe"
# requires NVIDIA drivers
"test_dtw_cuda_equivalence"
"test_median_filter_equivalence"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
# Fatal Python error: Segmentation fault
"test_dtw"
];
meta = {
changelog = "https://github.com/openai/whisper/blob/v${version}/CHANGELOG.md";
description = "General-purpose speech recognition model";
mainProgram = "whisper";
homepage = "https://github.com/openai/whisper";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ MayNiklas ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/whisper/audio.py b/whisper/audio.py
index 4f5b6e0..bfe7924 100644
--- a/whisper/audio.py
+++ b/whisper/audio.py
@@ -44,7 +44,7 @@ def load_audio(file: str, sr: int = SAMPLE_RATE):
# and resampling as necessary. Requires the ffmpeg CLI in PATH.
# fmt: off
cmd = [
- "ffmpeg",
+ "@ffmpeg@/bin/ffmpeg",
"-nostdin",
"-threads", "0",
"-i", file,