Skip to content

Commit

Permalink
Clean up changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Feb 12, 2025
1 parent 7845d5c commit e06b69c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions neon_audio/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ def __init__(self, ready_hook=on_ready, error_hook=on_error,
PlaybackService.__init__(self, ready_hook, error_hook, stopping_hook,
alive_hook, started_hook, watchdog, bus,
disable_ocp, validate_source=False)
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
20 changes: 0 additions & 20 deletions neon_audio/tts/neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import os

from os.path import dirname
from queue import Empty
from time import time
from typing import List

Expand Down Expand Up @@ -174,7 +173,6 @@ def end_audio(self, listen, message=None):
check_for_signal("isSpeaking")

def _play(self):
# 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]
Expand Down Expand Up @@ -204,24 +202,6 @@ def resume(self):
LOG.debug(f"Playback thread resumed")
PlaybackThread.resume(self)

def run(self, cb=None):
LOG.info("PlaybackThread started")
self._do_playback.set()
self._started.set()
while not self._terminated:
self._do_playback.wait()
try:
data, visemes, listen, tts_id, message = self.queue.get(timeout=2)
LOG.debug(f"START PLAYBACK")
self._now_playing = (data, visemes, listen, tts_id, message)
self._play()
assert self._now_playing is None
LOG.debug("END PLAYBACK")
except Empty:
pass
except Exception as e:
LOG.error(e)


class WrappedTTS(TTS):
def __new__(cls, base_engine, *args, **kwargs):
Expand Down

0 comments on commit e06b69c

Please sign in to comment.