1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 stdenv,
6 pythonRelaxDepsHook,
7
8 # build-system
9 setuptools,
10
11 # dependencies
12 numpy,
13 onnxruntime,
14
15 # tests
16 pytestCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "pysilero-vad";
21 version = "1.0.0";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "rhasspy";
26 repo = "pysilero-vad";
27 rev = "fc1e3f74e6282249c1fd67ab0f65832ad1ce9cc5";
28 hash = "sha256-5jS2xZEtvzXO/ffZzseTTUHfE528W9FvKB0AKG6T62k=";
29 };
30
31 nativeBuildInputs = [
32 setuptools
33 pythonRelaxDepsHook
34 ];
35
36 pythonRelaxDeps = [ "numpy" ];
37
38 propagatedBuildInputs = [
39 numpy
40 onnxruntime
41 ];
42
43 nativeCheckInputs = [ pytestCheckHook ];
44
45 pythonImportsCheck = [ "pysilero_vad" ];
46
47 meta = with lib; {
48 # what(): /build/source/include/onnxruntime/core/common/logging/logging.h:294 static const onnxruntime::logging::Logger& onnxruntime::logging::LoggingManager::DefaultLogger() Attempt to use DefaultLogger but none has been registered.
49 broken = stdenv.isAarch64 && stdenv.isLinux;
50 description = "Pre-packaged voice activity detector using silero-vad";
51 homepage = "https://github.com/rhasspy/pysilero-vad";
52 changelog = "https://github.com/rhasspy/pysilero-vad/blob/${src.rev}/CHANGELOG.md";
53 license = licenses.mit;
54 maintainers = with maintainers; [ hexa ];
55 };
56}