From d1b1f44305ecd18d8e5fd6108f97e5f3c4eeb9fc Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 3 Apr 2024 17:43:52 -0700 Subject: [PATCH 1/2] Adds missing `mycroft.util.record` reference Fixes `AdaptIntent` for backwards compat. --- mycroft/skills/intent_services/adapt_service.py | 7 ++++++- mycroft/util/__init__.py | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mycroft/skills/intent_services/adapt_service.py b/mycroft/skills/intent_services/adapt_service.py index 8c652fcea0ec..1f498a8a9b31 100644 --- a/mycroft/skills/intent_services/adapt_service.py +++ b/mycroft/skills/intent_services/adapt_service.py @@ -15,5 +15,10 @@ """An intent parsing service using the Adapt parser.""" from adapt.context import ContextManagerFrame from adapt.engine import IntentDeterminationEngine -from ovos_workshop.intents import Intent as AdaptIntent, IntentBuilder, Intent +from ovos_workshop.intents import IntentBuilder, Intent from ovos_core.intent_services.adapt_service import ContextManager, AdaptService + + +class AdaptIntent(IntentBuilder): + def __init__(self, name=''): + super().__init__(name) diff --git a/mycroft/util/__init__.py b/mycroft/util/__init__.py index ce9abe49b110..8cd287465dbc 100644 --- a/mycroft/util/__init__.py +++ b/mycroft/util/__init__.py @@ -27,6 +27,7 @@ create_file, ensure_directory_exists, curate_cache) +from mycroft.util.audio_test import record from ovos_utils.file_utils import resolve_resource_file, get_cache_directory, get_temp_path from mycroft.util.network_utils import connected from mycroft.util.process_utils import (create_echo_function, From de090eb83839fdbbcb4674ce9c0619c850e2d38e Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 3 Apr 2024 17:54:25 -0700 Subject: [PATCH 2/2] Wrap backwards-compat import to avoid init errors --- mycroft/util/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mycroft/util/__init__.py b/mycroft/util/__init__.py index 8cd287465dbc..f78ddaf4a426 100644 --- a/mycroft/util/__init__.py +++ b/mycroft/util/__init__.py @@ -27,7 +27,6 @@ create_file, ensure_directory_exists, curate_cache) -from mycroft.util.audio_test import record from ovos_utils.file_utils import resolve_resource_file, get_cache_directory, get_temp_path from mycroft.util.network_utils import connected from mycroft.util.process_utils import (create_echo_function, @@ -41,3 +40,8 @@ get_ipc_directory from mycroft.util.platform import get_arch from ovos_utils.log import init_service_logger, LOG + + +def record(*args, **kwargs): + from mycroft.util.audio_test import record + record(*args, **kwargs)