From bb18c963c950ba44b93b94e1ad3635f497917294 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Thu, 19 Sep 2024 12:58:38 -0700 Subject: [PATCH] Update to use OVOSSttFactory directly Mark neon_speech.stt module as deprecated Update dependencies to latest stable versions --- neon_speech/service.py | 4 +--- neon_speech/stt.py | 12 +++++++++++- requirements/requirements.txt | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/neon_speech/service.py b/neon_speech/service.py index 47953e5..bf84cd8 100644 --- a/neon_speech/service.py +++ b/neon_speech/service.py @@ -48,9 +48,7 @@ from ovos_dinkum_listener.service import OVOSDinkumVoiceService from ovos_dinkum_listener.voice_loop.voice_loop import ListeningMode -from neon_speech.stt import STTFactory - -ovos_dinkum_listener.plugins.OVOSSTTFactory = STTFactory +from ovos_plugin_manager.stt import OVOSSTTFactory as STTFactory _SERVICE_READY = Event() diff --git a/neon_speech/stt.py b/neon_speech/stt.py index 7842361..1f4b927 100644 --- a/neon_speech/stt.py +++ b/neon_speech/stt.py @@ -30,15 +30,21 @@ from inspect import signature from threading import Event -from neon_utils import LOG +from ovos_utils.log import LOG, log_deprecation from ovos_plugin_manager.stt import OVOSSTTFactory, get_stt_config from ovos_plugin_manager.templates.stt import StreamingSTT from ovos_config.config import Configuration +log_deprecation("This module is deprecated. Import from `ovos_plugin_manager`", + "5.0.0") + class WrappedSTT(StreamingSTT, ABC): def __new__(cls, base_engine, *args, **kwargs): + log_deprecation("This class is deprecated. Use " + "`ovos_plugin_manager.templates.stt.StreamingSTT", + "5.0.0") results_event = kwargs.get("results_event") or Event() # build STT for k in list(kwargs.keys()): @@ -66,6 +72,10 @@ def stream_stop(self): class STTFactory(OVOSSTTFactory): + log_deprecation("This class is deprecated. Use " + "`ovos_plugin_manager.stt.OVOSSTTFactory", + "5.0.0") + @staticmethod def create(config=None, results_event: Event = None): get_stt_config(config) diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 4ad807b..cc6eba1 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,4 +1,4 @@ -ovos-dinkum-listener~=0.0 +ovos-dinkum-listener~=0.2 ovos-bus-client~=0.0,>=0.0.3 ovos-utils~=0.0,>=0.0.30 ovos-plugin-manager~=0.0,>=0.0.23 @@ -9,4 +9,4 @@ ovos-config~=0.0,>=0.0.7 ovos-vad-plugin-webrtcvad~=0.0.1 ovos-ww-plugin-vosk~=0.1 -ovos-microphone-plugin-alsa~=0.0.0 \ No newline at end of file +ovos-microphone-plugin-alsa~=0.1 \ No newline at end of file