should generate_reply method be awaited when it is...
# ask-ai
w
should generate_reply method be awaited when it is called?
t
Just to clarify, the
generate_reply
method is actually synchronous, so you don't need to await it when you call it. It returns a
SpeechHandle
object right away. But if you want to wait until the speech playout finishes, you can use the async method
waitForPlayout()
on that
SpeechHandle
and await it. I hope this helps clear things up! Let me know if you have any other questions. Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real... | Agent speech and audio | LiveKit docs