Skip to content

fix(lemonslice): bind avatar audio output before the upstream session HTTP call#5837

Merged
theomonnom merged 1 commit into
mainfrom
fix/lemonslice-bind-audio-before-http
May 25, 2026
Merged

fix(lemonslice): bind avatar audio output before the upstream session HTTP call#5837
theomonnom merged 1 commit into
mainfrom
fix/lemonslice-bind-audio-before-http

Conversation

@theomonnom
Copy link
Copy Markdown
Member

Summary

Rebind agent_session.output.audio to the avatar-bound DataStreamAudioOutput before the LemonSlice session-creation HTTP call instead of after. The call is on the order of a second, and during a mid-session avatar swap any generate_reply triggered in that gap stays routed to the previous audio destination. wait_remote_track=KIND_VIDEO buffers frames until the new video track actually shows up, so binding early doesn't drop audio.

Test plan

  • Confirm mid-session persona swaps in the LemonSlice avatar example route their first post-swap utterance to the new avatar's audio path.
  • First-time avatar bring-up still works (no regression: wait_remote_track keeps frames buffered until the video track arrives).

… HTTP call

Rebinding agent_session.output.audio happened after the LemonSlice
session HTTP call returned, which is on the order of a second and
during a persona swap leaves any generations triggered in the gap
routed to the previous audio destination. wait_remote_track buffers
frames until the new video track shows up, so binding before the
HTTP call doesn't drop audio.
@chenghao-mou chenghao-mou requested a review from a team May 25, 2026 05:05
@theomonnom theomonnom merged commit d9a9466 into main May 25, 2026
22 of 23 checks passed
@theomonnom theomonnom deleted the fix/lemonslice-bind-audio-before-http branch May 25, 2026 05:05
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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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