Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update queue warning to deprecation log #37

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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