dsh-dafeiyu-emotion 0.2.0 → 0.2.2
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/CHANGELOG.md +18 -0
- package/README.md +47 -12
- package/assets/bigfish-chibi-cutout.png +0 -0
- package/assets/bigfish-chibi.png +0 -0
- package/assets/bigfish-maid.png +0 -0
- package/assets/icon-512.png +0 -0
- package/backend/voice_worker.py +6 -3
- package/docs/MARKETPLACE.md +9 -8
- package/docs/preview.png +0 -0
- package/docs/preview.svg +95 -42
- package/lib/client.js +235 -28
- package/package.json +8 -3
- package/scripts/test-analyze-handler.mjs +209 -0
- package/scripts/test-delivery-policy.mjs +47 -0
- package/scripts/test-shortcut-registration.mjs +68 -0
- package/src/index.js +192 -39
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
- Fixed a duplicate-send race between auto-send and the manual send button.
|
|
6
|
+
- Cancelled stale deliveries when the session changes or the component unmounts.
|
|
7
|
+
- Stopped overwriting a busy composer when `insertText` is refused; send failures now keep the analysis for retry.
|
|
8
|
+
- Added a cancel action and timeout while waiting for microphone permission.
|
|
9
|
+
- Made prosody extraction yield to the UI thread instead of blocking on long recordings.
|
|
10
|
+
- Corrected the base64 request-body limit and mapped validation failures to 400/413 instead of 500.
|
|
11
|
+
- Pinned speech-provider readiness checks to the provider actually used for transcription.
|
|
12
|
+
- Reported missing enhanced backends in health and preserved the real worker failure reason.
|
|
13
|
+
- Added regression tests for delivery gating, shortcut availability and the analyze handler.
|
|
14
|
+
|
|
15
|
+
## 0.2.1
|
|
16
|
+
|
|
17
|
+
- Added a native DSH voice shortcut, configurable from DSH keyboard settings.
|
|
18
|
+
- The shortcut starts recording when idle and stops/analyzes recording on a second press.
|
|
19
|
+
- Refreshed the project icon and README key visual with the blue whale-girl character artwork.
|
|
20
|
+
|
|
3
21
|
## 0.2.0
|
|
4
22
|
|
|
5
23
|
- Added a lightweight mode using DSH Voice Input and browser-side prosody analysis.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<img src="icon.
|
|
3
|
+
<img src="assets/icon-512.png" width="128" alt="大肥鱼 · 情绪耳朵插件图标">
|
|
4
4
|
|
|
5
5
|
# 大肥鱼 · 情绪耳朵
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
本地语音转写 · 语气/情绪分析 · 情绪化回复 · 自动发送 · 音频不上传
|
|
10
10
|
|
|
11
11
|
[](https://deepseek1024.com/plugins/LiDu-china/dsh-dafeiyu-emotion)
|
|
12
|
+
[](https://www.npmjs.com/package/dsh-dafeiyu-emotion)
|
|
12
13
|
[](https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/latest)
|
|
13
14
|
[](https://github.com/LiDu-china/dsh-dafeiyu-emotion)
|
|
14
15
|
[](LICENSE)
|
|
@@ -17,9 +18,11 @@
|
|
|
17
18
|
|
|
18
19
|
</div>
|
|
19
20
|
|
|
20
|
-

|
|
21
22
|
|
|
22
23
|
> 预览为功能示意图,实际界面以当前 DSH 版本为准。
|
|
24
|
+
>
|
|
25
|
+
> 角色主视觉采用蓝发鲸鱼少女的大肥鱼设定。
|
|
23
26
|
|
|
24
27
|
---
|
|
25
28
|
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
## 功能
|
|
65
68
|
|
|
66
69
|
- 🎙️ 输入框内录音,不需要跳到另一个应用;
|
|
70
|
+
- ⌨️ DSH 原生语音快捷键,可在快捷键设置中自行改键;
|
|
67
71
|
- 🐋 大肥鱼主题的“鱼耳”入口,和普通对话共用同一个 composer;
|
|
68
72
|
- 🧠 情绪标签:喜悦 / 低落 / 生气 / 紧张 / 惊讶 / 厌烦 / 平静;
|
|
69
73
|
- 📈 额外给出 confidence、valence、arousal 和语气摘要;
|
|
@@ -84,26 +88,53 @@
|
|
|
84
88
|
dsh-dafeiyu-emotion
|
|
85
89
|
```
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
`dsh-dafeiyu-emotion` 已发布到 npm。1024Store 会自动刷新一键安装入口;如果客户端尚未缓存到新版本,可以直接使用下面的 npm 命令。
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
> `0.2.2` 目前通过 GitHub Release 提供;npm 上的最新版仍是 `0.2.1`,待 npm 发布完成后一键安装会自动升级。
|
|
94
|
+
|
|
95
|
+
### 通过 npm
|
|
90
96
|
|
|
91
97
|
```bash
|
|
92
|
-
dsh plugin --profile desktop add
|
|
98
|
+
dsh plugin --profile desktop add dsh-dafeiyu-emotion
|
|
93
99
|
```
|
|
94
100
|
|
|
95
101
|
DSH Web 使用 `--profile web`。安装后启用 `dsh-dafeiyu-emotion`,再按提示启用 DSH 自带 **Voice Input**(轻量模式),或配置本地增强后端。
|
|
96
102
|
|
|
103
|
+
### 通过 GitHub 源安装
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
dsh plugin --profile desktop add github:LiDu-china/dsh-dafeiyu-emotion
|
|
107
|
+
```
|
|
108
|
+
|
|
97
109
|
### 通过 Release tarball
|
|
98
110
|
|
|
99
111
|
```bash
|
|
100
|
-
curl -L -o dsh-dafeiyu-emotion-0.2.
|
|
101
|
-
https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/download/v0.2.
|
|
102
|
-
dsh plugin --profile desktop add "D:/path/to/dsh-dafeiyu-emotion-0.2.
|
|
112
|
+
curl -L -o dsh-dafeiyu-emotion-0.2.2.tgz \
|
|
113
|
+
https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/download/v0.2.2/dsh-dafeiyu-emotion-0.2.2.tgz
|
|
114
|
+
dsh plugin --profile desktop add "D:/path/to/dsh-dafeiyu-emotion-0.2.2.tgz"
|
|
103
115
|
```
|
|
104
116
|
|
|
105
117
|
> DSH Desktop 的 profile 由 Electron 应用管理;命令行安装请使用桌面应用自带的 `dsh` 命令。
|
|
106
118
|
|
|
119
|
+
## 语音快捷键
|
|
120
|
+
|
|
121
|
+
插件会向 DSH 注册一个原生快捷键命令。打开:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
设置 → 快捷键 → 搜索“大肥鱼语音”
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
即可改成你习惯的组合。默认值:
|
|
128
|
+
|
|
129
|
+
| 客户端 | 默认快捷键 |
|
|
130
|
+
|---|---|
|
|
131
|
+
| DSH Desktop(Windows / Linux / macOS) | `Alt+V` |
|
|
132
|
+
| DSH Web(Windows) | `Ctrl+Alt+V` |
|
|
133
|
+
| DSH Web(macOS) | `Cmd+Option+V` |
|
|
134
|
+
| DSH Web(Linux) | 默认未绑定,请在快捷键设置中指定 |
|
|
135
|
+
|
|
136
|
+
空闲时按一次开始录音;录音中再按一次会结束并分析。快捷键需要包含 `Ctrl`、`Alt`、`Shift` 或 `Cmd` 等修饰键,不能设置成裸字母键。
|
|
137
|
+
|
|
107
138
|
## 启用 Voice Input(轻量模式)
|
|
108
139
|
|
|
109
140
|
1. 打开 DSH 左侧 **插件**;
|
|
@@ -213,8 +244,9 @@ dsh-dafeiyu-emotion/
|
|
|
213
244
|
├─ lib/client.js 浏览器:录音、WAV、韵律特征、情绪 UI、自动发送
|
|
214
245
|
├─ backend/voice_worker.py 可选 VoiceSense 常驻 worker
|
|
215
246
|
├─ cordis.patch.yml bundle 挂载:大肥鱼 + 情绪耳朵
|
|
216
|
-
├─
|
|
217
|
-
├─
|
|
247
|
+
├─ assets/icon-512.png 插件图标
|
|
248
|
+
├─ assets/bigfish-*.png 角色主视觉素材
|
|
249
|
+
├─ docs/preview.svg 可编辑预览源
|
|
218
250
|
└─ package.json
|
|
219
251
|
```
|
|
220
252
|
|
|
@@ -250,6 +282,7 @@ dsh-dafeiyu-emotion/
|
|
|
250
282
|
### Highlights
|
|
251
283
|
|
|
252
284
|
- One-click microphone activity inside the DSH composer;
|
|
285
|
+
- A native DSH voice shortcut you can rebind in Settings → Shortcuts;
|
|
253
286
|
- Local transcription via DSH Voice Input/SenseVoice;
|
|
254
287
|
- Lightweight prosody + keyword emotion estimation with no Python requirement;
|
|
255
288
|
- Optional high-accuracy VoiceSense backend with SenseVoice + emotion2vec;
|
|
@@ -259,13 +292,15 @@ dsh-dafeiyu-emotion/
|
|
|
259
292
|
### Install
|
|
260
293
|
|
|
261
294
|
```bash
|
|
262
|
-
dsh plugin --profile desktop add
|
|
295
|
+
dsh plugin --profile desktop add dsh-dafeiyu-emotion
|
|
263
296
|
```
|
|
264
297
|
|
|
265
|
-
The
|
|
298
|
+
The package is live on [npm](https://www.npmjs.com/package/dsh-dafeiyu-emotion) and listed in [1024Store](https://deepseek1024.com/plugins/LiDu-china/dsh-dafeiyu-emotion). The store's one-click entry refreshes automatically. A GitHub-source install and a tarball on [GitHub Releases](https://github.com/LiDu-china/dsh-dafeiyu-emotion/releases/latest) are also available.
|
|
266
299
|
|
|
267
300
|
Then enable **Voice Input** in DSH Plugins and prepare its local model. For the enhanced mode, set `backendRoot` to a voice-sense checkout with `.venv-ser`.
|
|
268
301
|
|
|
302
|
+
The shortcut command is listed as **BigFish voice: start / stop**. Desktop defaults to `Alt+V`; Web defaults to `Ctrl+Alt+V` on Windows, `Cmd+Option+V` on macOS, and is unbound on Linux Web until you choose a binding.
|
|
303
|
+
|
|
269
304
|
### Limitations
|
|
270
305
|
|
|
271
306
|
Emotion estimation is probabilistic and context-dependent. It is a communication aid, not mind reading and not a medical or psychological diagnostic tool.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/icon-512.png
CHANGED
|
Binary file
|
package/backend/voice_worker.py
CHANGED
|
@@ -96,6 +96,7 @@ def main() -> int:
|
|
|
96
96
|
if not line:
|
|
97
97
|
continue
|
|
98
98
|
request: dict[str, Any] = {}
|
|
99
|
+
request_id: Any = None
|
|
99
100
|
try:
|
|
100
101
|
request = json.loads(line)
|
|
101
102
|
if request.get("type") == "shutdown":
|
|
@@ -175,15 +176,17 @@ def main() -> int:
|
|
|
175
176
|
detail = traceback.format_exc()
|
|
176
177
|
sys.stderr.write(detail)
|
|
177
178
|
emit({
|
|
178
|
-
"id":
|
|
179
|
+
"id": request_id,
|
|
179
180
|
"ok": False,
|
|
180
181
|
"error": f"{type(exc).__name__}: {exc}",
|
|
181
182
|
})
|
|
182
183
|
|
|
183
184
|
try:
|
|
184
185
|
with contextlib.redirect_stdout(sys.stderr):
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
try:
|
|
187
|
+
emotion.close()
|
|
188
|
+
finally:
|
|
189
|
+
asr.close()
|
|
187
190
|
except Exception:
|
|
188
191
|
sys.stderr.write(traceback.format_exc())
|
|
189
192
|
return 0
|
package/docs/MARKETPLACE.md
CHANGED
|
@@ -33,12 +33,13 @@ https://raw.githubusercontent.com/LiDu-china/dsh-dafeiyu-emotion/main/assets/ico
|
|
|
33
33
|
大肥鱼 · 情绪耳朵是一个 DeepSeek Harness 语音 companion 插件。它把一次说话变成一条有情绪上下文的对话:
|
|
34
34
|
|
|
35
35
|
1. 点击 composer 旁的鱼耳,录一句话;
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
38
|
-
4.
|
|
39
|
-
5.
|
|
40
|
-
6.
|
|
41
|
-
7.
|
|
36
|
+
2. 可使用 DSH 原生快捷键开始/停止录音,并在快捷键设置中自由改键;
|
|
37
|
+
3. 优先复用 DSH 自带 Voice Input/SenseVoice 做本地转写;
|
|
38
|
+
4. 浏览器提取语速、停顿、基频、音高变化、能量等声学特征;
|
|
39
|
+
5. 可选中英文情绪词表与声学原型融合,输出情绪、置信度、愉悦度、唤醒度;
|
|
40
|
+
6. 生成“先承接情绪、再回答问题”的受控 prompt;
|
|
41
|
+
7. 自动填入并发送到当前会话;
|
|
42
|
+
8. 如果本机部署了 VoiceSense,可切换到 SenseVoice + emotion2vec 增强模式。
|
|
42
43
|
|
|
43
44
|
插件不常驻监听、不读屏幕、不声称读心。音频只进入本机临时目录,分析结束后删除。
|
|
44
45
|
|
|
@@ -64,10 +65,10 @@ https://raw.githubusercontent.com/LiDu-china/dsh-dafeiyu-emotion/main/assets/ico
|
|
|
64
65
|
## Install
|
|
65
66
|
|
|
66
67
|
```bash
|
|
67
|
-
dsh plugin --profile desktop add
|
|
68
|
+
dsh plugin --profile desktop add dsh-dafeiyu-emotion
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
The
|
|
71
|
+
The `0.2.2` build is attached to the GitHub Release. npm publication is pending, so npm and the 1024Store one-click entry currently serve `0.2.1`; they will refresh after the maintainer publishes `0.2.2`. GitHub-source and Release-tarball installs remain available as fallbacks.
|
|
71
72
|
|
|
72
73
|
## Privacy
|
|
73
74
|
|
package/docs/preview.png
CHANGED
|
Binary file
|