future-cpu-86293
07/11/2025, 1:05 PMtall-airline-16756
07/11/2025, 1:05 PMtall-airline-16756
07/11/2025, 1:06 PMaudio_mixing
mode to DUAL_CHANNEL_AGENT. This will place the agent's audio in the left channel and all other (customer) audio in the right channel. Here is a Python example:
from livekit import api
req = api.RoomCompositeEgressRequest(
room_name="your-room-name",
audio_mixing=AudioMixing.DUAL_CHANNEL_AGENT, # Agent left, customers right
file_outputs=[api.EncodedFileOutput(
file_type=api.EncodedFileType.OGG,
filepath="recording.ogg",
# ... your storage configuration
)]
)
lkapi = api.LiveKitAPI()
res = await lkapi.egress.start_room_composite_egress(req)
This approach creates an OGG file with two channels, enabling tools like Deepgram to provide word-level timestamps per channel.
Alternatively, if you want to record agent and customer completely separately (as individual files), you can use Participant Egress: record each participant by specifying their identity separately in the API request. This produces one file per participant.
Either approach will let you perform more reliable transcription and speaker separation.
Let me know if you need step-by-step guidance for a specific method or integration!
Reference:
Sources: livekit-protocol/src/livekit.rs | src/main/kotlin/io/livekit/server/EgressServiceClient.kt | Recording Participants | LiveKit Docs | livekit-agents/livekit/agents/voice/room_io/room_io.py | How to set a fixed participant for agent audio processing | Session recording and transcripts | LiveKit Docsfuture-cpu-86293
07/11/2025, 2:15 PMtall-airline-16756
07/11/2025, 2:16 PMaudio_only=True
when starting your composite egress.
• Make sure you've got at least one participant marked as an agent - LiveKit needs this to separate the audio channels.
If you've already done that and are still scratching your head about single-channel output, double-check that the participant you want on the left channel is definitely marked as an agent, and you've got at least one non-agent participant in the mix.
I'm confident these tweaks will help you get that dual-channel audio file working perfectly for your transcription needs. Hang in there!
Reference:
Sources: protobufs/livekit_egress.proto | test/edge.gofuture-cpu-86293
07/11/2025, 2:18 PMtall-airline-16756
07/11/2025, 2:19 PM