nixos-configs/modules/wyoming-plus/pkgs/default.nix
matt1432 ab8efa64c5
All checks were successful
Discord / discord commits (push) Has been skipped
feat(hass): support VAD for wakeword
2024-12-20 02:29:24 -05:00

38 lines
1 KiB
Nix

{
lib,
fetchFromGitHub,
onnxruntime,
python3Packages,
wyoming-openwakeword,
...
}: let
inherit (lib) makeLibraryPath;
in
wyoming-openwakeword.overridePythonAttrs (o: {
version = o.version + "-vad";
# https://github.com/rhasspy/wyoming-openwakeword/pull/17
src = fetchFromGitHub {
owner = "rhasspy";
repo = "wyoming-openwakeword";
rev = "8e679a592f5862d67a7b688d3f711b468e4b1f93";
hash = "sha256-sP0i2ghcTpuuZbVTsAFw527y2oaJIH9OolQtKjkYC2E=";
};
buildInputs =
(o.buildInputs or [])
++ [onnxruntime];
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
'';
})