Skip to content

Commit

Permalink
Update queue warning to deprecation log
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 26, 2023
1 parent adc89c3 commit 4954de3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ovos_audio/playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ovos_audio.transformers import TTSTransformersService
from ovos_bus_client.message import Message
from ovos_plugin_manager.templates.tts import TTS
from ovos_utils.log import LOG
from ovos_utils.log import LOG, log_deprecation
from ovos_utils.sound import play_audio
from queue import Empty
from threading import Thread
Expand Down Expand Up @@ -203,8 +203,10 @@ def run(self, cb=None):
if len(speech_data) == 5 and isinstance(speech_data[-1], Message):
data, visemes, listen, tts_id, message = speech_data
else:
LOG.warning("it seems you are interfacing with TTS.queue directly, this is not recommended!\n"
"new expected TTS.queue contents -> data, visemes, listen, tts_id, message")
log_deprecation(
"Direct modification of TTS.queue is not recommended!\n"
"expected=(data, visemes, listen, tts_id, message)",
"0.1.0")
if len(speech_data) == 6:
# old ovos backwards compat
_, data, visemes, ident, listen, tts_id = speech_data
Expand Down

0 comments on commit 4954de3

Please sign in to comment.