We would like to confirm the channel mapping used for stereo, two-channel call recordings generated through LiveKit Agents.
We are enabling audio recording directly in the agent session by passing:
record=True
We are currently using livekit-agents version 1.5.9.
For the resulting stereo recording:
We need to reliably separate the AI agent’s audio from the call partner’s audio during post-processing, transcription, and analysis. Therefore, we need to understand whether the left/right channel assignment is fixed and consistent for recordings created using record=True.
Could you please confirm the expected channel mapping in this setup? Additionally, can the channel order vary based on factors such as participant join order, telephony provider, room configuration, or any internal LiveKit recording behavior?
Hi, I could tell you how it works from the source code but since this behaviour is not documented there is no guarantee that the mapping won’t change in the future.
It would be safer and more reliable to use participant-level Egress to record each participant’s media. That would be my recommendation since it also accounts for multiple participants in the same room (future proofing):
To answer your specific question however, today the assignment of left and right channels is fixed, and is not subject to participant join order etc. There are no immediate plans to change this, but there is no guarantee it will never change in the future.
Hi @darryncampbell ,
Thank you, I will deliver the answer to our team.
@Sagor_Sarker Maybe you would be interested in RoomComposite & web egress | LiveKit Documentation as it provides room audio split by agent/user
When audio_only is true, you can also specify the audio mixing mode to use. Use dual channel recording to separate the agent’s audio from the other participants’ audio, or alternate dual channel recording to alternate between left and right channels for each new audio track. By default, all users are mixed together.