Anyone tried capturing and sending audio frames fr...
# agents
m
Anyone tried capturing and sending audio frames from participant tracks to an LLM instead of using the multimodel agent? I am running into issues when mixing the frames from multiple participants to send to an LLM. Each participant's set of frames are fine but as soon as they are mixed the audio is getting distorted. I am not sure how to preserve the temporal ordering and pass the audio data to the LLM without this. I attached a simplified agent that reproduces the issue. Appreciate any insights
r
At a quick glance of the code it looks like you are interleaving frames instead of mixing the audio signals together.
m
Thank you. That makes sense. If we are sending every frame as they arrive to LLM's websocket session would mixing still matter?
r
Depends on codec but generally speaking you do not want to interleave audio frames as a stream from different sources. That is what mixers are for.
m
Looks like there is an AudioMixer utility in python sdk. I couldn't find it in node sdk. Do you know if one is available?
r
I do not have one. This is a very common task in the world of audio tracks. I am sure there are a lot of options out there in the World. I don't really know which would be best for your use-case.