rough-pizza-5956
07/11/2025, 10:59 AMtall-airline-16756
07/11/2025, 10:59 AMtall-airline-16756
07/11/2025, 11:00 AMuser_input_transcribed
, user_speech_committed
, and agent_stopped_speaking
) to capture each exchange in real-time. Alternatively, access the session history via the session.history
property at any point, or persist the full history using a shutdown callback when the session ends.
For CSV storage, it's recommended to include for each turn:
• timestamp – when the message occurred
• session_id – conversation/session identifier
• turn_id – sequential turn number
• speaker_type – 'user' or 'agent'
• content – transcript or LLM reply
• is_final – if the transcript is final (for STT)
• confidence_score – STT confidence (if available)
Additional columns can include speaker_id
, message_id
, model_used
, response time, etc.
This structure enables comprehensive turn-wise tracking and later analysis of interaction quality and flow.
For implementation examples—such as real-time collection, session shutdown handling, and CSV modifications—refer to the survey caller and transcriber examples within the documentation.
Sources: Session recording and transcripts | LiveKit Docs | complex-agents/turn-taking/README.md | Recording agent sessions | LiveKit Docs | livekit-agents/livekit/agents/voice/agent.py