Skip to content

feat: add voice latency and interruptions scorers - #238

Draft
kev (kevchoi) wants to merge 3 commits into
kevchoi/20261002-voice-task-successfrom
kevchoi/20261002-voice-timing-scorers
Draft

kev (kevchoi) wants to merge 3 commits into
kevchoi/20261002-voice-task-successfrom
kevchoi/20261002-voice-timing-scorers

Conversation

@kevchoi

@kevchoi kev (kevchoi) commented Oct 7, 2026 •

Copy link
Copy Markdown

AI-created or modified and not human-reviewed in its current form; treat this artifact as provisional. Updated 2026-10-07.

Summary

Adds two deterministic voice scorers, VoiceLatency and VoiceInterruptions, in TypeScript and Python. They score the timing of a voice call from a list of utterances and make no model call.

  • Both take a named utterances argument: { speaker: "user" | "agent", start_unix_ms, end_unix_ms, interrupted? }[]. These are the timing fields of Utterance in Braintrust's voice trace reader (@braintrust/local-voice). Customers build the list from their own traces.
  • Both group the user's speech into turns the same way and find the agent's reply to each turn.
  • VoiceLatency: the share of agent replies that start within maxGapMs (default 1500) of the user finishing a turn. Metadata has p50_ms, p95_ms, gaps_ms, replies, unanswered_turns and max_gap_ms.
  • VoiceInterruptions: the share of user turns the agent didn't talk over. Talking over means the agent starts during the turn and overlaps it by more than minOverlapMs (default 300). Barge-ins, where the user cuts the agent off, are reported in metadata and don't affect the score.
  • Invalid utterances are skipped and counted in skipped. Without timed utterances the score is null.
  • Lists both under a "Voice" group in js/manifest.ts, so they appear as built-in scorers. The server passes them utterances from the trace in a separate braintrust PR; until that lands, the built-ins score null.
  • SCORERS.md documents the turn rules, timestamp expectations and limits; README.md lists both.

Testing

  • Voice tests pass: the same 8 in JS (vitest) and Python (pytest).
  • JS build and pre-commit linters passed on the changed files. The one tsc --noEmit error is the existing one in js/render-messages.test.ts.
  • Not run on real voice calls. The default thresholds follow Hamming's published bands and haven't been tuned.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Braintrust eval report

Autoevals (HEAD-1791387780)

Score Average Improvements Regressions
NumericDiff 78.5% (+1pp) 7 🟢 5 🔴
Time_to_first_token 6.6tok (-1.84tok) 182 🟢 37 🔴
Llm_calls 1.55 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 516.5tok (+2.61tok) 18 🟢 25 🔴
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 473.1tok (+6.38tok) 95 🟢 117 🔴
Completion_reasoning_tokens 359.27tok (+11.64tok) 75 🟢 99 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 989.6tok (+8.99tok) 96 🟢 117 🔴
Estimated_cost 0$ (+0$) 59 🟢 73 🔴
Duration 6.6s (-1.84s) 182 🟢 37 🔴
Llm_duration 7.11s (-1.98s) 182 🟢 37 🔴

@kevchoi
kev (kevchoi) force-pushed the kevchoi/20261002-voice-timing-scorers branch from 91e9013 to d5fefd9 Compare October 7, 2026 14:34
@kevchoi
kev (kevchoi) changed the base branch from main to kevchoi/20261002-voice-task-success-sdk October 7, 2026 14:34
@kevchoi
kev (kevchoi) added this pull request to stack #240 October 7, 2026 14:35
@kevchoi
kev (kevchoi) removed this pull request from stack #240 October 7, 2026 14:50
@kevchoi
kev (kevchoi) changed the base branch from kevchoi/20261002-voice-task-success-sdk to kevchoi/20261002-voice-task-success October 7, 2026 14:50
@kevchoi
kev (kevchoi) added this pull request to stack #242 October 7, 2026 14:50
kev (kevchoi) and others added 3 commits October 7, 2026 11:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kevchoi
kev (kevchoi) force-pushed the kevchoi/20261002-voice-timing-scorers branch from d5fefd9 to d892368 Compare October 7, 2026 15:42

This branch has not been deployed

No deployments
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