@voicethere/agent 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ The `fillers` block in `voicethere.llm.json` lists short sentences the agent spe
22
22
 
23
23
  ```json
24
24
  "fillers": {
25
- "thinking": { "phrases": ["Hmm.", "Okay.", "Mm-hm.", "Right."], "afterMs": 1500 },
25
+ "thinking": { "phrases": ["Okay.", "Right.", "Sure.", "Let me see."], "afterMs": 1500 },
26
26
  "toolCall": { "phrases": ["Let me check that for you.", "One moment, I'll look that up."] },
27
27
  "toolWait": { "phrases": ["Still checking, one moment.", "Almost there."], "afterMs": 4000 },
28
28
  "interruptible": true
@@ -41,6 +41,10 @@ The `fillers` block in `voicethere.llm.json` lists short sentences the agent spe
41
41
 
42
42
  `speech.coalesceMs` (0 to 1000, default 150) sets how long the agent holds a finished sentence to join it with the next one. Sentences that complete within the window are spoken as one utterance, so a reply the model returns at once has no gap between its sentences. The buffer is also spoken when the stream ends, at 400 characters, or when a tool call starts. Chat `assistant_delta` messages are not delayed. `0` speaks every sentence on its own.
43
43
 
44
+ ## Client messages for voice replies
45
+
46
+ A voice reply also reaches the client as text. Each spoken sentence arrives as `{ "type": "assistant_delta", "turnId", "text", "spoken": true }`, and the turn ends with one `{ "type": "assistant_done", "turnId", "text", "spoken": true, "status" }`. `status` is `completed`, `failed`, `interrupted` or `cancelled`, and `text` holds the sentences delivered so far. When the runner sends an utterance id for the caller's final (`SpeechContext.utteranceId` in `onUserSpeechFinal`), both messages also carry `inReplyTo`, the caller utterance the reply answers. Render one line per `turnId` and reveal it as the speech plays. Typed (chat) turns keep sending `assistant_delta`, `assistant_done` and `chat_reply` without `spoken`. Fillers are never sent as text.
47
+
44
48
  ## Prompt guidance for phone calls
45
49
 
46
50
  The template prompt ends with a "Voice call" section. In your own agent you can append the same text with `CALL_AGENT_PROMPT_GUIDANCE` from `@voicethere/agent/llm`:
@@ -13,7 +13,7 @@
13
13
  "history": { "turns": 20, "interruptionNote": true },
14
14
  "fillers": {
15
15
  "thinking": {
16
- "phrases": ["Hmm.", "Okay.", "Mm-hm.", "Right."],
16
+ "phrases": ["Okay.", "Right.", "Sure.", "Let me see."],
17
17
  "afterMs": 1500
18
18
  },
19
19
  "toolCall": {
@@ -50,7 +50,7 @@ The `fillers` block in `voicethere.llm.json` lists short sentences the agent spe
50
50
 
51
51
  ```json
52
52
  "fillers": {
53
- "thinking": { "phrases": ["Hmm.", "Okay.", "Mm-hm.", "Right."], "afterMs": 1500 },
53
+ "thinking": { "phrases": ["Okay.", "Right.", "Sure.", "Let me see."], "afterMs": 1500 },
54
54
  "toolCall": { "phrases": ["Let me check that for you.", "One moment, I'll look that up."] },
55
55
  "toolWait": { "phrases": ["Still checking, one moment.", "Almost there."], "afterMs": 4000 },
56
56
  "interruptible": true
@@ -13,7 +13,7 @@
13
13
  "history": { "turns": 20, "interruptionNote": true },
14
14
  "fillers": {
15
15
  "thinking": {
16
- "phrases": ["Hmm.", "Okay.", "Mm-hm.", "Right."],
16
+ "phrases": ["Okay.", "Right.", "Sure.", "Let me see."],
17
17
  "afterMs": 1500
18
18
  },
19
19
  "toolCall": {