Skip to content

berd-call: stream realtime calls live or at handoffs - #390

Closed
johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/berd-call-stream-user-speech
Closed

johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/berd-call-stream-user-speech

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An Expert driving a realtime (Expert-Spokesperson) call from the CLI should hear the conversation the way a GPT-Live client delegate does: only when the Spokesperson hands off, with everything said since the last handoff. Until now start --stream and --codex also flushed after every Spokesperson reply, waking the Expert on each turn. Meanwhile a host that shows the call as it happens (the Buzz Berd Call plugin) saw the user's words only after the reply had played, and the Spokesperson's reply only after playback finished.

berd-call start now has two stream modes for Expert-Spokesperson calls:

  • Handoffs (bare --stream, --stream handoffs, and --codex): no rows until the Spokesperson hands off, then every row since the last handoff, ending with the handoff row.
  • Live (--stream live): a user row as soon as the words are transcribed, and a spokesperson_generated row (cursor 0) as soon as a reply is generated, before it is spoken. A generated reply waits while user speech is still being transcribed, so the stream reads in order. The spokesperson or spokesperson_interrupted row after playback still carries the cursor and what was heard, and user rows already shown are left out of the Expert batch.

Conventional calls have no handoffs, so they keep streaming every row.

The session process emits the live previews as two new messages, user_transcribed and spokesperson_generated (documented in PROTOCOL.md). The transcript recorded after playback stays authoritative, and Expert delivery is unchanged.

Related issue

None found. The design follows OpenAI's GPT-Live client delegation.

Testing

  • handoffs_stream_holds_rows_until_a_handoff: a handoffs stream emits nothing for user and Spokesperson turns. At the handoff, it emits every row since the last handoff, ending with the handoff row.
  • expert_batches_leave_out_user_rows_already_streamed: in a live stream, user rows already shown as user_transcribed are left out of the Expert's batch.
  • generated_replies_wait_for_the_words_they_answer_and_are_shown_once: a generated reply is held until the user's words it answers have been shown, and is shown only once.
  • In live Buzz calls with --stream live, the user's words and the Spokesperson's replies appeared in the channel as they were said.

An Expert driving a realtime call from the CLI should hear the
conversation the way a GPT-Live delegate does: only when the
Spokesperson hands off, with everything said since the last handoff.
Until now `start --stream` and `--codex` also flushed after every
Spokesperson reply, waking the Expert on each turn, while a host that
shows the call as it happens saw the user's words only once the reply
had played.

Bare `--stream` (or `--stream handoffs`) and `--codex` now hold rows
until a handoff. `--stream live` shows the conversation as it happens:
a `user` row as soon as the words are transcribed, and a
`spokesperson_generated` row as soon as a reply is generated, before it
is spoken and only once no user speech is still being transcribed. The
session emits these as `user_transcribed` and `spokesperson_generated`
previews; the transcript recorded after playback stays authoritative.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@johnmatthewtennant

Copy link
Copy Markdown
Contributor Author

🤖 Combined into #397 with its commits kept, so the stack no longer needs restacking and review covers one diff. Open review findings carry over there. (AI-generated comment)

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