<@U08CKJH7C12> I have few questions, Could you ple...
# server-api
l
@refined-appointment-81829 I have few questions, Could you please help with these. 1. Does the agent start speaking / publishing audio, once room is connected by a participant or the participants audio is published. 2. is publication waitForSubscription() mandatory / recommended, what happens if i dont wait for subscription. 3. Is there any concept for preconnectBuffer in audio publishing? 4. The room metadata update api call takes around 2 seconds for some reason. Is there a way to improve it. 5. Is there a particular event to subscribe for in room / server sdk, when the agent ends the conversation.
a
@refined-appointment-81829 We have similar issue with livekit integration. Can you help us in clearing some of the above doubts ?
r
> Does the agent start speaking / publishing audio, once room is connected by a participant or the participants audio is published. When it is subscribed to the participants track > is publication waitForSubscription() mandatory / recommended, what happens if i dont wait for subscription.
waitForSubscription()
is highly recommended and effectively mandatory for proper audio streaming. _output.py:73-74 The
capture_frame
method waits for the subscription future before proceeding with audio capture. If you don't wait for subscription, audio frames sent via
capture_frame()
will be blocked until subscription occurs, which can cause timing issues and buffer problems in your audio pipeline. _output.py:73-83 > Is there any concept for preconnectBuffer in audio publishing? Yes, this was added in a recent release. > The room metadata update api call takes around 2 seconds for some reason. Is there a way to improve it. Timing will partly depend on how many regions the participant is connected to. Two seconds sound long to me. I am not sure of a way to improve it. > 1. Is there a particular event to subscribe for in room / server sdk, when the agent ends the conversation. You can use webhooks. https://docs.livekit.io/home/server/webhooks/ https://docs.livekit.io/home/server/webhooks/