Skip to content

Commit

Permalink
Add logging to troubleshoot PlaybackThread issues
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Feb 12, 2025
1 parent a57e8ea commit 5578352
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions neon_audio/tts/neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _sort_timing_metrics(timings: dict) -> dict:

class NeonPlaybackThread(PlaybackThread):
def __init__(self, queue, bus=None):
LOG.info("Initializing NeonPlaybackThread")
LOG.info(f"Initializing NeonPlaybackThread with queue={queue}")
PlaybackThread.__init__(self, queue, bus=bus)

def begin_audio(self, message: Message = None):
Expand All @@ -174,7 +174,8 @@ def end_audio(self, listen, message=None):
check_for_signal("isSpeaking")

def _play(self):
LOG.debug(f"Start playing {self._now_playing}")
# TODO Not called?
LOG.debug(f"Start playing {self._now_playing} from queue={self.queue}")
# wav_file, vis, listen, ident, message
ident = self._now_playing[3]
message = self._now_playing[4]
Expand Down Expand Up @@ -422,7 +423,8 @@ def execute(self, sentence: str, ident: str = None, listen: bool = False,
vis = self.viseme(r["phonemes"]) if r["phonemes"] \
else None
# queue for playback
LOG.debug(f"Queue playback of: {wav_file}")
LOG.debug(f"Queue playback of: {wav_file} in "
f"queue={self.queue}")
self.queue.put((wav_file, vis, listen, ident, message))
self.handle_metric({"metric_type": "tts.queued"})
else:
Expand Down

0 comments on commit 5578352

Please sign in to comment.