From 66ad30c328ee6c21ecf8dc2dfb8104b47a3f2f54 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 13 Jun 2022 18:33:02 -0700 Subject: [PATCH 1/4] Update launcher to handle audio service Update ovos-core dependency spec --- neon_core/launcher.py | 60 +++++++++++++++++++++-------------- requirements/requirements.txt | 2 +- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/neon_core/launcher.py b/neon_core/launcher.py index f6fddf9e5..726d2ab54 100644 --- a/neon_core/launcher.py +++ b/neon_core/launcher.py @@ -28,40 +28,54 @@ from mycroft.lock import Lock from mycroft.util import wait_for_exit_signal, reset_sigint_handler + +from neon_audio.service import NeonPlaybackService from neon_messagebus.service import NeonBusService from neon_core.skills.service import NeonSkillService from neon_gui.service import NeonGUIService from neon_speech.service import NeonSpeechClient -reset_sigint_handler() -# Create PID file, prevent multiple instances of this service -# TODO should also detect old services Locks -lock = Lock("NeonCore") +def main(): + reset_sigint_handler() + # Create PID file, prevent multiple instances of this service + # TODO should also detect old services Locks + lock = Lock("NeonCore") + + # launch websocket listener + bus = NeonBusService(daemonic=True) + bus.start() + bus.started.wait(30) -# launch websocket listener -bus = NeonBusService(daemonic=True) -bus.start() -bus.started.wait(30) + # launch GUI websocket listener + gui = NeonGUIService(daemonic=True) + gui.start() -# launch GUI websocket listener -gui = NeonGUIService(daemonic=True) -gui.start() + # launch skills service + skills = NeonSkillService(daemonic=True) + skills.start() -# launch skills service -skills = NeonSkillService() -skills.start() + # launch speech service + speech = NeonSpeechClient(daemonic=True) + speech.start() -speech = NeonSpeechClient() -speech.start() + # launch audio playback service + audio = NeonPlaybackService(daemonic=True) + audio.start() -wait_for_exit_signal() + wait_for_exit_signal() -speech.shutdown() -skills.shutdown() -gui.shutdown() -bus.shutdown() + for service in (audio, speech, skills, gui, bus): + service.shutdown() + if service.is_alive(): + print(f"{service} not shutdown") + try: + service.join() + except Exception as e: + print(e) + lock.delete() + print("Stopped!!") -# TODO: Add audio service when implemented DM -lock.delete() +if __name__ == "__main__": + main() diff --git a/requirements/requirements.txt b/requirements/requirements.txt index eec2940aa..3943461e8 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,5 +1,5 @@ # mycroft -ovos-core[skills_lgpl]~=0.0.3 +ovos-core[skills_lgpl]~=0.0.4a19 # utils neon-utils~=0.17,>=0.17.3 ovos_utils~=0.0.20 From 5d479b354f77405d775851681da0fe77e1912e1b Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 15 Jun 2022 13:54:54 -0700 Subject: [PATCH 2/4] Fix internal ovos-core dependency conflict --- requirements/core_modules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 2161de99a..83ecd15b0 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -1,4 +1,4 @@ -ovos-core[all]~=0.0.3 +ovos-core[all]~=0.0.4a19 ovos-ww-plugin-pocketsphinx~=0.1.2 # neon core modules From 60c8685144f8d97500567b192d52937c13453e81 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 15 Jun 2022 14:16:27 -0700 Subject: [PATCH 3/4] Update neon_messagebus dependency version for compat. --- requirements/core_modules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index 83ecd15b0..a9d397453 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -2,7 +2,7 @@ ovos-core[all]~=0.0.4a19 ovos-ww-plugin-pocketsphinx~=0.1.2 # neon core modules -neon_messagebus~=0.1,>=0.1.1 +neon_messagebus~=0.1,>=0.1.2a0 neon_speech~=1.0,>=1.1.0 neon_audio~=1.0,>=1.0.1 neon_gui~=0.1 \ No newline at end of file From f8632fae911a3ced8d0f3bda8de4b4a6f0bdfc0e Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 15 Jun 2022 14:36:35 -0700 Subject: [PATCH 4/4] Bump audio module dependency --- requirements/core_modules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/core_modules.txt b/requirements/core_modules.txt index a9d397453..49923d773 100644 --- a/requirements/core_modules.txt +++ b/requirements/core_modules.txt @@ -4,5 +4,5 @@ ovos-ww-plugin-pocketsphinx~=0.1.2 # neon core modules neon_messagebus~=0.1,>=0.1.2a0 neon_speech~=1.0,>=1.1.0 -neon_audio~=1.0,>=1.0.1 +neon_audio~=1.0,>=1.0.2a0 neon_gui~=0.1 \ No newline at end of file