From 28095f9735a878549087ad401c3ec07d9f4ef194 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 29 Jan 2025 09:11:34 -0600 Subject: [PATCH] add sattelite only option for wyoming --- system-config/configuration/laptop/default.nix | 5 ++++- system-config/services/wyoming/default.nix | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/system-config/configuration/laptop/default.nix b/system-config/configuration/laptop/default.nix index 3ddadf0..43f9446 100644 --- a/system-config/configuration/laptop/default.nix +++ b/system-config/configuration/laptop/default.nix @@ -76,7 +76,10 @@ nh.enable = true; ollama.enable = true; - wyoming.enable = true; + wyoming = { + enable = true; + satteliteOnly = true; + }; virtualization.homeassistant = { enable = true; configvol = "/etc/homeassistant/config:/config"; diff --git a/system-config/services/wyoming/default.nix b/system-config/services/wyoming/default.nix index 4996a7c..a06da06 100644 --- a/system-config/services/wyoming/default.nix +++ b/system-config/services/wyoming/default.nix @@ -1,8 +1,14 @@ { config, lib, ... }: { - options.sysconfig.opts.wyoming.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; + options.sysconfig.opts.wyoming = { + enable = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; + satelliteOnly = lib.options.mkOption { + type = lib.types.bool; + default = false; + }; }; config = lib.mkIf config.sysconfig.opts.wyoming.enable { @@ -11,14 +17,14 @@ piper = { - servers.piper = { + servers.piper = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) { enable = true; voice = "en-us-ryan-medium"; uri = "tcp://0.0.0.0:11435"; }; }; - openwakeword = { + openwakeword = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) { enable = true; uri = "tcp://0.0.0.0:11432"; preloadModels = [ @@ -32,7 +38,7 @@ ]; }; - faster-whisper = { + faster-whisper = lib.mkIf (!config.sysconfig.opts.wyoming.satelliteOnly) { servers.whisper = { enable = true; #device = "cuda";