depot/third_party/nixpkgs/pkgs/development/python-modules/faster-whisper/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

58 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
# dependencies
, av
, ctranslate2
, huggingface-hub
, onnxruntime
, tokenizers
# tests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "faster-whisper";
version = "0.10.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "guillaumekln";
repo = "faster-whisper";
rev = "refs/tags/${version}";
hash = "sha256-qcpPQv5WoUkT92/TZ+MMq452FgPNcm3ZZ+ZNc0btOGE=";
};
propagatedBuildInputs = [
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/guillaumekln/faster-whisper/releases/tag/${version}";
description = "Faster Whisper transcription with CTranslate2";
homepage = "https://github.com/guillaumekln/faster-whisper";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}