TTSService: deprecate say() method

This commit is contained in:
Aleix Conchillo Flaqué
2025-08-07 13:36:45 -07:00
parent 9ca79232c1
commit 11119430cd
2 changed files with 17 additions and 1 deletions

View File

@@ -269,9 +269,20 @@ class TTSService(AIService):
async def say(self, text: str):
"""Immediately speak the provided text.
.. deprecated:: 0.0.79
Push a `TTSSpeakFrame` instead to ensure frame ordering is maintained.
Args:
text: The text to speak.
"""
import warnings
warnings.warn(
"`TTSService.say()` is deprecated. Push a `TTSSpeakFrame` instead.",
DeprecationWarning,
stacklevel=2,
)
await self.queue_frame(TTSSpeakFrame(text))
async def process_frame(self, frame: Frame, direction: FrameDirection):