Skip to content

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

Merged
longcw merged 5 commits into
mainfrom
longc/avatar-metrics
May 18, 2026
Merged

feat(avatar): add AvatarMetrics for join latency and playback latency#5581
longcw merged 5 commits into
mainfrom
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.

devin-ai-integration[bot]

This comment was marked as resolved.

@theomonnom
Copy link
Copy Markdown
Member

Let's "undeprecate" metrics_collected when we can.

We should probably rework this event a little bit, but otherwise lgtm.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@longcw longcw merged commit 391c08f into main May 18, 2026
24 checks passed
@longcw longcw deleted the longc/avatar-metrics branch May 18, 2026 08:17
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.

2 participants