Skip to content

fix(livekit): show end-of-turn timing - #1132

Merged
David Elner (delner) merged 1 commit into
mainfrom
delner/sdk-851-3-livekit-latency
Nov 18, 2026
Merged

David Elner (delner) merged 1 commit into
mainfrom
delner/sdk-851-3-livekit-latency

Conversation

@delner

Copy link
Copy Markdown
Contributor

Problem

Voice traces do not clearly explain the wait between a user finishing speaking and LiveKit deciding that their turn is complete.

Solution

Add LiveKit’s turn-detection and transcription timings to the relevant turn. Show the wait after speech ends as a visible step:

user_turn
└── livekit.eou_wait   ← speech ends → turn accepted

This makes it easier to understand where response time is spent.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T19:00:26.242505Z 8f55958 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

and delay >= 0
):
wait = _new(
user, "livekit.eou_wait", start_time=stopped, metadata={"contrib.livekit.outcome": "committed"}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this feels like a more generic span we should spec out, eou_wait will apply to basically every other framework out there as well. But I'm fine with this shipping in current state to unblock as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think that's a fine idea. We can migrate it to our schema later.

@delner
David Elner (delner) force-pushed the delner/sdk-851-2-livekit-model-spans branch from 01ddde0 to 601ba26 Compare November 18, 2026 04:14
@delner
David Elner (delner) force-pushed the delner/sdk-851-3-livekit-latency branch from 8f55958 to e68687c Compare November 18, 2026 04:14
Base automatically changed from delner/sdk-851-2-livekit-model-spans to main November 18, 2026 04:23
> 🤖 **This text was AI-generated.**

Voice traces lacked the native timing needed to explain pauses between a
caller's speech and the agent's response. Accepted user turns now include
available end-of-turn and transcription delays. A livekit.eou_wait task
shows the observed interval from speech end to the accepted decision.

```text
user_turn
  user_speech       -> native VAD silence/inference diagnostics
  livekit.eou_wait  -> observed endpointing interval
```

The native user-turn callback duration is attributed through the existing
turn context. Fields use contrib.livekit metadata; missing or invalid
values are omitted. Model timing and usage remain on model children.

Refs: https://linear.app/braintrustdata/issue/SDK-832
@delner
David Elner (delner) force-pushed the delner/sdk-851-3-livekit-latency branch from e68687c to 4877c0e Compare November 18, 2026 04:24
@delner
David Elner (delner) enabled auto-merge (squash) November 18, 2026 04:29
@delner
David Elner (delner) merged commit 5033b48 into main Nov 18, 2026
98 checks passed
@delner
David Elner (delner) deleted the delner/sdk-851-3-livekit-latency branch November 18, 2026 04:33
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