1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 stdenv,
6
7 # build-system
8 pybind11,
9 setuptools,
10
11 # native dependencies
12 abseil-cpp,
13 darwin,
14
15 # tests
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "webrtc-noise-gain";
21 version = "1.2.3";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "rhasspy";
26 repo = "webrtc-noise-gain";
27 rev = "v${version}";
28 hash = "sha256-DFEtuO49zXNixLwBjQ/WOiARDhMAXVH+5hfc3eSdPIo=";
29 };
30
31 nativeBuildInputs = [
32 pybind11
33 setuptools
34 ];
35
36 buildInputs = [
37 abseil-cpp
38 ] ++ lib.optionals (stdenv.isDarwin) [ darwin.apple_sdk.frameworks.CoreServices ];
39
40 pythonImportsCheck = [ "webrtc_noise_gain" ];
41
42 nativeCheckInputs = [ pytestCheckHook ];
43
44 meta = with lib; {
45 description = "Tiny wrapper around webrtc-audio-processing for noise suppression/auto gain only";
46 homepage = "https://github.com/rhasspy/webrtc-noise-gain";
47 changelog = "https://github.com/rhasspy/webrtc-noise-gain/blob/${src.rev}/CHANGELOG.md";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}