Skip to content

feat(avatar): add AvatarMetrics for join latency and playback latency#5581

Open
longcw wants to merge 2 commits intomainfrom
longc/avatar-metrics
Open

feat(avatar): add AvatarMetrics for join latency and playback latency#5581
longcw wants to merge 2 commits intomainfrom
longc/avatar-metrics

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented Apr 28, 2026

Summary

  • Add AvatarMetrics emitting avatar_join_latency (session start → avatar participant joined with video track) and playback_latency (first audio frame forwarded → playback started).
  • Wire metric emission into the base AvatarSession so all avatar plugins emit metrics_collected without per-plugin code.
  • Make avatar_identity an abstract property and add an overridable provider property; apply both across all 13 avatar plugins (tavus, bey, anam, simli, avatario, avatartalk, liveavatar, lemonslice, runway, keyframe, did, trugen, bithuman).

Introduce AvatarMetrics emitting two signals:
- avatar_join_latency: time between session start and avatar participant joining with video track published
- playback_latency: delay from forwarding first audio frame to the avatar to playback start

Wire metric emission into the base AvatarSession via a new abstract
avatar_identity property and an overridable provider property, so all
13 avatar plugins (tavus, bey, anam, simli, avatario, avatartalk,
liveavatar, lemonslice, runway, keyframe, did, trugen, bithuman) emit
metrics_collected events without per-plugin metric code.
@chenghao-mou chenghao-mou requested a review from a team April 28, 2026 10:40
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 8 additional findings in Devin Review.

Open in Devin Review

Comment thread livekit-agents/livekit/agents/voice/avatar/_types.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant