@jskit-ai/assistant-voice 0.1.26 → 0.1.28
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.
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@fastify/websocket": "^11.2.0",
|
|
12
|
-
"@jskit-ai/assistant-core": "0.1.
|
|
13
|
-
"@jskit-ai/assistant-runtime": "0.1.
|
|
14
|
-
"@jskit-ai/assistant-voice": "0.1.
|
|
12
|
+
"@jskit-ai/assistant-core": "0.1.228",
|
|
13
|
+
"@jskit-ai/assistant-runtime": "0.1.221",
|
|
14
|
+
"@jskit-ai/assistant-voice": "0.1.28",
|
|
15
15
|
"@jskit-ai/connectors-catalog": "0.1.61",
|
|
16
16
|
"@jskit-ai/http-runtime": "0.1.242",
|
|
17
17
|
"@jskit-ai/kernel": "0.1.244",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/assistant-voice",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Duplex voice conversations with application-owned targets, authorization and speech services.",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"examples"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@jskit-ai/assistant-core": "0.1.
|
|
21
|
+
"@jskit-ai/assistant-core": "0.1.228",
|
|
22
22
|
"@mdi/js": "^7.4.47",
|
|
23
23
|
"ws": "^8.20.1"
|
|
24
24
|
},
|
|
@@ -141,8 +141,9 @@ export function useVoiceConversation(binding, { socketUrl, createTransport = use
|
|
|
141
141
|
}
|
|
142
142
|
function queueNarration(kind, text) {
|
|
143
143
|
// Optional activity uses the original queue but never impersonates a canonical output.
|
|
144
|
-
if (!narrationEnabled()
|
|
145
|
-
|
|
144
|
+
if (!narrationEnabled()) return;
|
|
145
|
+
// Only filler yields to queued speech. Actual messages keep arrival order.
|
|
146
|
+
if (kind === "murmur" && (speechQueue.length || speechActive.value)) return;
|
|
146
147
|
speechQueue.push({ narrationKind: kind, raw: text, consumed: 0, final: true, started: false });
|
|
147
148
|
void drainSpeech();
|
|
148
149
|
}
|
|
@@ -294,7 +295,7 @@ export function useVoiceConversation(binding, { socketUrl, createTransport = use
|
|
|
294
295
|
let reply = replies.get(message.id);
|
|
295
296
|
if (!reply) {
|
|
296
297
|
if (!primed || !readAloud.value || speechSuppressed || seen.has(message.id) || (!final && message.autonomous)) return;
|
|
297
|
-
retireNarration();
|
|
298
|
+
retireNarration(kind => kind === "murmur");
|
|
298
299
|
reply = {
|
|
299
300
|
id: message.id, outputId: message.outputId || message.id, streamId: message.streamId,
|
|
300
301
|
raw: "", consumed: 0, spokenCharacters: 0, speechCapped: false,
|
|
@@ -311,7 +312,7 @@ export function useVoiceConversation(binding, { socketUrl, createTransport = use
|
|
|
311
312
|
if (reply.turnId && voice.activeSpeechTurnId.value === reply.turnId) voice.stopSpeaking("page-hidden");
|
|
312
313
|
return;
|
|
313
314
|
}
|
|
314
|
-
if (final) retireNarration();
|
|
315
|
+
if (final) retireNarration(kind => kind === "murmur");
|
|
315
316
|
const text = String(message.text || "").slice(0, VOICE_MAX_SPEECH_TEXT_CHARACTERS * 2);
|
|
316
317
|
const spokenPrefix = reply.raw.slice(0, reply.consumed);
|
|
317
318
|
if (!text.startsWith(spokenPrefix) && !(final && text.trimEnd() === spokenPrefix.trimEnd())) {
|