colossal-lock-10836
09/04/2025, 8:36 AMtall-airline-16756
09/04/2025, 8:36 AMtall-airline-16756
09/04/2025, 8:36 AMRoomCompositeEgressRequest with a filepath that points to your mounted folder.
Here’s a handy Docker command example:
docker run --rm \
-v ~/my-local-recordings:/out \
-e EGRESS_CONFIG_FILE=/out/config.yaml \
livekit/egress
2. RecorderIO for Agent Audio:
- If you want to capture the agent’s internal audio streams (input/output) directly, you can use the RecorderIO class to save it to a local file.
Check out this example code:
from livekit.agents.voice.recorder_io import RecorderIO
recorder_io = RecorderIO(agent_session=session)
await recorder_io.start(output_path="/tmp/agent_audio.ogg")
For recording the whole session, I’d recommend going with Egress and a mounted local volume. If you’d like, I’m happy to walk you through setting up either of these methods step-by-step—just let me know! Sources: Session recording and transcripts | LiveKit Docs | Recording agent sessions | LiveKit Docs | README.md | livekit-agents/livekit/agents/voice/recorder_io/recorder_io.py