Skip to content

berd-call: log how long speech was held and took to be heard - #422

Closed
johnmatthewtennant wants to merge 3 commits into
mainfrom
damon/speak-timing
Closed

johnmatthewtennant wants to merge 3 commits into
mainfrom
damon/speak-timing

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

John asked how to benchmark voice-call latency. Replies often feel slow, even for small asks, and he suspects speech detection is holding them. berd-call speak only shows when a reply finished. That time includes waiting while you talk, synthesis and the whole of playback, so the actual silence can't be separated out.

berd-call already receives admitted when the voice session stops holding a prepared speech, and speech_started when the player accepts its first PCM chunk, but it discards both. With this change the call writes a diagnostic line to stderr for each event: berd-call: speech admitted after N ms and berd-call: speech first audio accepted after N ms. Both are measured from when the voice session was asked to speak. The speak result and every other command's output are unchanged.

Related issue

N/A. None found.

Testing

The host_session tests pass, apart from spokesperson_results_change_and_save_only_its_voice, which also fails on main. The change adds no result fields or control flow; it only prints at events that were previously discarded. No live call has been run with this exact build yet.

johnmatthewtennant and others added 2 commits October 22, 2026 08:31
A speak result now says, in milliseconds from when the voice session
was asked to say it, when the session stopped holding it while you
talked (`heldMs`) and when its first audio played (`firstAudioMs`).
Hosts can then tell waiting for you, synthesis and playback apart
when measuring a call's response latency.

Co-authored-by: Damon <8a08290d889f1c68921542bfe9631d4cd671be9bea5f1114951f386819e4c10a@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
speech_started follows the first accepted PCM chunk, and a suspension
can still hold playback after it, so document exactly what is measured.

Co-authored-by: Damon <8a08290d889f1c68921542bfe9631d4cd671be9bea5f1114951f386819e4c10a@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
Keep the speak result unchanged and report when speech was admitted
and when its first audio was accepted as stderr diagnostics.

Co-authored-by: Damon <8a08290d889f1c68921542bfe9631d4cd671be9bea5f1114951f386819e4c10a@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@block.xyz>
@johnmatthewtennant johnmatthewtennant changed the title berd-call: report how long speak held speech and took to be heard berd-call: log how long speech was held and took to be heard Oct 22, 2026
@johnmatthewtennant

Copy link
Copy Markdown
Contributor Author

🤖 Consolidated into #426. Its stderr timing diagnostics are preserved; the speak result remains unchanged.

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