Good — you’re posting on the LiveKit community forum. Here’s the content to put in the body:
We are using RoomCompositeEgressRequest with audio_only=True and setting audio_mixing=AudioMixing.DUAL_CHANNEL_AGENT (value=1) to get separate bot and user audio on stereo channels for post-call speaker diarization.
The request is being sent correctly (confirmed via LiveKit Cloud Egress dashboard — the REQUEST payload shows audioOnly: true but audioMixing field is absent/ignored).
The resulting OGG file comes out as mono (1 channel) instead of stereo (2 channels). Verified with librosa:
shape: (972314,) # 1D array — mono
channels: 1
duration: 40.51s
SDK versions:
livekit-api >= 1.0.7
livekit >= 1.0.25
- Project on LiveKit Cloud (SaaS)
Question: Is AudioMixing.DUAL_CHANNEL_AGENT supported on LiveKit Cloud SaaS egress? If so, what egress version is required and how do we enable it for our project?
@godwinv-aivar the feature is implemented, so the interesting bit is your own observation that audioMixing is absent from the request payload.
AudioMixing exists in the protocol with DUAL_CHANNEL_AGENT = 1, and audio_mixing is a field on RoomCompositeEgressRequest. Egress implements it in pkg/pipeline/builder/audio.go, routing agent tracks to AUDIO_CHANNEL_LEFT and everything else to AUDIO_CHANNEL_RIGHT. So none of it is missing.
Since DUAL_CHANNEL_AGENT is 1 rather than 0, proto3 would serialise it, and its absence from the payload suggests it never made it onto the request rather than being ignored by the server. Worth printing the request object right before you send it, and checking your installed livekit-protocol version rather than livekit-api, since that is where the field actually lives. I verified the above against livekit-protocol 1.1.21.
One thing to know for after that lands: the routing keys off ParticipantKind == ParticipantAgent, so your bot has to be joining as an agent participant rather than a standard one for the split to land where you expect.
Whether Cloud egress is running a build that includes this is not something I can see from outside, so that part is one for LiveKit.