depot/third_party/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

64 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
av,
ctranslate2,
huggingface-hub,
onnxruntime,
tokenizers,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "faster-whisper";
version = "1.0.3";
pyproject = true;
src = fetchFromGitHub {
owner = "SYSTRAN";
repo = "faster-whisper";
rev = "refs/tags/v${version}";
hash = "sha256-C/O+wt3dykQJmH+VsVkpQwEAdyW8goMUMKR0Z3Y7jdo=";
};
build-system = [
setuptools
];
pythonRelaxDeps = [ "tokenizers" ];
dependencies = [
av
ctranslate2
huggingface-hub
onnxruntime
tokenizers
];
pythonImportsCheck = [ "faster_whisper" ];
# all tests require downloads
doCheck = false;
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export HOME=$TMPDIR
'';
meta = with lib; {
changelog = "https://github.com/SYSTRAN/faster-whisper/releases/tag/v${version}";
description = "Faster Whisper transcription with CTranslate2";
homepage = "https://github.com/SYSTRAN/faster-whisper";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}