Skip to content

Commit

Permalink
Handle playback thread init bug affecting Docker instances (#151)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored Oct 27, 2023
1 parent ea3de8f commit 34ee3ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions neon_audio/tts/neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ def _init_neon(base_engine, *args, **kwargs):
def _init_playback(self, playback_thread: NeonPlaybackThread = None):
# shutdown any previous thread
if TTS.playback:
if TTS.playback == playback_thread:
# TODO: This shouldn't happen and is probably a bug
LOG.warning("Playback already initialized. skipping init")
return
TTS.playback.shutdown()
if not isinstance(playback_thread, NeonPlaybackThread):
LOG.exception("Received invalid playback_thread")
Expand Down

0 comments on commit 34ee3ad

Please sign in to comment.