how to get call transcripts for telephony in livek...
# ask-ai
p
how to get call transcripts for telephony in livekit agents.
t
Thanks for reaching out, Vaneeza. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to get call transcripts for telephony in LiveKit Agents — here’s what you can do and where to get the transcripts. • Transcripts are generated automatically for telephony (SIP) calls via built-in STT and published to the agent session as text streams (
lk.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):
Copy code
@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.
Copy code
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 docs
p
i want post call files.
t
You're asking for post-call transcript files — here's how to get them. 1) Save transcripts at session end • Use the
on_session_end
callback and persist
session.history
(which contains turn-by-turn messages and transcripts). • Example (Python):
Copy code
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:
Copy code
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.
p
when did livekit release agent observability and the buy phone numbers features?
t
You’re asking when LiveKit released Agent Observability and the ability to buy phone numbers. LiveKit released both features on November 18, 2025 (announced at LiveKit DevDay 2025). Agent Observability launched in beta at that time. Sources: LiveKit DevDay | LiveKit | Streamline Troubleshooting with Agent Observability