few-soccer-7112
07/10/2025, 11:55 PMtall-airline-16756
07/10/2025, 11:55 PMtall-airline-16756
07/10/2025, 11:56 PMsession.generate_reply
in realtime models is still session.generate_reply()
. This method works with both traditional LLM pipelines and realtime models, allowing you to prompt the model to generate a response by providing instructions
and/or user_input
. The response is returned as a SpeechHandle
object, which lets you track speech state and handle events such as speech completion or interruption.
For scripted speech (the equivalent of session.say()
), realtime models don't natively support direct TTS output unless you add a TTS plugin to your session. If you need to play back a specific text, you must add a TTS plugin and use `session.say()`—otherwise, use generate_reply()
and provide explicit instructions, though the model output may vary.
• For precise scripting with realtime models, use a TTS plugin with session.say()
.
• For dynamic replies or LLM-driven generation, use session.generate_reply()
.
Both methods return a SpeechHandle
for tracking and synchronization. For further details, refer to your platform's plugin and session management documentation.
If you need practical implementation examples for either approach, let me know your use case.
Sources: Agent speech and audio | LiveKit Docs | tests/test_agent_session.py | Realtime model integrations | LiveKit Docs