blue-ability-56213
12/25/2025, 1:56 PMtall-airline-16756
12/25/2025, 1:56 PMtall-airline-16756
12/25/2025, 1:56 PMaudioMixing: AudioMixing.DUAL_CHANNEL_AGENT where the left channel is empty when using a beyond presence avatar for the agent. I need a few details to diagnose and give a concrete fix:
Please provide:
• Platform and LiveKit SDK version (Web, iOS, Android, server).
• Does the left channel only go silent when the beyond presence avatar is enabled, and does audio behave normally without the avatar?
• Is the avatar audio source mono or stereo? How is the avatar audio produced (TTS, prerecorded file, media stream)? If a file, share sample format (sample rate, channels).
• The exact code where you set audioMixing: AudioMixing.DUAL_CHANNEL_AGENT and any audio-track creation or routing code.
• Browser/OS or device model & OS, and any SDK/console logs around the issue.
• Is this reproducible in all sessions or only intermittently? Is it only one agent/avatar or all agents using beyond presence avatars?
Share those and I’ll provide targeted troubleshooting steps and a reproducible test you can run.blue-ability-56213
12/25/2025, 1:57 PMtall-airline-16756
12/25/2025, 1:57 PMaudioMixing: AudioMixing.DUAL_CHANNEL_AGENT.
Short answer: the avatar is treated as a separate participant (an avatar worker) and publishes its own audio. It joins the room as an agent-type participant but is distinct from your primary agent. Because your primary agent isn’t directly publishing audio (the avatar worker does), the left channel (agent) can be empty while the avatar’s audio appears on the right channel.
What you can do next:
• Confirm the avatar worker’s participant identity and audio trackName in the room (LiveKit console or by listing participants/tracks server-side).
• Configure your egress/layout to target the avatar worker’s participantIdentity and trackName for the agent channel so the correct audio is routed into the left channel.
• Alternatively, switch mixing mode if you want the avatar audio treated as “human” audio instead of agent audio.
If you’d like, share the room participant list or the avatar’s trackName and the egress config you’re using and I’ll suggest the exact fields to change.
Sources: Bringing AI avatars to voice agents | Virtual avatar plugins | LiveKit Docs | Beyond Presence virtual avatar integration guide | LiveKit docsblue-ability-56213
12/25/2025, 1:58 PMtall-airline-16756
12/25/2025, 1:59 PMkind === ParticipantKind.AGENT and attributes['lk.publish_on_behalf'] === <agent_identity>.
• Once found, treat that participant’s audio track as the agent’s audio in your mixer (map it to the left channel or to the agent slot).
• If you use @livekit/components-react, use the useVoiceAssistant hook — its audioTrack is already the avatar worker’s track and can be treated as agent audio.
If you want, share:
• a snippet of your frontend participant/tracks handling (or the mixer/egress config), and
• the avatar worker’s participant.identity and trackName if available — I’ll give the exact code changes to route that track to the agent/left channel. Sources: Bringing AI avatars to voice agents | Virtual avatar plugins | LiveKit Docs | Tavus virtual avatar integration guide | LiveKit docsblue-ability-56213
12/25/2025, 2:01 PMconst audioEgress = await egressClient.startRoomCompositeEgress(ctx.room.name, {
file: new EncodedFileOutput({
filepath: 'testrecording.mp3',
output: {
case: 's3',
value: {}
}
}),
}, {
audioOnly: true,
audioMixing: AudioMixing.DUAL_CHANNEL_AGENT
});
this is how i record the audio.
it records audio only on right channel. i did looked at it using audio editor.
also it saves the audio as .ogg file.tall-airline-16756
12/25/2025, 2:02 PMagentAudioLabel, participantIdentity, or fileType).
2) Confirm the avatar worker identity and its published audio track:
• Can you paste the avatar worker’s participant.identity and the track names from the room (or the server-side listing of participants/tracks)? The avatar worker has attributes['lk.publish_on_behalf'] === <agent_identity>.
3) Change to try (contingent on SDK support):
• Add the avatar worker identity as the agent source in the egress options (use the SDK’s agent/participant mapping field — e.g., agentAudioLabel or participantIdentity if available).
• Use a supported output container/format for dual-channel audio. Try a container like .mp4 or explicitly set the file type via the SDK (e.g., FileType.MP4 or FileType.MP3 if your SDK supports MP3 encoded output). The service can fall back to OGG if the requested format/container isn’t supported for dual-channel mixing.
Example (adjust to your SDK/version):
// adjust field names to match your egress SDK
{
file: {
filepath: 'testrecording.mp4',
// fileType: FileType.MP4, // add if your SDK exposes this
output: { case: 's3', value: {} }
}
},
{
audioOnly: true,
audioMixing: AudioMixing.DUAL_CHANNEL_AGENT,
agentAudioLabel: 'avatar-worker-identity' // or participantIdentity per your SDK
}
If you share the SDK/version and the avatar worker’s participant.identity + published track names, I’ll give the exact request fields and values to use and verify the correct fileType/extension for dual-channel output.
Sources: Virtual avatar plugins | LiveKit Docs | Beyond Presence virtual avatar integration guide | LiveKit docs | examples/avatar_agents | livekit/livekit_composite | DeepWiki | livekit/livekit_composite | DeepWiki | Universal Egressblue-ability-56213
12/25/2025, 2:05 PMtall-airline-16756
12/25/2025, 2:05 PMlk.publish_on_behalf true, and whether OGG supports dual-channel).
Short answers:
• Your SDK version (/@livekit/agents@^1.0.30/) does not expose an `agentAudioLabel`/`participantIdentity` field to explicitly map the avatar worker as the agent source.
• OGG is being produced as a fallback and does not produce the expected DUAL_CHANNEL_AGENT two-channel output for this egress configuration. Use a supported container (MP4/WebM) or explicitly set a supported file type so dual-channel mixing is generated correctly.
• To treat the avatar’s audio as agent audio you must tell the egress service which participant is the agent audio source; since your SDK doesn’t expose that mapping, you need to either upgrade SDKs or call the egress REST API/server-side where you can set the avatar worker identity as the agent source.
Recommended next steps (concise):
• Upgrade or use an SDK version that supports specifying the agent audio source in the egress options, or use the server-side egress REST API so you can pass the avatar worker identity (the participant whose attributes include lk.publish_on_behalf).
• Change output to a supported container/format for dual-channel (e.g., testrecording.mp4 or WebM) or set FileType explicitly if your client exposes it.
• If you prefer to stay on @livekit/agents v1.0.30, run server-side egress and include the avatar worker identity in the egress request body so the egress service maps that participant to the agent/left channel.
If you want, paste the avatar worker’s participant.identity and I’ll show the exact egress request body to send via the server-side API (or tell you which SDK version adds the client option). Which would you prefer?blue-ability-56213
12/25/2025, 2:10 PMtall-airline-16756
12/25/2025, 2:10 PMaudioCodec to ac_mp3 didn’t populate the agent (left) channel.
Short answers:
• Changing codec alone won’t fix channel routing. The left channel is empty because egress isn’t treating the avatar worker as the agent source.
• OGG output here is a fallback and will not reliably produce the intended DUAL_CHANNEL_AGENT two-channel layout. MP4/WebM (or explicitly supported fileType) are required for dual-channel egress.
• Your client SDK (/@livekit/agents@^1.0.30/) doesn’t expose a field to map the avatar worker as the agent source, so you must specify that participant identity server-side (egress REST API) or upgrade to an SDK that exposes the mapping.
Recommended next steps (pick one):
• Server-side egress REST API: send an egress request that includes the avatar worker’s participant.identity as the agent audio source (I can draft the exact JSON body if you paste the avatar identity).
• Upgrade SDK: move to a version that supports specifying the agent audio label/participant identity in the egress options, then set that to the avatar worker identity.
• Ensure output container is supported for dual-channel: change filepath to testrecording.mp4 or testrecording.webm and set fileType appropriately.
If you want, paste the avatar worker’s participant.identity and I’ll give the exact server-side egress request body you can call to force the avatar audio into the left (agent) channel.blue-ability-56213
12/25/2025, 2:18 PMtall-airline-16756
12/25/2025, 2:19 PMblue-ability-56213
12/25/2025, 2:20 PMtall-airline-16756
12/25/2025, 2:20 PMblue-ability-56213
12/25/2025, 2:26 PMtall-airline-16756
12/25/2025, 2:26 PM