38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ pkgs ? import <nixpkgs> { } }:
|
|
pkgs.python3Packages.buildPythonPackage {
|
|
pname = "whisperx";
|
|
version = "2024-08-19";
|
|
# pypi doesn't have the requirements.txt file, and it's required
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "m-bain";
|
|
repo = "whisperX";
|
|
rev = "9e3a9e0e38fcec1304e1784381059a0e2c670be5"; # git doesn't have tags
|
|
hash = "sha256-IVtn9fe/yi4+fbH57s9LoiREnMZ2nhEObp1a4R/7gHg=";
|
|
};
|
|
pyproject = true;
|
|
dependencies = [
|
|
pkgs.python3Packages.torch
|
|
pkgs.python3Packages.torchaudio
|
|
(pkgs.python3Packages.faster-whisper.overrideAttrs (old: {
|
|
# 1.0.2 is actually breaking APIs (requires hotwords argument)
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "SYSTRAN";
|
|
repo = "faster-whisper";
|
|
rev = "v1.0.0";
|
|
hash = "sha256-0fE8X1d6CgDrrHtRudksN/tIGRtBKMvoNwkSVyFNda4=";
|
|
};
|
|
}))
|
|
pkgs.python3Packages.transformers
|
|
pkgs.python3Packages.pyannote-audio # Not in the requirements.txt for some reason
|
|
pkgs.python3Packages.pandas
|
|
pkgs.python3Packages.nltk
|
|
];
|
|
build-system = [
|
|
pkgs.python3Packages.setuptools
|
|
];
|
|
pythonImportsCheck = [
|
|
"whisperx"
|
|
];
|
|
}
|
|
|