1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 av, 11 ctranslate2, 12 huggingface-hub, 13 onnxruntime, 14 tokenizers, 15 16 # tests 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "faster-whisper"; 22 version = "1.2.0"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "SYSTRAN"; 27 repo = "faster-whisper"; 28 tag = "v${version}"; 29 hash = "sha256-kv2pLszImGzrPI0q2eglX//BMrj2pF0oMHnZ+7VKrHI="; 30 }; 31 32 build-system = [ 33 setuptools 34 ]; 35 36 pythonRelaxDeps = [ 37 "av" 38 "tokenizers" 39 ]; 40 41 dependencies = [ 42 av 43 ctranslate2 44 huggingface-hub 45 onnxruntime 46 tokenizers 47 ]; 48 49 pythonImportsCheck = [ "faster_whisper" ]; 50 51 # all tests require downloads 52 doCheck = false; 53 54 nativeCheckInputs = [ pytestCheckHook ]; 55 56 preCheck = '' 57 export HOME=$TMPDIR 58 ''; 59 60 meta = with lib; { 61 changelog = "https://github.com/SYSTRAN/faster-whisper/releases/tag/${src.tag}"; 62 description = "Faster Whisper transcription with CTranslate2"; 63 homepage = "https://github.com/SYSTRAN/faster-whisper"; 64 license = licenses.mit; 65 maintainers = with maintainers; [ hexa ]; 66 }; 67}