rapid-honey-43838
03/04/2026, 10:55 PMtall-airline-16756
03/04/2026, 10:55 PMtall-airline-16756
03/04/2026, 10:55 PMrapid-honey-43838
03/04/2026, 10:57 PMtall-airline-16756
03/04/2026, 10:57 PMrapid-honey-43838
03/04/2026, 10:57 PMtall-airline-16756
03/04/2026, 10:57 PMrapid-honey-43838
03/04/2026, 10:58 PMtall-airline-16756
03/04/2026, 10:59 PMimport numpy as np
# Example arrays of per-turn latencies in seconds (you will compute these from transcript timestamps)
ttft_values = [0.45, 0.32, 0.67, 0.51, 0.49, 0.88, 0.41, 0.53, 0.71, 0.62]
full_values = [1.20, 0.98, 1.50, 1.10, 1.05, 1.90, 0.95, 1.12, 1.40, 1.28]
def compute_percentiles(values):
if not values:
return {}
p50 = np.percentile(values, 50)
p90 = np.percentile(values, 90)
p99 = np.percentile(values, 99)
return {"p50": p50, "p90": p90, "p99": p99}
print("TTFT:", compute_percentiles(ttft_values))
print("Full reply:", compute_percentiles(full_values))
5) Notes & accuracy tips
• Ensure timestamps use the same clock and timezone. If events are produced by different services, ensure clock sync (NTP) or use server-side event ordering fields.
• Use the same start event across all samples (speech end vs audio arrival).
• Exclude partial/errored turns (e.g., cancelled or interrupted) unless you explicitly want to include them.
• For small N, p99 may not be meaningful; report sample size alongside percentiles.
• If you want to compute percentiles over a time window or per-room/agent, group samples accordingly before computing.
6) Want me to produce a ready-to-run extractor? I can provide a short extractor script that:
• Parses a JSON/CSV conversation transcript,
• Computes per-turn ttft and full reply times using the exact field names you have,
• Outputs p50/p90/p99 and sample counts.
If so, tell me:
• The exact field names in your transcript for user speech end, agent first token, and agent final token (examples: user_end_ts, agent_first_audio_ts, agent_last_audio_ts),
• Whether timestamps are Unix seconds, milliseconds, or ISO strings.
Would you like that extractor script?
Sources: Text and transcriptions | LiveKit Documentation | examples/frontdesk | livekit/livekit_composite | DeepWiki | Agents (Python) | livekit/livekit_composite | DeepWiki | LLM Metrics | LiveKit Documentation | TTS Metrics | LiveKit Documentation