depot/third_party/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

66 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonRelaxDepsHook,
# build-system
setuptools,
# dependencies
av,
ctranslate2,
huggingface-hub,
onnxruntime,
tokenizers,
# tests
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "faster-whisper";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "SYSTRAN";
repo = "faster-whisper";
rev = "refs/tags/v${version}";
hash = "sha256-O2RRwb+omgSpfckHh3oPu454g2ULT4gyolrg5olHcRc=";
};
build-system = [
setuptools
pythonRelaxDepsHook
];
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 ];
};
}