2024-12-20 02:29:24 -05:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
onnxruntime,
|
|
|
|
python3Packages,
|
|
|
|
wyoming-openwakeword,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) makeLibraryPath;
|
|
|
|
in
|
|
|
|
wyoming-openwakeword.overridePythonAttrs (o: {
|
|
|
|
version = o.version + "-vad";
|
2024-12-15 17:14:49 -05:00
|
|
|
|
2024-12-20 02:29:24 -05:00
|
|
|
# https://github.com/rhasspy/wyoming-openwakeword/pull/17
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rhasspy";
|
|
|
|
repo = "wyoming-openwakeword";
|
|
|
|
rev = "8e679a592f5862d67a7b688d3f711b468e4b1f93";
|
|
|
|
hash = "sha256-sP0i2ghcTpuuZbVTsAFw527y2oaJIH9OolQtKjkYC2E=";
|
|
|
|
};
|
2024-12-15 17:14:49 -05:00
|
|
|
|
2024-12-20 02:29:24 -05:00
|
|
|
buildInputs =
|
|
|
|
(o.buildInputs or [])
|
|
|
|
++ [onnxruntime];
|
2024-12-15 17:14:49 -05:00
|
|
|
|
2024-12-20 02:29:24 -05:00
|
|
|
propagatedBuildInputs =
|
|
|
|
(o.propagatedBuildInputs or [])
|
|
|
|
++ [python3Packages.onnxruntime];
|
|
|
|
|
|
|
|
# Native onnxruntime lib used by Python module onnxruntime can't find its other libs without this
|
|
|
|
makeWrapperArgs = [
|
|
|
|
''--prefix LD_LIBRARY_PATH : "${makeLibraryPath [onnxruntime]}"''
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
cp -ar ./wyoming_openwakeword/models/silero_vad.onnx $out/lib/python*/site-packages/wyoming_openwakeword/models
|
|
|
|
'';
|
|
|
|
})
|