1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 joblib, 6 matplotlib, 7 numpy, 8 pytestCheckHook, 9 scipy, 10 setuptools, 11 torch, 12 tqdm, 13}: 14 15buildPythonPackage rec { 16 pname = "noisereduce"; 17 version = "3.0.3"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "timsainb"; 22 repo = "noisereduce"; 23 tag = "v${version}"; 24 hash = "sha256-CMXbl+9L01rtsD8BZ3nNomacsChy/1EGdUdWz7Ytbjk="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 joblib 31 matplotlib 32 numpy 33 scipy 34 tqdm 35 ]; 36 37 optional-dependencies = { 38 PyTorch = [ torch ]; 39 }; 40 41 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); 42 43 pythonImportsCheck = [ "noisereduce" ]; 44 45 meta = { 46 description = "Noise reduction using spectral gating (speech, bioacoustics, audio, time-domain signals"; 47 homepage = "https://github.com/timsainb/noisereduce"; 48 changelog = "https://github.com/timsainb/noisereduce/releases/tag/${src.tag}"; 49 license = lib.licenses.mit; 50 maintainers = with lib.maintainers; [ fab ]; 51 }; 52}