From 3301a83321bdd024797983809a7975296ec5e1f9 Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Thu, 12 Sep 2024 00:13:51 +0100 Subject: [PATCH] fix:default_config (#265) handle when config isnt passed to Factory --- ovos_plugin_manager/g2p.py | 1 + ovos_plugin_manager/microphone.py | 1 + ovos_plugin_manager/vad.py | 1 + 3 files changed, 3 insertions(+) diff --git a/ovos_plugin_manager/g2p.py b/ovos_plugin_manager/g2p.py index 8a8bcdfe..7fca7b95 100644 --- a/ovos_plugin_manager/g2p.py +++ b/ovos_plugin_manager/g2p.py @@ -107,6 +107,7 @@ def create(cls, config=None): "module": } """ + config = config or Configuration() if "g2p" in config: config = config["g2p"] g2p_config = get_g2p_config(config) diff --git a/ovos_plugin_manager/microphone.py b/ovos_plugin_manager/microphone.py index f649b130..9e4c86c8 100644 --- a/ovos_plugin_manager/microphone.py +++ b/ovos_plugin_manager/microphone.py @@ -60,6 +60,7 @@ def create(cls, config=None): "module": } """ + config = config or Configuration() if "microphone" in config: config = config["microphone"] microphone_config = get_microphone_config(config) diff --git a/ovos_plugin_manager/vad.py b/ovos_plugin_manager/vad.py index 5d4b2589..5634bfea 100644 --- a/ovos_plugin_manager/vad.py +++ b/ovos_plugin_manager/vad.py @@ -92,6 +92,7 @@ def create(cls, config=None): "module": } """ + config = config or Configuration() if "listener" in config: config = config["listener"] if "VAD" in config: