@flowingspring/dsh-voco 0.2.5 → 0.2.7
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/LICENSE +21 -21
- package/README.md +56 -56
- package/README.zh.md +56 -56
- package/cordis.patch.yml +13 -13
- package/lib/client.js +155 -69
- package/lib/client.js.map +1 -1
- package/lib/plugins/voice-assistant.js +68 -2
- package/package.json +132 -132
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 QUAN
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 QUAN
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# `@flowingspring/dsh-voco`
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@flowingspring/dsh-voco)
|
|
4
|
-
[](https://github.com/lgquan/dsh-voco/blob/master/LICENSE)
|
|
5
|
-
|
|
6
|
-
English | [中文](README.zh.md)
|
|
7
|
-
|
|
8
|
-
Persistent, interruptible voice conversations for the DSH Web UI. Speak naturally, get an immediate conversational response, and delegate workspace tasks to a durable background Agent Session without losing context.
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
```sh
|
|
13
|
-
dsh plugin --profile web add @flowingspring/dsh-voco
|
|
14
|
-
dsh web
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Install the DSH CLI first if needed:
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
npm install -g @deepseek-ai/dsh
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Configure speech recognition
|
|
24
|
-
|
|
25
|
-
Set a [SiliconFlow](https://siliconflow.cn/) API key in the DSH environment:
|
|
26
|
-
|
|
27
|
-
```dotenv
|
|
28
|
-
SILICONFLOW_API_KEY=your-key
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The plugin uses `XingChenAGI/XingChenASR-V3.2-Ultra` for cloud speech recognition and Edge TTS with `zh-CN-XiaoxiaoNeural` for speech output. Browser audio is uploaded only after lightweight local speech and silence detection.
|
|
32
|
-
|
|
33
|
-
## Highlights
|
|
34
|
-
|
|
35
|
-
- Keeps one background Agent Session bound to each Voice Session, including after DSH restarts.
|
|
36
|
-
- Answers ordinary conversation directly and delegates only work that needs tools.
|
|
37
|
-
- Speaks a short contextual acknowledgement before starting delegated Agent work.
|
|
38
|
-
- Keeps full task reports in the task UI while speaking a concise, purpose-written result.
|
|
39
|
-
- Supports interruption, browser navigation, reconnects, and restored conversation history.
|
|
40
|
-
- Ships the server and browser surfaces as one public npm package.
|
|
41
|
-
|
|
42
|
-
## Configuration
|
|
43
|
-
|
|
44
|
-
The default utterance boundary is 1.5 seconds of continuous silence. Advanced settings such as `silenceDurationMs`, `speechThreshold`, `minSpeechDurationMs`, and `maxUtteranceMs` are available in the plugin profile configuration.
|
|
45
|
-
|
|
46
|
-
## Requirements and limitations
|
|
47
|
-
|
|
48
|
-
- The microphone and playback surface targets the DSH Web UI and is not a framework-independent browser plugin.
|
|
49
|
-
- Speech recognition requires network access and a SiliconFlow API key.
|
|
50
|
-
- Voice responses currently use the Chinese Xiaoxiao Edge TTS voice by default.
|
|
51
|
-
|
|
52
|
-
Source, development instructions, and issue tracking are available in the [GitHub repository](https://github.com/lgquan/dsh-voco).
|
|
53
|
-
|
|
54
|
-
## License
|
|
55
|
-
|
|
56
|
-
[MIT](LICENSE)
|
|
1
|
+
# `@flowingspring/dsh-voco`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@flowingspring/dsh-voco)
|
|
4
|
+
[](https://github.com/lgquan/dsh-voco/blob/master/LICENSE)
|
|
5
|
+
|
|
6
|
+
English | [中文](README.zh.md)
|
|
7
|
+
|
|
8
|
+
Persistent, interruptible voice conversations for the DSH Web UI. Speak naturally, get an immediate conversational response, and delegate workspace tasks to a durable background Agent Session without losing context.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
dsh plugin --profile web add @flowingspring/dsh-voco
|
|
14
|
+
dsh web
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Install the DSH CLI first if needed:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install -g @deepseek-ai/dsh
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configure speech recognition
|
|
24
|
+
|
|
25
|
+
Set a [SiliconFlow](https://siliconflow.cn/) API key in the DSH environment:
|
|
26
|
+
|
|
27
|
+
```dotenv
|
|
28
|
+
SILICONFLOW_API_KEY=your-key
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The plugin uses `XingChenAGI/XingChenASR-V3.2-Ultra` for cloud speech recognition and Edge TTS with `zh-CN-XiaoxiaoNeural` for speech output. Browser audio is uploaded only after lightweight local speech and silence detection.
|
|
32
|
+
|
|
33
|
+
## Highlights
|
|
34
|
+
|
|
35
|
+
- Keeps one background Agent Session bound to each Voice Session, including after DSH restarts.
|
|
36
|
+
- Answers ordinary conversation directly and delegates only work that needs tools.
|
|
37
|
+
- Speaks a short contextual acknowledgement before starting delegated Agent work.
|
|
38
|
+
- Keeps full task reports in the task UI while speaking a concise, purpose-written result.
|
|
39
|
+
- Supports interruption, browser navigation, reconnects, and restored conversation history.
|
|
40
|
+
- Ships the server and browser surfaces as one public npm package.
|
|
41
|
+
|
|
42
|
+
## Configuration
|
|
43
|
+
|
|
44
|
+
The default utterance boundary is 1.5 seconds of continuous silence. Advanced settings such as `silenceDurationMs`, `speechThreshold`, `minSpeechDurationMs`, and `maxUtteranceMs` are available in the plugin profile configuration.
|
|
45
|
+
|
|
46
|
+
## Requirements and limitations
|
|
47
|
+
|
|
48
|
+
- The microphone and playback surface targets the DSH Web UI and is not a framework-independent browser plugin.
|
|
49
|
+
- Speech recognition requires network access and a SiliconFlow API key.
|
|
50
|
+
- Voice responses currently use the Chinese Xiaoxiao Edge TTS voice by default.
|
|
51
|
+
|
|
52
|
+
Source, development instructions, and issue tracking are available in the [GitHub repository](https://github.com/lgquan/dsh-voco).
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
[MIT](LICENSE)
|
package/README.zh.md
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# `@flowingspring/dsh-voco`
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@flowingspring/dsh-voco)
|
|
4
|
-
[](https://github.com/lgquan/dsh-voco/blob/master/LICENSE)
|
|
5
|
-
|
|
6
|
-
[English](README.md) | 中文
|
|
7
|
-
|
|
8
|
-
面向 DSH Web UI 的可恢复、可打断语音对话插件。你可以自然说出需求、立即获得口语回复,并把需要工具的工作委派给持续复用的后台 Agent Session,而不会丢失任务上下文。
|
|
9
|
-
|
|
10
|
-
## 安装
|
|
11
|
-
|
|
12
|
-
```sh
|
|
13
|
-
dsh plugin --profile web add @flowingspring/dsh-voco
|
|
14
|
-
dsh web
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
如果尚未安装 DSH 命令行:
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
npm install -g @deepseek-ai/dsh
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 配置语音识别
|
|
24
|
-
|
|
25
|
-
在 DSH 的运行环境中设置[硅基流动](https://siliconflow.cn/) API Key:
|
|
26
|
-
|
|
27
|
-
```dotenv
|
|
28
|
-
SILICONFLOW_API_KEY=你的密钥
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
插件使用 `XingChenAGI/XingChenASR-V3.2-Ultra` 完成云端语音识别,并通过 Edge TTS 的 `zh-CN-XiaoxiaoNeural` 音色输出语音。浏览器只在本地做轻量起音和静音检测,确认一句话结束后才上传音频。
|
|
32
|
-
|
|
33
|
-
## 主要功能
|
|
34
|
-
|
|
35
|
-
- 每个 Voice Session 持续绑定一个后台 Agent Session,重启 DSH 后也能恢复。
|
|
36
|
-
- 普通聊天直接回答,只有需要工具的工作才委派给后台 Agent。
|
|
37
|
-
- 委派任务启动前立即播报一句贴合当前请求的简短确认语。
|
|
38
|
-
- 完整任务报告保留在任务界面,语音只播报专门生成的简洁结果。
|
|
39
|
-
- 支持语音打断、页面切换、断线重连以及历史对话恢复。
|
|
40
|
-
- 服务端和浏览器界面统一通过一个公开 npm 包发行。
|
|
41
|
-
|
|
42
|
-
## 配置项
|
|
43
|
-
|
|
44
|
-
默认以连续静音 1.5 秒作为一句话的边界。`silenceDurationMs`、`speechThreshold`、`minSpeechDurationMs` 和 `maxUtteranceMs` 等高级参数可在插件 profile 配置中调整。
|
|
45
|
-
|
|
46
|
-
## 要求与限制
|
|
47
|
-
|
|
48
|
-
- 麦克风和播放界面面向 DSH Web UI,并不是框架无关的浏览器插件。
|
|
49
|
-
- 云端语音识别需要网络连接及硅基流动 API Key。
|
|
50
|
-
- 语音回复目前默认使用 Edge TTS 的中文晓晓音色。
|
|
51
|
-
|
|
52
|
-
源码、开发说明和问题反馈请前往 [GitHub 仓库](https://github.com/lgquan/dsh-voco)。
|
|
53
|
-
|
|
54
|
-
## 许可证
|
|
55
|
-
|
|
56
|
-
[MIT](LICENSE)
|
|
1
|
+
# `@flowingspring/dsh-voco`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@flowingspring/dsh-voco)
|
|
4
|
+
[](https://github.com/lgquan/dsh-voco/blob/master/LICENSE)
|
|
5
|
+
|
|
6
|
+
[English](README.md) | 中文
|
|
7
|
+
|
|
8
|
+
面向 DSH Web UI 的可恢复、可打断语音对话插件。你可以自然说出需求、立即获得口语回复,并把需要工具的工作委派给持续复用的后台 Agent Session,而不会丢失任务上下文。
|
|
9
|
+
|
|
10
|
+
## 安装
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
dsh plugin --profile web add @flowingspring/dsh-voco
|
|
14
|
+
dsh web
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
如果尚未安装 DSH 命令行:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install -g @deepseek-ai/dsh
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 配置语音识别
|
|
24
|
+
|
|
25
|
+
在 DSH 的运行环境中设置[硅基流动](https://siliconflow.cn/) API Key:
|
|
26
|
+
|
|
27
|
+
```dotenv
|
|
28
|
+
SILICONFLOW_API_KEY=你的密钥
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
插件使用 `XingChenAGI/XingChenASR-V3.2-Ultra` 完成云端语音识别,并通过 Edge TTS 的 `zh-CN-XiaoxiaoNeural` 音色输出语音。浏览器只在本地做轻量起音和静音检测,确认一句话结束后才上传音频。
|
|
32
|
+
|
|
33
|
+
## 主要功能
|
|
34
|
+
|
|
35
|
+
- 每个 Voice Session 持续绑定一个后台 Agent Session,重启 DSH 后也能恢复。
|
|
36
|
+
- 普通聊天直接回答,只有需要工具的工作才委派给后台 Agent。
|
|
37
|
+
- 委派任务启动前立即播报一句贴合当前请求的简短确认语。
|
|
38
|
+
- 完整任务报告保留在任务界面,语音只播报专门生成的简洁结果。
|
|
39
|
+
- 支持语音打断、页面切换、断线重连以及历史对话恢复。
|
|
40
|
+
- 服务端和浏览器界面统一通过一个公开 npm 包发行。
|
|
41
|
+
|
|
42
|
+
## 配置项
|
|
43
|
+
|
|
44
|
+
默认以连续静音 1.5 秒作为一句话的边界。`silenceDurationMs`、`speechThreshold`、`minSpeechDurationMs` 和 `maxUtteranceMs` 等高级参数可在插件 profile 配置中调整。
|
|
45
|
+
|
|
46
|
+
## 要求与限制
|
|
47
|
+
|
|
48
|
+
- 麦克风和播放界面面向 DSH Web UI,并不是框架无关的浏览器插件。
|
|
49
|
+
- 云端语音识别需要网络连接及硅基流动 API Key。
|
|
50
|
+
- 语音回复目前默认使用 Edge TTS 的中文晓晓音色。
|
|
51
|
+
|
|
52
|
+
源码、开发说明和问题反馈请前往 [GitHub 仓库](https://github.com/lgquan/dsh-voco)。
|
|
53
|
+
|
|
54
|
+
## 许可证
|
|
55
|
+
|
|
56
|
+
[MIT](LICENSE)
|
package/cordis.patch.yml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Voice interaction mode layered after dsh-base and dsh-web-app.
|
|
2
2
|
- insert:
|
|
3
|
-
- id: llm-tool-call-compat
|
|
4
|
-
name: '@flowingspring/dsh-voco/llm-tool-call-compat'
|
|
5
|
-
|
|
6
|
-
- id: voice
|
|
7
|
-
name: '@flowingspring/dsh-voco/voice'
|
|
3
|
+
- id: llm-tool-call-compat
|
|
4
|
+
name: '@flowingspring/dsh-voco/llm-tool-call-compat'
|
|
5
|
+
|
|
6
|
+
- id: voice
|
|
7
|
+
name: '@flowingspring/dsh-voco/voice'
|
|
8
8
|
config:
|
|
9
9
|
provider: local
|
|
10
10
|
|
|
11
|
-
- id: voice-local
|
|
12
|
-
name: '@flowingspring/dsh-voco/voice-local'
|
|
11
|
+
- id: voice-local
|
|
12
|
+
name: '@flowingspring/dsh-voco/voice-local'
|
|
13
13
|
config:
|
|
14
14
|
interactionMode: frontend-agent
|
|
15
15
|
inputSampleRate: 16000
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
minSpeechDurationMs: 250
|
|
21
21
|
maxUtteranceMs: 60000
|
|
22
22
|
|
|
23
|
-
- id: voice-assistant
|
|
24
|
-
name: '@flowingspring/dsh-voco/voice-assistant'
|
|
23
|
+
- id: voice-assistant
|
|
24
|
+
name: '@flowingspring/dsh-voco/voice-assistant'
|
|
25
25
|
config:
|
|
26
26
|
maxPendingObservations: 64
|
|
27
27
|
restoreConversation: true
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
cancelledAnnouncement: 任务已取消。
|
|
33
33
|
interruptedAnnouncement: 上次任务因服务关闭而中断,没有自动重放。你可以告诉我是否继续。
|
|
34
34
|
|
|
35
|
-
- id: voice-web
|
|
36
|
-
name: '@flowingspring/dsh-voco/voice-web'
|
|
35
|
+
- id: voice-web
|
|
36
|
+
name: '@flowingspring/dsh-voco/voice-web'
|
|
37
37
|
inject: [webRuntime]
|
|
38
38
|
config:
|
|
39
39
|
trustedHosts: !!js ctx.webRuntime.trustedHosts
|
|
40
40
|
maxAudioFrameBytes: 65536
|
|
41
41
|
|
|
42
|
-
- id: ui-voice
|
|
43
|
-
name: '@flowingspring/dsh-voco'
|
|
42
|
+
- id: ui-voice
|
|
43
|
+
name: '@flowingspring/dsh-voco'
|