prehistoric-alligator-43413
11/27/2025, 6:40 PMtall-airline-16756
11/27/2025, 6:40 PMtall-airline-16756
11/27/2025, 6:40 PMlk.transcription).
• Programmatic access:
a. Listen for the user_input_transcribed event to receive transcripts in real time. Event data includes transcript, language, is_final, and optionally speaker_id.
• Example (Python):
@session.on("user_input_transcribed")
def on_user_input_transcribed(event: UserInputTranscribedEvent):
print(f"Transcript: {event.transcript}, Final: {event.is_final}")
1. Use conversation_item_added to capture all chat messages as they arrive.
• Persisting full transcripts:
◦ Save session.history in an on_session_end callback to store the complete turn-by-turn conversation.
async def on_session_end(ctx: JobContext):
with open("transcript.json", "w") as f:
json.dump(session.history.to_dict(), f, indent=2)
• Agent Observability (LiveKit Cloud):
◦ Enable Agent Observability in Project Settings > Data and privacy to view synchronized transcripts, audio, and traces in the dashboard.
◦ Sessions’ transcripts, audio, and metadata are downloadable (retention details shown in the dashboard).
◦ To send interim transcripts immediately (unsynced), start the session with RoomOutputOptions(sync_transcription=False).
• Optional: TTS-aligned transcripts (Python)
◦ If your TTS provider supports word-level timing, set use_tts_aligned_transcript=True on AgentSession to receive timed words.
If you’d like, tell me:
• whether you want real-time streaming transcripts or post-call files, and
• which SDK/language you’re using (Python, JS, etc.)
— and I’ll provide the exact code snippet or configuration for that flow.
Sources: Text and transcriptions | LiveKit docs | Agents telephony integration | LiveKit Docs | Events and error handling | LiveKit docs | Observability data hooks | LiveKit docs | Agent insights in LiveKit Cloud | LiveKit docsprehistoric-alligator-43413
11/27/2025, 6:41 PMtall-airline-16756
11/27/2025, 6:41 PMon_session_end callback and persist session.history (which contains turn-by-turn messages and transcripts).
• Example (Python):
async def on_session_end(ctx: JobContext):
with open("transcript.json", "w") as f:
json.dump(session.history.to_dict(), f, indent=2)
@server.rtc_session(on_session_end=on_session_end)
async def entrypoint(ctx: JobContext):
# agent logic
2) Use Agent Observability (LiveKit Cloud)
• Enable Agent Observability in Project settings > Data and privacy.
• After a session, open the dashboard → Agent insights to view synchronized transcripts and audio.
• Downloadable session ZIPs include transcripts, audio, logs, and metadata.
3) Optional settings
• If you want transcripts immediately rather than synced with audio, start the session with:
await session.start(
room=ctx.room,
room_output_options=RoomOutputOptions(sync_transcription=False)
)
• For TTS word-level timing (Python only), enable use_tts_aligned_transcript=True on AgentSession to get timed words in the transcript.
Tell me which SDK/language you’re using and whether you want JSON, plain text, or a ZIP export — I’ll provide the exact snippet or steps.prehistoric-alligator-43413
11/27/2025, 7:22 PMtall-airline-16756
11/27/2025, 7:22 PM