Skip to content

Commit

Permalink
More helpful logging in legacy signature check
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 4, 2023
1 parent ca91bc0 commit f5a3496
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions neon_audio/tts/neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit f5a3496

Please sign in to comment.