Skip to content

Commit

Permalink
Troubleshooting PlaybackThread init
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Sep 14, 2024
1 parent 721a865 commit 12b4a3b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions neon_audio/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ def __init__(self, ready_hook=on_ready, error_hook=on_error,
bus = bus or get_messagebus()
from neon_utils.signal_utils import create_signal

from neon_audio.tts.neon import NeonPlaybackThread
import ovos_audio.playback
ovos_audio.playback.PlaybackThread = NeonPlaybackThread
ovos_audio.service.PlaybackThread = NeonPlaybackThread
PlaybackService.__init__(self, ready_hook, error_hook, stopping_hook,
alive_hook, started_hook, watchdog, bus,
disable_ocp, validate_source=False)
self.playback_thread.join()
del self.playback_thread
from neon_audio.tts.neon import NeonPlaybackThread
from ovos_plugin_manager.tts import TTS
self.playback_thread = NeonPlaybackThread(TTS.queue, self.bus)
LOG.debug(f'Initialized tts={self._tts_hash} | '
f'fallback={self._fallback_tts_hash}')
create_signal("neon_speak_api") # Create signal so skills use API
Expand Down Expand Up @@ -181,3 +182,6 @@ def handle_get_tts(self, message):
def init_messagebus(self):
self.bus.on('neon.get_tts', self.handle_get_tts)
PlaybackService.init_messagebus(self)
self.bus.remove("speak", PlaybackService.handle_speak)
self.bus.on("speak", self.handle_speak)
LOG.info("Initialized messagebus")

0 comments on commit 12b4a3b

Please sign in to comment.