wyoming-openwakeword: 1.10.0 -> 2.0.0 (#452714)
This commit is contained in:
@@ -15,6 +15,7 @@ let
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkPackageOption
|
||||
mkRemovedOptionModule
|
||||
types
|
||||
;
|
||||
|
||||
@@ -28,8 +29,17 @@ let
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
(mkRemovedOptionModule [
|
||||
"services"
|
||||
"wymoing"
|
||||
"openwakeword"
|
||||
"preLoadModels"
|
||||
] "Passing a list of models to preload was removed in wyoming-openwakeword 2.0")
|
||||
];
|
||||
|
||||
options.services.wyoming.openwakeword = with types; {
|
||||
enable = mkEnableOption "Wyoming openWakeWord server";
|
||||
enable = mkEnableOption "Wyoming protocol server for openWakeWord wake word detection system";
|
||||
|
||||
package = mkPackageOption pkgs "wyoming-openwakeword" { };
|
||||
|
||||
@@ -50,24 +60,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
preloadModels = mkOption {
|
||||
type = listOf str;
|
||||
default = [
|
||||
"ok_nabu"
|
||||
];
|
||||
example = [
|
||||
# wyoming_openwakeword/models/*.tflite
|
||||
"alexa"
|
||||
"hey_jarvis"
|
||||
"hey_mycroft"
|
||||
"hey_rhasspy"
|
||||
"ok_nabu"
|
||||
];
|
||||
description = ''
|
||||
List of wake word models to preload after startup.
|
||||
'';
|
||||
};
|
||||
|
||||
threshold = mkOption {
|
||||
type = numbers.between 0.0 1.0;
|
||||
default = 0.5;
|
||||
@@ -91,6 +83,16 @@ in
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
refractorySeconds = mkOption {
|
||||
type = either int float;
|
||||
default = 2;
|
||||
example = 1.5;
|
||||
description = ''
|
||||
Duration in seconds before a wake word can be detected again.
|
||||
'';
|
||||
apply = toString;
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
@@ -125,11 +127,9 @@ in
|
||||
cfg.threshold
|
||||
"--trigger-level"
|
||||
cfg.triggerLevel
|
||||
"--refractory-seconds"
|
||||
cfg.refractorySeconds
|
||||
]
|
||||
++ (concatMap (model: [
|
||||
"--preload-model"
|
||||
model
|
||||
]) cfg.preloadModels)
|
||||
++ (concatMap (dir: [
|
||||
"--custom-model-dir"
|
||||
(toString dir)
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
python312Packages,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
}:
|
||||
|
||||
let
|
||||
# tensorflow-bin unsupported on Python 3.13
|
||||
python3Packages = python312Packages;
|
||||
in
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "wyoming-openwakeword";
|
||||
version = "1.10.0";
|
||||
version = "2.0.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhasspy";
|
||||
repo = "wyoming-openwakeword";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-5suYJ+Z6ofVAysoCdHi5b5K0JTYaqeFZ32Cm76wC5LU=";
|
||||
hash = "sha256-edSZ5W6oSPYLKuxjQerWRkAO/C+WeTiCosNnbS2sbh0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Expose entrypoint as wyoming-openwakeword script
|
||||
url = "https://github.com/rhasspy/wyoming-openwakeword/commit/a8c8419bc65fab07a554aa0925f898a7f3b65d79.patch";
|
||||
hash = "sha256-GSViQA01RwkFYEH7CPdU1P0EQ2ml6Vp1OukQ/0VOm+Y=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
];
|
||||
@@ -29,12 +33,8 @@ python3Packages.buildPythonApplication rec {
|
||||
"wyoming"
|
||||
];
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"tflite-runtime-nightly"
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
tensorflow-bin
|
||||
pyopen-wakeword
|
||||
wyoming
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
autoPatchelfHook,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
numpy,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyopen-wakeword";
|
||||
version = "1.0.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhasspy";
|
||||
repo = "pyopen-wakeword";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-LJ0pHP4nsTx3GPuWUwOwNuXR9tUKABqSHnLSvMlfm1Y=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
python ./script/copy_lib
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
numpy
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pyopen_wakeword"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Alternative Python library for openWakeWord";
|
||||
homepage = "https://github.com/rhasspy/pyopen-wakeword";
|
||||
changelog = "https://github.com/rhasspy/pyopen-wakeword/blob/${src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ hexa ];
|
||||
# vendors prebuilt libtensorflowlite_c.{so,dll,dylib}
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
}
|
||||
@@ -13697,6 +13697,8 @@ self: super: with self; {
|
||||
|
||||
pyomo = callPackage ../development/python-modules/pyomo { };
|
||||
|
||||
pyopen-wakeword = callPackage ../development/python-modules/pyopen-wakeword/default.nix { };
|
||||
|
||||
pyopencl = callPackage ../development/python-modules/pyopencl { };
|
||||
|
||||
pyopengl = callPackage ../development/python-modules/pyopengl {
|
||||
|
||||
Reference in New Issue
Block a user