2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
stdenv,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
pybind11,
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# native dependencies
|
|
|
|
abseil-cpp,
|
|
|
|
darwin,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "webrtc-noise-gain";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.2.4";
|
2023-10-09 19:29:22 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhasspy";
|
|
|
|
repo = "webrtc-noise-gain";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ALRdj9zBcx05DcSKjAI0oEPruTD/p+pQ0kcqqyHl37A=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pybind11
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
abseil-cpp
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [ darwin.apple_sdk.frameworks.CoreServices ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "webrtc_noise_gain" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tiny wrapper around webrtc-audio-processing for noise suppression/auto gain only";
|
|
|
|
homepage = "https://github.com/rhasspy/webrtc-noise-gain";
|
|
|
|
changelog = "https://github.com/rhasspy/webrtc-noise-gain/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|