@voicethere/agent 0.7.8 → 0.7.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicethere/agent",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "description": "VoiceThere customer agent SDK — IPC types and runtime helpers for sandboxed child bundles",
5
5
  "type": "module",
6
6
  "exports": {
@@ -95,9 +95,9 @@
95
95
  "@node-webrtc-rust/sdk": ">=0.9.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@node-webrtc-rust/helpers": "0.9.0",
99
- "@node-webrtc-rust/sdk": "0.9.0",
100
- "@node-webrtc-rust/signaling": "0.9.0",
98
+ "@node-webrtc-rust/helpers": "0.9.5",
99
+ "@node-webrtc-rust/sdk": "0.9.5",
100
+ "@node-webrtc-rust/signaling": "0.9.5",
101
101
  "@types/node": "22.20.1",
102
102
  "http-server": "14.1.1",
103
103
  "ioredis": "5.11.1",
@@ -6,17 +6,20 @@
6
6
  * - `{ type: "crash_exit" }` → process.exit(1)
7
7
  * - `{ type: "ping", id }` → `{ type: "pong", id }`
8
8
  * - `onUserSpeechFinal` text starting with "crash" → throw
9
- * - other finals → speak(`echo. ${text}`)
9
+ * - other finals → speak(`Okay. ${text}`)
10
10
  * - onSessionStart → speak("ready") after 1s (voice ready waiter)
11
11
  */
12
12
  import { defineAgent, sendToClient, speak } from "@voicethere/agent";
13
13
 
14
- /** TTS echo prefix with a sentence boundary so Piper does not glue words. */
14
+ /**
15
+ * TTS reply prefix with a sentence boundary so Piper does not glue words.
16
+ * Use a word local streaming STT reliably emits a token for (`Okay.`); `echo.`
17
+ * measured ~5% no-token Piper renders. Never glue `echo:` onto the payload.
18
+ */
15
19
  export function formatEchoSpeak(text: string): string {
16
20
  const trimmed = text.trim();
17
21
  if (!trimmed) return "";
18
- // Never glue `echo:` onto the next word; Piper skips "echo colon" on `echo:One`.
19
- return `echo. ${trimmed}`;
22
+ return `Okay. ${trimmed}`;
20
23
  }
21
24
 
22
25
  export const CRASH_AGENT_MESSAGE =
@@ -5,11 +5,15 @@
5
5
  */
6
6
  import { defineAgent, parseChatText, speak } from "@voicethere/agent";
7
7
 
8
- /** TTS echo prefix with a sentence boundary so Piper does not glue words. */
8
+ /**
9
+ * TTS reply prefix with a sentence boundary so Piper does not glue words.
10
+ * Use a word local streaming STT (Kroko Zipformer) reliably emits a token for;
11
+ * `echo.` measured ~5% no-token Piper renders (audio intact). `Okay.` does not.
12
+ */
9
13
  export function formatEchoSpeak(text: string): string {
10
14
  const trimmed = text.trim();
11
15
  if (!trimmed) return "";
12
- return `echo. ${trimmed}`;
16
+ return `Okay. ${trimmed}`;
13
17
  }
14
18
 
15
19
  defineAgent({