Skip to content

Commit 2846a96

Browse files
tlongwell-blocknpub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d
andauthored
feat(huddle): sentence-at-a-time voice-mode guidelines for lower TTS latency (#996)
Signed-off-by: Tyler Longwell <[email protected]> Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
1 parent a1c28f4 commit 2846a96

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

‎desktop/src-tauri/src/huddle/agents.rs‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,36 @@ use crate::{app_state::AppState, events, relay::submit_event};
1717

1818
/// Voice-mode guidelines posted as kind:48106 (huddle guidelines) to the
1919
/// ephemeral channel at huddle start. Agents see them via EOSE replay.
20-
/// Instructs agents on voice-mode etiquette: TTS constraints, brevity, self-selection.
20+
/// Instructs agents on voice-mode etiquette: TTS constraints, brevity,
21+
/// self-selection, and sentence-at-a-time delivery.
22+
///
23+
/// Why sentence-at-a-time: the desktop speaks each agent message as it
24+
/// arrives (queued, in order), so an agent that sends its first sentence
25+
/// immediately — then the rest as separate messages — cuts time-to-first-
26+
/// audio from "full reply generated" to "first sentence generated". This is
27+
/// the prompt-level equivalent of token streaming, with no harness changes.
28+
///
2129
/// Build voice-mode guidelines with the parent channel ID so agents know
2230
/// where "the main channel" is.
2331
pub fn voice_mode_guidelines(parent_channel_id: &str) -> String {
2432
format!(
2533
"\
2634
You are in a live voice huddle attached to channel {parent_channel_id}.
27-
Your text is read aloud via TTS. You will be interrupted when humans speak — this is normal.
35+
Your text is read aloud via TTS, message by message, in the order sent.
36+
37+
Latency matters most: reply IMMEDIATELY — do not compose your full reply
38+
before sending anything. The moment your first sentence is formed, send it
39+
as its own `buzz messages send` tool call: it is what breaks the silence.
40+
Then send each following sentence the same way — one sentence per separate
41+
`buzz messages send` call. Never hold a finished sentence back to bundle it
42+
with the next one.
2843
2944
- If not addressed or relevant: do nothing. Do not respond.
30-
- One or two short sentences max. Start with the answer, no preamble.
45+
- Keep the whole reply short — a few sentences at most. Start with the answer, no preamble.
3146
- No markdown, code blocks, lists, or structured data — say it naturally.
3247
- To share code or detailed data: say \"I'll post that in the main channel\" and do so.
33-
- When tool results are long, summarize the key finding verbally.
34-
- If interrupted, continue naturally. No apologies.
48+
- When you need a tool, say one short sentence first (e.g. \"Let me check.\"), then run it, then summarize the key finding verbally.
49+
- If a new human message arrives mid-reply, you were interrupted: drop your unsent sentences and respond to the new message instead.
3550
- In multi-agent huddles, identify yourself only when needed.
3651
- Use your Buzz tools proactively when asked."
3752
)

0 commit comments

Comments
 (0)