little-king-41579
12/16/2025, 8:28 PMtall-airline-16756
12/16/2025, 8:28 PMtall-airline-16756
12/16/2025, 8:29 PMgenerate_reply(). Use the SpeechHandle returned by generate_reply() — await it to wait for playback to finish and the agent to start listening for user input.
Example:
handle = session.generate_reply(instructions="How can I help you today?")
await handle # waits for speech playback to complete and agent readiness
# agent is now listening for user input; proceed to handle incoming user reply
If you only need to wait for playout without blocking other work:
handle = session.generate_reply(instructions="How can I help you today?")
# do other tasks...
await handle.wait_for_playout() # ensures speech finishes
The agent begins listening for user input automatically after speaking.
Sources: Agent speech and audio | LiveKit docs