wyoming-openwakeword: 1.10.0 -> 2.0.0

https://github.com/rhasspy/wyoming-openwakeword/blob/v2.0.0/CHANGELOG.md
This commit is contained in:
Martin Weinelt
2025-10-20 00:20:55 +02:00
parent e48e6e0d6a
commit 5f7f58ff8a
2 changed files with 36 additions and 36 deletions
@@ -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
];