From f5a349656eef4cd8c3f83670bb08e9c414f0a729 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Wed, 4 Oct 2023 12:39:01 -0700 Subject: [PATCH] More helpful logging in legacy signature check --- neon_audio/tts/neon.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/neon_audio/tts/neon.py b/neon_audio/tts/neon.py index c50a6d1..b80fa22 100644 --- a/neon_audio/tts/neon.py +++ b/neon_audio/tts/neon.py @@ -214,13 +214,10 @@ def _init_playback(self): TTS.playback.start() def _get_tts(self, sentence: str, request: dict = None, **kwargs): - if isinstance(request, str): - # OVOS-compat signature; args[2] is lang - LOG.info(f"Handling args[2] {request} as language") - request = {"language": request} + # TODO: Signature should be made to match ovos-audio if any([x in inspect.signature(self.get_tts).parameters for x in {"speaker", "wav_file"}]): - LOG.info("Legacy Neon TTS signature found") + LOG.info(f"Legacy Neon TTS signature found ({self.__class__.__name__})") key = str(hashlib.md5( sentence.encode('utf-8', 'ignore')).hexdigest()) file = kwargs.get("wav_file") or \