Skip to content

Commit

Permalink
python3Packages.whisperx: init at 3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Sparks committed Feb 18, 2025
1 parent 332682c commit 8535c33
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
66 changes: 66 additions & 0 deletions pkgs/development/python-modules/whisperx/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

setuptools,

ctranslate2,
faster-whisper,
ffmpeg,
nltk,
pandas,
pyannote-audio,
torch,
torchaudio,
transformers,
}:
let
pname = "whisperX";
version = "3.3.1";
in
buildPythonPackage {
inherit pname version;
pyproject = true;

src = fetchFromGitHub {
owner = "m-bain";
repo = pname;
tag = "v${version}";
hash = "sha256-Wb9jKTs0rTdgjvcnKl1P8Uh6b5jzlkKgQBcJYA+7+W4=";
};

build-system = [ setuptools ];

dependencies = [
ctranslate2
faster-whisper
nltk
pandas
pyannote-audio
torch
torchaudio
transformers
];

pythonRelaxDeps = [
"ctranslate2"
"faster-whisper"
];

pythonImportsCheck = [ "whisperx" ];

makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}" ];

# No tests in repository
doCheck = false;

meta = {
mainProgram = "whisperx";
description = "Automatic Speech Recognition with Word-level Timestamps (& Diarization) ";

platforms = lib.platforms.all;
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ bengsparks ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18324,6 +18324,8 @@ self: super: with self; {

whispers = callPackage ../development/python-modules/whispers { };

whisperx = callPackage ../development/python-modules/whisperx { };

whitenoise = callPackage ../development/python-modules/whitenoise { };

whodap = callPackage ../development/python-modules/whodap { };
Expand Down

0 comments on commit 8535c33

Please sign in to comment.