nixos-configs/nixosModules/wyoming-plus/pkgs/openwakeword.nix

44 lines
944 B
Nix
Raw Normal View History

2024-09-12 18:21:31 -04:00
{
fetchFromGitHub,
fetchpatch,
python3Packages,
speexdsp-ns,
...
}:
python3Packages.buildPythonApplication rec {
pname = "openwakeword";
version = "0.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "dscripka";
repo = "openWakeWord";
rev = "v${version}";
hash = "sha256-QsXV9REAHdP0Y0fVZuU+Gt9+gcPMB60bc3DOMDYuaDM=";
};
# Patch upstream to enable use of full tensorflow dep
pythonRemoveDeps = ["tflite-runtime"];
patches = [
(fetchpatch {
url = "https://github.com/dscripka/openWakeWord/pull/178/commits/99cd87e8898348255e864540e43bab17ce0576d6.patch";
hash = "sha256-xveMBZTcYfT8LKiiStqYjjOdUOM/v4taQzSewo97Bfc=";
})
];
nativeBuildInputs = with python3Packages; [
setuptools
];
propagatedBuildInputs =
(with python3Packages; [
onnxruntime
tensorflow-bin
tqdm
scipy
scikit-learn
requests
])
++ [speexdsp-ns];
}