python310Packages.faster-whisper: init at 0.6.0
Faster Whisper transcription with CTranslate2
This commit is contained in:
parent
32f6c393a1
commit
9d1d140acf
2 changed files with 65 additions and 0 deletions
63
pkgs/development/python-modules/faster-whisper/default.nix
Normal file
63
pkgs/development/python-modules/faster-whisper/default.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
|
||||
# dependencies
|
||||
, av
|
||||
, ctranslate2
|
||||
, huggingface-hub
|
||||
, onnxruntime
|
||||
, tokenizers
|
||||
|
||||
# tests
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "faster-whisper";
|
||||
version = "0.6.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "guillaumekln";
|
||||
repo = "faster-whisper";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-tBajxrAhV7R9VnAzUr7ONAYH9h8Uh/UUeu2YZAAotBo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "onnxruntime>=1.14,<2" "onnxruntime"
|
||||
'';
|
||||
|
||||
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/v${version}";
|
||||
description = "Faster Whisper transcription with CTranslate2";
|
||||
homepage = "https://github.com/guillaumekln/faster-whisper";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
};
|
||||
}
|
|
@ -3490,6 +3490,8 @@ self: super: with self; {
|
|||
|
||||
fastentrypoints = callPackage ../development/python-modules/fastentrypoints { };
|
||||
|
||||
faster-whisper = callPackage ../development/python-modules/faster-whisper { };
|
||||
|
||||
fastimport = callPackage ../development/python-modules/fastimport { };
|
||||
|
||||
fastjet = toPythonModule (pkgs.fastjet.override {
|
||||
|
|
Loading…
Reference in a new issue