1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 wheel, 7 asteroid-filterbanks, 8 einops, 9 huggingface-hub, 10 pytorch-lightning, 11 omegaconf, 12 pyannote-core, 13 pyannote-database, 14 pyannote-metrics, 15 pyannote-pipeline, 16 pytorch-metric-learning, 17 rich, 18 semver, 19 soundfile, 20 speechbrain, 21 tensorboardx, 22 torch, 23 torch-audiomentations, 24 torchaudio, 25 torchmetrics, 26 numpy, 27 pyscaffold, 28}: 29 30buildPythonPackage rec { 31 pname = "pyannote-audio"; 32 version = "3.1.1"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "pyannote"; 37 repo = "pyannote-audio"; 38 rev = version; 39 hash = "sha256-BxmEJE6v+QkEaAJ2oB2LwDQIoRajv6F9SRc8lP9iRLM="; 40 fetchSubmodules = true; 41 }; 42 43 nativeBuildInputs = [ 44 pyscaffold 45 setuptools 46 wheel 47 ]; 48 49 postPatch = '' 50 substituteInPlace setup.cfg \ 51 --replace "pyscaffold>=3.2a0,<3.3a0" "pyscaffold" 52 substituteInPlace requirements.txt \ 53 --replace "lightning" "pytorch-lightning" 54 ''; 55 56 propagatedBuildInputs = [ 57 asteroid-filterbanks 58 einops 59 huggingface-hub 60 omegaconf 61 pyannote-core 62 pyannote-database 63 pyannote-metrics 64 pyannote-pipeline 65 pytorch-metric-learning 66 rich 67 semver 68 soundfile 69 speechbrain 70 tensorboardx 71 torch 72 torch-audiomentations 73 torchaudio 74 torchmetrics 75 numpy 76 pytorch-lightning 77 ]; 78 79 pythonImportsCheck = [ "pyannote.audio" ]; 80 81 meta = with lib; { 82 description = "Neural building blocks for speaker diarization: speech activity detection, speaker change detection, overlapped speech detection, speaker embedding"; 83 homepage = "https://github.com/pyannote/pyannote-audio"; 84 changelog = "https://github.com/pyannote/pyannote-audio/blob/${src.rev}/CHANGELOG.md"; 85 license = licenses.mit; 86 maintainers = with maintainers; [ ]; 87 }; 88}