@flowingspring/dsh-voco 0.3.5 → 0.3.6
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/README.i18n.yaml +2 -2
- package/README.md +5 -5
- package/README.zh.md +5 -5
- package/lib/client.js +27 -27
- package/lib/plugins/voice-assistant.js +27 -0
- package/package.json +27 -27
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/bundle/voice-app/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 3582129953c75938c6c08caa11526d5179f0631f
|
|
6
|
+
README.zh.md: f7253637cf50cf5b9677bee512e45fdadd8cc712
|
package/README.md
CHANGED
|
@@ -29,14 +29,14 @@ dsh web
|
|
|
29
29
|
GitHub Releases provide a prebuilt plugin package; no source checkout or pnpm installation is required:
|
|
30
30
|
|
|
31
31
|
```powershell
|
|
32
|
-
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.
|
|
32
|
+
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.6/flowingspring-dsh-voco-0.3.6.tgz
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Release page: [v0.3.
|
|
35
|
+
Release page: [v0.3.6](https://github.com/lgquan/dsh-voco/releases/tag/v0.3.6)
|
|
36
36
|
|
|
37
37
|
## Configure the API key
|
|
38
38
|
|
|
39
|
-
Speech recognition requires your own [SiliconFlow API key](https://siliconflow.cn/). The only configuration name is `SILICONFLOW_API_KEY
|
|
39
|
+
Speech recognition requires your own [SiliconFlow API key](https://siliconflow.cn/). The only configuration name is `SILICONFLOW_API_KEY`. Speech-to-text uses SiliconFlow's currently free [`XingChenAGI/XingChenASR-V3.2-Ultra`](https://cloud.siliconflow.cn/models?target=XingChenAGI/XingChenASR-V3.2-Ultra) model; current availability and pricing are governed by the model page. Edge TTS does not require a key.
|
|
40
40
|
|
|
41
41
|
For a temporary setting, use the same PowerShell session that starts DSH:
|
|
42
42
|
|
|
@@ -80,11 +80,11 @@ Uninstalling does not delete DSH sessions or Voice history.
|
|
|
80
80
|
|
|
81
81
|
## Features
|
|
82
82
|
|
|
83
|
-
- SiliconFlow `XingChenAGI/XingChenASR-V3.2-Ultra` cloud speech
|
|
83
|
+
- SiliconFlow's free [`XingChenAGI/XingChenASR-V3.2-Ultra`](https://cloud.siliconflow.cn/models?target=XingChenAGI/XingChenASR-V3.2-Ultra) cloud speech-to-text model.
|
|
84
84
|
- Edge TTS `zh-CN-XiaoxiaoNeural` voice responses.
|
|
85
85
|
- Interruption, navigation, reconnects, and restored history.
|
|
86
86
|
- Immediate acknowledgement before delegation; full reports remain in the DSH task UI.
|
|
87
|
-
- Optional `@flowingspring/dsh-workspace-memory` integration.
|
|
87
|
+
- Optional `@flowingspring/dsh-workspace-memory` integration for both the source Voice Session and every completed delegated child task.
|
|
88
88
|
|
|
89
89
|
## Troubleshooting
|
|
90
90
|
|
package/README.zh.md
CHANGED
|
@@ -29,14 +29,14 @@ dsh web
|
|
|
29
29
|
GitHub Release 提供已经构建好的插件包,不需要下载源码或安装 pnpm:
|
|
30
30
|
|
|
31
31
|
```powershell
|
|
32
|
-
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.
|
|
32
|
+
dsh plugin --profile web add https://github.com/lgquan/dsh-voco/releases/download/v0.3.6/flowingspring-dsh-voco-0.3.6.tgz
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Release 页面:[v0.3.
|
|
35
|
+
Release 页面:[v0.3.6](https://github.com/lgquan/dsh-voco/releases/tag/v0.3.6)
|
|
36
36
|
|
|
37
37
|
## 配置 API Key
|
|
38
38
|
|
|
39
|
-
语音识别需要你自己的[硅基流动 API Key](https://siliconflow.cn/),配置名只有一个:`SILICONFLOW_API_KEY
|
|
39
|
+
语音识别需要你自己的[硅基流动 API Key](https://siliconflow.cn/),配置名只有一个:`SILICONFLOW_API_KEY`。语音转文字使用硅基流动当前免费的 [`XingChenAGI/XingChenASR-V3.2-Ultra`](https://cloud.siliconflow.cn/models?target=XingChenAGI/XingChenASR-V3.2-Ultra);免费状态和使用规则以模型页面为准。Edge TTS 不需要 API Key。
|
|
40
40
|
|
|
41
41
|
在启动 DSH 的同一个 PowerShell 中临时设置:
|
|
42
42
|
|
|
@@ -80,11 +80,11 @@ dsh plugin --profile web remove @flowingspring/dsh-voco
|
|
|
80
80
|
|
|
81
81
|
## 功能
|
|
82
82
|
|
|
83
|
-
- SiliconFlow `XingChenAGI/XingChenASR-V3.2-Ultra`
|
|
83
|
+
- SiliconFlow 免费模型 [`XingChenAGI/XingChenASR-V3.2-Ultra`](https://cloud.siliconflow.cn/models?target=XingChenAGI/XingChenASR-V3.2-Ultra) 云端语音转文字。
|
|
84
84
|
- Edge TTS `zh-CN-XiaoxiaoNeural` 语音回复。
|
|
85
85
|
- 语音打断、页面切换、断线重连和历史恢复。
|
|
86
86
|
- 委派前即时确认,完整报告保留在 DSH 任务界面。
|
|
87
|
-
- 可选接入 `@flowingspring/dsh-workspace-memory
|
|
87
|
+
- 可选接入 `@flowingspring/dsh-workspace-memory`,让语音主会话和每个完成的委派子任务共享同一 Workspace 长期记忆范围。
|
|
88
88
|
|
|
89
89
|
## 排查
|
|
90
90
|
|
package/lib/client.js
CHANGED
|
@@ -20,11 +20,11 @@ window.__ModuleLoader__.load({
|
|
|
20
20
|
document.head.appendChild(tag);
|
|
21
21
|
}
|
|
22
22
|
var VoiceControl_module_css_default = {
|
|
23
|
-
"controls": "TFZsua_controls",
|
|
24
|
-
"active": "TFZsua_active",
|
|
25
23
|
"interruptButton": "TFZsua_interruptButton",
|
|
24
|
+
"voice-pulse": "TFZsua_voice-pulse",
|
|
25
|
+
"controls": "TFZsua_controls",
|
|
26
26
|
"button": "TFZsua_button",
|
|
27
|
-
"
|
|
27
|
+
"active": "TFZsua_active"
|
|
28
28
|
};
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region ../ui-voice/src/client/VoiceControl.tsx
|
|
@@ -163,23 +163,23 @@ window.__ModuleLoader__.load({
|
|
|
163
163
|
document.head.appendChild(tag);
|
|
164
164
|
}
|
|
165
165
|
var VoiceNodeViews_module_css_default = {
|
|
166
|
-
"
|
|
167
|
-
"taskSummary": "Kt2smW_taskSummary",
|
|
168
|
-
"taskLink": "Kt2smW_taskLink",
|
|
169
|
-
"taskCancel": "Kt2smW_taskCancel",
|
|
170
|
-
"taskTitle": "Kt2smW_taskTitle",
|
|
166
|
+
"bubble": "Kt2smW_bubble",
|
|
171
167
|
"taskDetails": "Kt2smW_taskDetails",
|
|
168
|
+
"taskUpdate": "Kt2smW_taskUpdate",
|
|
169
|
+
"voiceBadge": "Kt2smW_voiceBadge",
|
|
170
|
+
"meta": "Kt2smW_meta",
|
|
171
|
+
"utterance": "Kt2smW_utterance",
|
|
172
|
+
"taskCard": "Kt2smW_taskCard",
|
|
172
173
|
"taskInput": "Kt2smW_taskInput",
|
|
173
174
|
"taskDot": "Kt2smW_taskDot",
|
|
174
175
|
"taskChevron": "Kt2smW_taskChevron",
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
176
|
+
"taskLink": "Kt2smW_taskLink",
|
|
177
|
+
"taskTitle": "Kt2smW_taskTitle",
|
|
178
|
+
"taskActions": "Kt2smW_taskActions",
|
|
178
179
|
"miniWave": "Kt2smW_miniWave",
|
|
180
|
+
"taskSummary": "Kt2smW_taskSummary",
|
|
179
181
|
"taskStatus": "Kt2smW_taskStatus",
|
|
180
|
-
"
|
|
181
|
-
"taskCard": "Kt2smW_taskCard",
|
|
182
|
-
"bubble": "Kt2smW_bubble"
|
|
182
|
+
"taskCancel": "Kt2smW_taskCancel"
|
|
183
183
|
};
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region ../ui-voice/src/client/VoiceNodeViews.tsx
|
|
@@ -317,11 +317,11 @@ window.__ModuleLoader__.load({
|
|
|
317
317
|
document.head.appendChild(tag);
|
|
318
318
|
}
|
|
319
319
|
var VoiceOverlay_module_css_default = {
|
|
320
|
-
"root": "GPPB2G_root",
|
|
321
|
-
"status": "GPPB2G_status",
|
|
322
|
-
"stop": "GPPB2G_stop",
|
|
323
320
|
"voice-wave": "GPPB2G_voice-wave",
|
|
324
|
-
"wave": "GPPB2G_wave"
|
|
321
|
+
"wave": "GPPB2G_wave",
|
|
322
|
+
"status": "GPPB2G_status",
|
|
323
|
+
"root": "GPPB2G_root",
|
|
324
|
+
"stop": "GPPB2G_stop"
|
|
325
325
|
};
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region ../ui-voice/src/client/VoiceOverlay.tsx
|
|
@@ -380,20 +380,20 @@ window.__ModuleLoader__.load({
|
|
|
380
380
|
document.head.appendChild(tag);
|
|
381
381
|
}
|
|
382
382
|
var VoiceSessionMarkers_module_css_default = {
|
|
383
|
-
"
|
|
384
|
-
"
|
|
385
|
-
"childDot": "_0brRca_childDot",
|
|
386
|
-
"childTime": "_0brRca_childTime",
|
|
387
|
-
"slot": "_0brRca_slot",
|
|
383
|
+
"childMenuButton": "_0brRca_childMenuButton",
|
|
384
|
+
"deleteAction": "_0brRca_deleteAction",
|
|
388
385
|
"child": "_0brRca_child",
|
|
386
|
+
"childMain": "_0brRca_childMain",
|
|
389
387
|
"children": "_0brRca_children",
|
|
390
|
-
"
|
|
388
|
+
"childLabel": "_0brRca_childLabel",
|
|
389
|
+
"childTime": "_0brRca_childTime",
|
|
391
390
|
"childActions": "_0brRca_childActions",
|
|
392
|
-
"deleteAction": "_0brRca_deleteAction",
|
|
393
391
|
"deleteStatus": "_0brRca_deleteStatus",
|
|
394
|
-
"
|
|
392
|
+
"deleteError": "_0brRca_deleteError",
|
|
393
|
+
"slot": "_0brRca_slot",
|
|
395
394
|
"marker": "_0brRca_marker",
|
|
396
|
-
"
|
|
395
|
+
"toggle": "_0brRca_toggle",
|
|
396
|
+
"childDot": "_0brRca_childDot"
|
|
397
397
|
};
|
|
398
398
|
//#endregion
|
|
399
399
|
//#region ../ui-voice/src/client/VoiceSessionMarkers.tsx
|
|
@@ -5720,6 +5720,31 @@ function apply(ctx, config = {}) {
|
|
|
5720
5720
|
ctx.logger.warn(error instanceof Error ? error : new Error(String(error)));
|
|
5721
5721
|
});
|
|
5722
5722
|
};
|
|
5723
|
+
const submitTaskMemory = (task) => {
|
|
5724
|
+
if (task.interactionMode !== "frontend-agent") return;
|
|
5725
|
+
const memory = optionalWorkspaceMemory(ctx);
|
|
5726
|
+
if (memory === void 0) return;
|
|
5727
|
+
const request = task.requestText.trim();
|
|
5728
|
+
const result = (task.completionDetail ?? task.lastAssistantMessage?.text ?? "").trim();
|
|
5729
|
+
const prefix = `voice-task:${String(task.id)}`;
|
|
5730
|
+
const messages = [...request === "" ? [] : [{
|
|
5731
|
+
id: `${prefix}:request`,
|
|
5732
|
+
role: "user",
|
|
5733
|
+
text: request
|
|
5734
|
+
}], ...result === "" ? [] : [{
|
|
5735
|
+
id: `${prefix}:result`,
|
|
5736
|
+
role: "assistant",
|
|
5737
|
+
text: result
|
|
5738
|
+
}]];
|
|
5739
|
+
if (messages.length === 0) return;
|
|
5740
|
+
memory.checkpoint({
|
|
5741
|
+
sessionId: task.taskSessionId,
|
|
5742
|
+
messages,
|
|
5743
|
+
reason: "task-end"
|
|
5744
|
+
}).catch((error) => {
|
|
5745
|
+
ctx.logger.warn(error instanceof Error ? error : new Error(String(error)));
|
|
5746
|
+
});
|
|
5747
|
+
};
|
|
5723
5748
|
const markVoiceTurn = (binding) => {
|
|
5724
5749
|
if (binding.interactionMode !== "frontend-agent" || binding.voiceTurnMarked) return;
|
|
5725
5750
|
const session = requireSourceSession(binding);
|
|
@@ -6325,12 +6350,14 @@ function apply(ctx, config = {}) {
|
|
|
6325
6350
|
}
|
|
6326
6351
|
const deliverAssistantSpeech = !hasLlm || !ctx.voice.supportsSpeechText(binding.voiceSessionId);
|
|
6327
6352
|
enqueue(binding, () => {
|
|
6353
|
+
const terminalTask = event.type === "turn/end" && event.data.reason.kind === "completed" && binding.active?.taskTurn === event.data.turn ? binding.active : void 0;
|
|
6328
6354
|
if (observeSessionEvent(binding, event, append, config, (error) => {
|
|
6329
6355
|
ctx.logger.warn(error instanceof Error ? error : new Error(String(error)));
|
|
6330
6356
|
}, (task, text) => {
|
|
6331
6357
|
if (deliverAssistantSpeech) ctx.voice.requestResponse(binding.voiceSessionId, { kind: "automatic" });
|
|
6332
6358
|
else rewriteAndSpeak(binding, task.id, task.requestText, text);
|
|
6333
6359
|
}, deliverAssistantSpeech)) {
|
|
6360
|
+
if (terminalTask !== void 0) submitTaskMemory(terminalTask);
|
|
6334
6361
|
if ((config.taskSessionPolicy ?? "isolated") === "isolated") taskBindings.delete(session.id);
|
|
6335
6362
|
}
|
|
6336
6363
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
2
|
"name": "@flowingspring/dsh-voco",
|
|
3
3
|
"description": "Persistent voice conversations for DSH with cloud speech recognition, Edge TTS, and background Agent delegation",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.6",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
7
7
|
"dsh",
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/lgquan/dsh-voco/issues"
|
|
17
17
|
},
|
|
18
|
-
"publishConfig": {
|
|
19
|
-
"access": "public"
|
|
20
|
-
},
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/lgquan/dsh-voco.git",
|
|
24
|
-
"directory": "packages/voice-app"
|
|
25
|
-
},
|
|
26
|
-
"type": "module",
|
|
27
|
-
"main": "lib/index.js",
|
|
28
|
-
"types": "lib/types/index.d.ts",
|
|
29
|
-
"exports": {
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/lgquan/dsh-voco.git",
|
|
24
|
+
"directory": "packages/voice-app"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "lib/index.js",
|
|
28
|
+
"types": "lib/types/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
30
|
".": {
|
|
31
31
|
"types": "./lib/types/index.d.ts",
|
|
32
32
|
"default": "./lib/index.js"
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"./voice-web": "./lib/plugins/voice-web.js",
|
|
46
46
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
|
-
},
|
|
49
|
-
"files": [
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
50
|
"lib/index.js",
|
|
51
51
|
"lib/invariant.js",
|
|
52
52
|
"lib/client.js",
|
|
53
53
|
"lib/client.js.map",
|
|
54
54
|
"lib/plugins/*.js",
|
|
55
55
|
"cordis.patch.yml",
|
|
56
|
-
"lib/types/**/*.d.ts"
|
|
57
|
-
],
|
|
58
|
-
"license": "MIT",
|
|
56
|
+
"lib/types/**/*.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"license": "MIT",
|
|
59
59
|
"dsh": {
|
|
60
60
|
"bundle": {
|
|
61
61
|
"patch": "./cordis.patch.yml"
|
|
@@ -121,15 +121,15 @@
|
|
|
121
121
|
"@deepseek-ai/dsh-system-prompt": "^0.1.1-rc.1",
|
|
122
122
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.1",
|
|
123
123
|
"@deepseek-ai/dsh-workspace": "^0.1.1-rc.1",
|
|
124
|
-
"@flowingspring/dsh-client-ui-voice": "workspace:*",
|
|
125
|
-
"@flowingspring/dsh-llm-tool-call-compat": "workspace:*",
|
|
126
|
-
"@flowingspring/dsh-voice": "workspace:*",
|
|
127
|
-
"@flowingspring/dsh-voice-assistant": "workspace:*",
|
|
128
|
-
"@flowingspring/dsh-voice-local": "workspace:*",
|
|
129
|
-
"@flowingspring/dsh-voice-web": "workspace:*",
|
|
130
124
|
"@types/react": "~18.3.1",
|
|
131
125
|
"@types/ws": "^8.18.1",
|
|
132
126
|
"react": "^18.2.0",
|
|
133
|
-
"react-dom": "^18.2.0"
|
|
127
|
+
"react-dom": "^18.2.0",
|
|
128
|
+
"@flowingspring/dsh-voice-local": "0.1.0",
|
|
129
|
+
"@flowingspring/dsh-client-ui-voice": "0.1.2",
|
|
130
|
+
"@flowingspring/dsh-llm-tool-call-compat": "0.1.0",
|
|
131
|
+
"@flowingspring/dsh-voice": "0.1.2",
|
|
132
|
+
"@flowingspring/dsh-voice-web": "0.1.2",
|
|
133
|
+
"@flowingspring/dsh-voice-assistant": "0.1.2"
|
|
134
134
|
}
|
|
135
|
-
}
|
|
135
|
+
}
|