dsh-chime-sound 0.2.0 → 0.3.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 +35 -0
- package/README.md +44 -31
- package/README.zh.md +70 -0
- package/assets/sounds/CREDITS.md +54 -0
- package/assets/sounds/g5-ask-blur.wav +0 -0
- package/assets/sounds/g5-ask-focus.wav +0 -0
- package/assets/sounds/g5-done-blur.wav +0 -0
- package/assets/sounds/g5-done-focus.wav +0 -0
- package/assets/sounds/g6-ask-blur.wav +0 -0
- package/assets/sounds/g6-ask-focus.wav +0 -0
- package/assets/sounds/g6-done-blur.wav +0 -0
- package/assets/sounds/g6-done-focus.wav +0 -0
- package/assets/sounds/g7-ask-blur.wav +0 -0
- package/assets/sounds/g7-ask-focus.wav +0 -0
- package/assets/sounds/g7-done-blur.wav +0 -0
- package/assets/sounds/g7-done-focus.wav +0 -0
- package/assets/sounds/g8-ask-blur.wav +0 -0
- package/assets/sounds/g8-ask-focus.wav +0 -0
- package/assets/sounds/g8-done-blur.wav +0 -0
- package/assets/sounds/g8-done-focus.wav +0 -0
- package/assets/sounds/g9-ask-blur.wav +0 -0
- package/assets/sounds/g9-ask-focus.wav +0 -0
- package/assets/sounds/g9-done-blur.wav +0 -0
- package/assets/sounds/g9-done-focus.wav +0 -0
- package/dsh-plugin.json +1 -1
- package/lib/index.js +8 -1
- package/package.json +4 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.3.2 (2026-09-13)
|
|
4
|
+
|
|
5
|
+
- 文档:README 顶部加 CI 状态徽章;发布章节写明走 npm 可信发布(OIDC),仓库内不存放令牌
|
|
6
|
+
|
|
7
|
+
## 0.3.1 (2026-09-13)
|
|
8
|
+
|
|
9
|
+
- 文档拆分为中英双版:`README.md` 改为英文(面向 npm / 插件市场的规范形态),中文原文迁入新增的 `README.zh.md`,两版顶部互相链接
|
|
10
|
+
- 两版 README 均按公开文档规范改写:去掉人设称呼与内部路径,只描述功能与行为(设置卡片本来就已中英双语,本次未改代码)
|
|
11
|
+
- `package.json` 的 `files` 补入 `README.zh.md` 与 `CHANGELOG.md`,避免文档在发布包里缺失
|
|
12
|
+
|
|
13
|
+
## 0.3.0 (2026-09-12)
|
|
14
|
+
|
|
15
|
+
- 新增 5 组音效:g5 清亮铃声 / g6 气泡水滴 / g7 街机电子 / g8 木质马林巴 / g9 柔和电子 — 四个设置项的选择列表各新增 5 个选项(g1-g9)
|
|
16
|
+
- g5-g9 取自 [Freesound](https://freesound.org) 的 **CC0 1.0** 素材(20 条,每条情景各自一条),按情景语义挑选:完成·聚焦为「完成感」音,完成·未聚焦为更短变体,提问·聚焦为提示答问音,提问·未聚焦为最短提示
|
|
17
|
+
- 素材处理链:mpg123(WASM)解码 Freesound 预览 MP3 → 合单声道 → DC 去除 → 按情景裁剪(≤1.25s / 0.75s / 0.95s / 0.60s,截断时淡出 200ms)→ 50ms 短时 RMS 归一至 −6.5 dBFS,超过 −3 dBFS 处软限幅(tanh)→ 48 kHz / 16-bit / 单声道 WAV
|
|
18
|
+
- 新增 `assets/sounds/CREDITS.md`:逐条记录采样出处(Freesound 页面链接)、作者与授权,并写明转换参数
|
|
19
|
+
- 响度校准:新素材峰值 −3 dBFS、整段 RMS 均值 −14.4 dBFS、50ms 短时 RMS 均值 −9.0 dBFS,与 g1-g4(−14.1 / −8.0)基本一致
|
|
20
|
+
|
|
21
|
+
## 0.2.0 (2026-09-07)
|
|
22
|
+
|
|
23
|
+
- 新增主音量设置:0%~150%,5% 步进(31 档),默认 100%(与原音量一致);设置页「提示音效 → 音量 / Volume」←/→ 单按 ±5%、长按连续调节,修改后立即试听
|
|
24
|
+
- 播放链路改为内存增益:新增 `lib/wav.js`(PCM 16-bit 样本增益 + 饱和削波),`PlaySoundW` SND_MEMORY 播放 + 8 槽播放池,>100% 时 16-bit 饱和削波
|
|
25
|
+
- 插件改名:`dsh-notice-sound` → `dsh-chime` → npm 发布名 **`dsh-chime-sound`**(manifest id 保持 `com.dsh-tui.chime`,cordis 挂载 id `chime`,设置命名空间 `chime`)
|
|
26
|
+
- 非 Windows 平台明确降级:仅 Win32(winmm/user32)可播放,其他平台静默 no-op + 警告日志
|
|
27
|
+
|
|
28
|
+
## 0.1.1 (2026-09-06)
|
|
29
|
+
|
|
30
|
+
- 修复事件源:改用 `session/event` cordis bus(无需 host admission),替代被拒的 `tuiMessageObserver.subscribe`
|
|
31
|
+
- 焦点判定修正:GetForegroundWindow 句柄 + 窗口类名(CASCADIA_HOSTING_WINDOW_CLASS / ConsoleWindowClass)双判据
|
|
32
|
+
|
|
33
|
+
## 0.1.0 (2026-09-06)
|
|
34
|
+
|
|
35
|
+
- 首个版本:完成/提问提示音,4 组音效 × 4 情景,设置页「提示音效」类,中英双语
|
package/README.md
CHANGED
|
@@ -1,57 +1,70 @@
|
|
|
1
1
|
# dsh-chime-sound
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/VviLliAm-qwq/dsh-chime/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- 4 组音效(清脆电子 / 木质敲击 / 八比特 / 温馨钢琴)× 4 情景,设置页「提示音效」类中可选择或关闭
|
|
7
|
-
- **0.2.0 新增:主音量设置**(设置页「音量 / Volume」项):0%~150%,每档 5%(31 档),默认 100% = 原音量。←/→ 单按 ±5%,**长按连续调节**(dsh-tui 输入层把长按重复展开为逐档事件,无需额外配置);修改后立即试听。>100% 时样本做 16-bit 饱和削波(峰值约 105%,仅极短时段削波;如需无失真可后续改软限幅)。音量仅在插件内部对 WAV 样本增益,不影响系统音量
|
|
8
|
-
- 音效由本仓库 `scripts/gen-sounds.mjs` 生成(WAV,16-bit/48kHz)
|
|
9
|
-
- 设置与文案支持中英文
|
|
5
|
+
**English** · [中文](README.zh.md)
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
Notification sounds for dsh-tui (originally named dsh-notice-sound, renamed on 2026-09-07).
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
- **Triggers:** the agent calling `ask_user_question` (`session/event` `tool/call` — a nudge to come back and answer) and a reply finishing (`session/event` `turn/end`; agent-loop emits this once per turn, while `assistant/message` fires on every tool step and is deliberately not used). Both distinguish a focused from an unfocused terminal.
|
|
10
|
+
- **9 sound groups × 4 situations**, selectable (or off) in the settings page's “Notice Sounds” section: g1 Crisp / g2 Wood / g3 Chiptune / g4 Warm (synthesised in code), g5 Bell / g6 Bubble / g7 Arcade / g8 Marimba / g9 Soft Synth (CC0 samples).
|
|
11
|
+
- **New in 0.2.0 — master volume** (the “Volume” field): 0–150% in 5% steps (31 steps), default 100% = the original level. `←/→` steps 5%; **holding the key repeats**, because dsh-tui's input layer expands the auto-repeat into per-step events. The new level is auditioned immediately. Above 100% the samples are 16-bit saturated (peak ≈ 105%, clipping only for very short stretches). The gain is applied to the WAV samples inside the plugin and never touches system volume.
|
|
12
|
+
- g1–g4 are synthesised by this repository's `scripts/gen-sounds.mjs` (WAV, 16-bit / 48 kHz); g5–g9 are [Freesound](https://freesound.org) **CC0 1.0** material, decoded and then trimmed, faded and loudness-normalised to the same format. Sources and conversion parameters are recorded in `assets/sounds/CREDITS.md` (CC0 needs no attribution and may be redistributed with this plugin).
|
|
13
|
+
- Settings and copy are bilingual (Chinese/English); the settings card is localised by the host according to the language dsh-tui's `/lang` selected.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## ⚠️ Platform support (Windows only)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Sound is played through **Win32 APIs** (koffi → `winmm.dll` `PlaySoundW`, with focus detection via `user32.dll`), so this plugin is **Windows-only** (Windows Terminal and classic conhost). On Linux and macOS it degrades silently to a no-op — no sound, no boot failure — and logs a `Win32-only` warning. Do not expect notification sounds elsewhere.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
**Option 1 — dsh CLI (recommended):**
|
|
18
22
|
|
|
19
23
|
```sh
|
|
20
24
|
dsh plugin --profile <profile> add dsh-chime-sound
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
(Or from the dsh plugin market / GitHub: `dsh plugin add github:VviLliAm-qwq/dsh-chime`.)
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
**Option 2 — manual:**
|
|
26
30
|
|
|
27
|
-
1.
|
|
28
|
-
2.
|
|
29
|
-
3.
|
|
31
|
+
1. Copy the package to `~/.dsh/profiles/dsh-tui/node_modules/dsh-chime-sound/`
|
|
32
|
+
2. Append `"dsh-chime-sound"` to `dsh.profile.bundles` in `~/.dsh/profiles/dsh-tui/package.json` (the package declares `dsh.bundle.patch`, so it mounts itself at boot)
|
|
33
|
+
3. Restart dsh-tui (`/restart`)
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
**Compatibility:** dsh-tui 0.10.x (the `ctx.tuiSettingsSections` and `session/event` seams, both soft-probed); dsh 0.1.2-rc.1+; Node `^22.19 || >=24`; pure ESM. Every configuration key has a default, and a missing configuration degrades to “nothing happens”.
|
|
32
36
|
|
|
33
|
-
##
|
|
37
|
+
## Configuration
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
The settings live in dsh-tui's “Notice Sounds” section (or the `chime:` namespace of `~/.dsh/settings.yaml`):
|
|
36
40
|
|
|
37
41
|
```yaml
|
|
38
42
|
chime:
|
|
39
|
-
doneFocus: g2 #
|
|
40
|
-
doneBlur: g2 #
|
|
41
|
-
askFocus: g2 #
|
|
42
|
-
askBlur: g2 #
|
|
43
|
-
volume: "50" # 0-150, 5%
|
|
43
|
+
doneFocus: g2 # reply finished, terminal focused: g1-g9 / off
|
|
44
|
+
doneBlur: g2 # reply finished, terminal unfocused
|
|
45
|
+
askFocus: g2 # question asked, terminal focused
|
|
46
|
+
askBlur: g2 # question asked, terminal unfocused
|
|
47
|
+
volume: "50" # 0-150, 5% steps, default "100"
|
|
44
48
|
```
|
|
45
49
|
|
|
46
|
-
##
|
|
50
|
+
## Why `session/event` and not the message observer
|
|
51
|
+
|
|
52
|
+
dsh-tui's mediated `tuiMessageObserver.subscribe()` is unusable here: the API requires the activation to hold a verified Component identity through host admission, and a plugin mounted by a bundle patch never goes through admission — its subscriptions are refused (`COMPONENT_NOT_ADMITTED`) and no sound ever plays.
|
|
53
|
+
|
|
54
|
+
This plugin therefore listens on the `session/event` cordis bus published by `@deepseek-ai/dsh-session` (the same channel the official `dsh-working-activity` extension uses), which needs no Component identity:
|
|
55
|
+
|
|
56
|
+
- `tool/call` with `name === 'ask_user_question'` → the question sound (askFocus / askBlur)
|
|
57
|
+
- `turn/end` → the completion sound (doneFocus / doneBlur); subagent sessions are ignored
|
|
58
|
+
- **Focus detection:** the `GetForegroundWindow` handle equals `GetConsoleWindow`, or the window class matches (`CASCADIA_HOSTING_WINDOW_CLASS` = Windows Terminal, `ConsoleWindowClass` = classic conhost). Under ConPTY `GetConsoleWindow` returns a hidden `PseudoConsoleWindow` that is never foreground, so the earlier handle-only and class-only readings were both flawed; the check is now a pair of criteria with a corrected class read.
|
|
59
|
+
- `dsh-plugin.json` no longer declares the unused `messages.observe` capability.
|
|
60
|
+
|
|
61
|
+
Restart dsh-tui after installing.
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
## Publishing
|
|
49
64
|
|
|
50
|
-
|
|
65
|
+
- **Repository**: <https://github.com/VviLliAm-qwq/dsh-chime> (public)
|
|
66
|
+
- **Release**: `v*` tags drive `.github/workflows/release.yml`, which publishes to npm through **trusted publishing (OIDC)** — no token is stored in the repository.
|
|
51
67
|
|
|
52
|
-
|
|
53
|
-
- `turn/end` → 完成音(doneFocus/doneBlur),子代理会话不触发
|
|
54
|
-
- 焦点判定:GetForegroundWindow 句柄 == GetConsoleWindow 或窗口类名匹配(`CASCADIA_HOSTING_WINDOW_CLASS`=Windows Terminal / `ConsoleWindowClass`=传统 conhost)。ConPTY 下 GetConsoleWindow 返回隐藏的 `PseudoConsoleWindow`(永非前台),旧代码仅按句柄/类名读法均有缺陷,现双判据+修正的类名读取
|
|
55
|
-
- `dsh-plugin.json` 已移除不再使用的 `messages.observe` 声明
|
|
68
|
+
## License
|
|
56
69
|
|
|
57
|
-
|
|
70
|
+
MIT — see [LICENSE](LICENSE). Sound assets are licensed and attributed in `assets/sounds/CREDITS.md`.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# dsh-chime-sound
|
|
2
|
+
|
|
3
|
+
[](https://github.com/VviLliAm-qwq/dsh-chime/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+
**中文** · [English](README.md)
|
|
6
|
+
|
|
7
|
+
dsh-tui 提示音效插件(原名 dsh-notice-sound,2026-09-07 更名)。
|
|
8
|
+
|
|
9
|
+
- 触发:代理调用询问模块 `ask_user_question`(`session/event` `tool/call`,提醒用户回来回答问题)与回复完成(`session/event` `turn/end`,agent-loop 每回合仅发一次;`assistant/message` 会随每个工具步骤多次触发,不采用),并区分终端聚焦 / 未聚焦。
|
|
10
|
+
- 9 组音效 × 4 情景,设置页「提示音效」类中可选择或关闭:g1 清脆电子 / g2 木质敲击 / g3 八比特 / g4 温馨钢琴(代码合成),g5 清亮铃声 / g6 气泡水滴 / g7 街机电子 / g8 木质马林巴 / g9 柔和电子(CC0 采样)。
|
|
11
|
+
- **0.2.0 新增:主音量设置**(设置页「音量 / Volume」项):0%~150%,每档 5%(31 档),默认 100% = 原音量。`←/→` 单按 ±5%,**长按连续调节**(dsh-tui 输入层把长按重复展开为逐档事件,无需额外配置);修改后立即试听。>100% 时样本做 16-bit 饱和削波(峰值约 105%,仅极短时段削波)。音量只在插件内部对 WAV 样本增益,不影响系统音量。
|
|
12
|
+
- g1-g4 由本仓库 `scripts/gen-sounds.mjs` 合成(WAV,16-bit / 48 kHz);g5-g9 为 [Freesound](https://freesound.org) **CC0 1.0** 素材,解码后裁剪、淡入淡出、响度校准为同规格 WAV,出处与转换参数见 `assets/sounds/CREDITS.md`(CC0 无需署名、可随本插件再分发)。
|
|
13
|
+
- 设置与文案均支持中英文;界面语言跟随 dsh-tui 的 `/lang`(设置卡片的文案由宿主按当前语言渲染)。
|
|
14
|
+
|
|
15
|
+
## ⚠️ 平台限制(Windows only)
|
|
16
|
+
|
|
17
|
+
本插件通过 **Win32 API**(koffi → `winmm.dll` `PlaySoundW` / `user32.dll` 焦点检测)播放声音,**仅支持 Windows(Windows Terminal / conhost)**。其他平台(Linux / macOS)上插件静默降级为 no-op(不播放、不拖垮启动),并在日志中给出 `Win32-only` 警告。请勿在非 Windows 环境期待提示音。
|
|
18
|
+
|
|
19
|
+
## 安装
|
|
20
|
+
|
|
21
|
+
**方式一(dsh CLI,推荐):**
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
dsh plugin --profile <profile> add dsh-chime-sound
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
(或从 dsh 插件市场 / GitHub 安装:`dsh plugin add github:VviLliAm-qwq/dsh-chime`。)
|
|
28
|
+
|
|
29
|
+
**方式二(手动):**
|
|
30
|
+
|
|
31
|
+
1. 把插件包复制到 `~/.dsh/profiles/dsh-tui/node_modules/dsh-chime-sound/`
|
|
32
|
+
2. 在 `~/.dsh/profiles/dsh-tui/package.json` 的 `dsh.profile.bundles` 追加 `"dsh-chime-sound"`(该包声明了 `dsh.bundle.patch`,启动时自动挂载)
|
|
33
|
+
3. 重启 dsh-tui(`/restart`)生效
|
|
34
|
+
|
|
35
|
+
**兼容性**:dsh-tui 0.10.x(`ctx.tuiSettingsSections` / `session/event` 软探测接缝);dsh 0.1.2-rc.1+;Node `^22.19 || >=24`;纯 ESM。配置键均有默认值,缺配置时行为退化为「什么都不发生」。
|
|
36
|
+
|
|
37
|
+
## 配置
|
|
38
|
+
|
|
39
|
+
设置项在 dsh-tui 设置页「提示音效 / Notice Sounds」类(或 `~/.dsh/settings.yaml` 的 `chime:` 命名空间):
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
chime:
|
|
43
|
+
doneFocus: g2 # 完成对话·聚焦时: g1-g9 / off
|
|
44
|
+
doneBlur: g2 # 完成对话·未聚焦时
|
|
45
|
+
askFocus: g2 # 提问·聚焦时
|
|
46
|
+
askBlur: g2 # 提问·未聚焦时
|
|
47
|
+
volume: "50" # 0-150, 5% 步进, 默认 "100"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 事件源说明
|
|
51
|
+
|
|
52
|
+
dsh-tui 的 mediated `tuiMessageObserver.subscribe()` 对本插件不可用:该 API 要求插件激活先通过 host admission 绑定已验证的 Component 身份,bundle-patch 挂载的插件不经过 admission,订阅会被拒绝(`COMPONENT_NOT_ADMITTED`),提示音完全不触发。
|
|
53
|
+
|
|
54
|
+
改用 `@deepseek-ai/dsh-session` 发布的 `session/event` cordis bus 事件(官方 `dsh-working-activity` 扩展同款通道),无需 Component identity:
|
|
55
|
+
|
|
56
|
+
- `tool/call` 且 `name === 'ask_user_question'` → 提问音(askFocus / askBlur)
|
|
57
|
+
- `turn/end` → 完成音(doneFocus / doneBlur),子代理会话不触发
|
|
58
|
+
- 焦点判定:`GetForegroundWindow` 句柄 == `GetConsoleWindow`,或窗口类名匹配(`CASCADIA_HOSTING_WINDOW_CLASS` = Windows Terminal / `ConsoleWindowClass` = 传统 conhost)。ConPTY 下 `GetConsoleWindow` 返回隐藏的 `PseudoConsoleWindow`(永非前台),旧代码仅按句柄或仅按类名读取都有缺陷,现为双判据 + 修正的类名读取
|
|
59
|
+
- `dsh-plugin.json` 已移除不再使用的 `messages.observe` 声明
|
|
60
|
+
|
|
61
|
+
安装后需重启 dsh-tui 生效。
|
|
62
|
+
|
|
63
|
+
## 发布
|
|
64
|
+
|
|
65
|
+
- **仓库**:<https://github.com/VviLliAm-qwq/dsh-chime>(公开)
|
|
66
|
+
- **发布方式**:`v*` tag 驱动 `.github/workflows/release.yml`,经 npm **可信发布(OIDC)**上传——仓库内不存放任何令牌。
|
|
67
|
+
|
|
68
|
+
## 许可
|
|
69
|
+
|
|
70
|
+
MIT — 见 [LICENSE](LICENSE)。音效素材的授权与出处见 `assets/sounds/CREDITS.md`。
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# 音效来源 / Sound Credits
|
|
2
|
+
|
|
3
|
+
`g1`–`g4` 由本仓库 `scripts/gen-sounds.mjs` 纯代码合成,不含第三方素材。
|
|
4
|
+
|
|
5
|
+
`g5`–`g9` 取自 [Freesound](https://freesound.org) 的 **CC0 1.0(Creative Commons Zero,公有领域献出)** 素材:CC0 允许任意使用与再分发、无需署名,因此可以随本插件(MIT)一同发布;下表列出出处仅为可追溯与致谢。
|
|
6
|
+
|
|
7
|
+
转换流程:Freesound 预览 MP3 → mpg123(WASM)解码 → 合单声道 → DC 去除 → 按情景裁剪(完成·聚焦 ≤1.25s、完成·未聚焦 ≤0.75s、提问·聚焦 ≤0.95s、提问·未聚焦 ≤0.60s)→ 淡入 5ms / 淡出 80–200ms(截断时 200ms)→ 50ms 短时 RMS 归一到 −6.5 dBFS、超过 −3 dBFS 处软限幅 → 48 kHz / 16-bit / 单声道 WAV。
|
|
8
|
+
|
|
9
|
+
## g5 Bell / 清亮铃声
|
|
10
|
+
|
|
11
|
+
| 文件 | 情景 | 原始音效 | 作者 | 出处 |
|
|
12
|
+
|---|---|---|---|---|
|
|
13
|
+
| `g5-done-focus.wav` | 完成·聚焦 | Glass Ding / Toast with champagne glasses | Breviceps | [freesound](https://freesound.org/people/Breviceps/sounds/458408) |
|
|
14
|
+
| `g5-done-blur.wav` | 完成·未聚焦 | Small Bell | steffcaffrey | [freesound](https://freesound.org/people/steffcaffrey/sounds/452371) |
|
|
15
|
+
| `g5-ask-focus.wav` | 提问·聚焦 | Chime Notification | Jofae | [freesound](https://freesound.org/people/Jofae/sounds/380482) |
|
|
16
|
+
| `g5-ask-blur.wav` | 提问·未聚焦 | Ding 1 | greenvwbeetle | [freesound](https://freesound.org/people/greenvwbeetle/sounds/241288) |
|
|
17
|
+
|
|
18
|
+
## g6 Bubble / 气泡水滴
|
|
19
|
+
|
|
20
|
+
| 文件 | 情景 | 原始音效 | 作者 | 出处 |
|
|
21
|
+
|---|---|---|---|---|
|
|
22
|
+
| `g6-done-focus.wav` | 完成·聚焦 | bubbles-03.aif | kijjaz | [freesound](https://freesound.org/people/kijjaz/sounds/16738) |
|
|
23
|
+
| `g6-done-blur.wav` | 完成·未聚焦 | The Best Bubble Pop Sound For Game and UI | el_boss | [freesound](https://freesound.org/people/el_boss/sounds/669918) |
|
|
24
|
+
| `g6-ask-focus.wav` | 提问·聚焦 | bubble sound | Ranner | [freesound](https://freesound.org/people/Ranner/sounds/487532) |
|
|
25
|
+
| `g6-ask-blur.wav` | 提问·未聚焦 | Retro, Bubble Shot 01.wav | MATRIXXX_ | [freesound](https://freesound.org/people/MATRIXXX_/sounds/458906) |
|
|
26
|
+
|
|
27
|
+
## g7 Arcade / 街机电子
|
|
28
|
+
|
|
29
|
+
| 文件 | 情景 | 原始音效 | 作者 | 出处 |
|
|
30
|
+
|---|---|---|---|---|
|
|
31
|
+
| `g7-done-focus.wav` | 完成·聚焦 | Retro 'Accomplished' SFX | suntemple | [freesound](https://freesound.org/people/suntemple/sounds/253177) |
|
|
32
|
+
| `g7-done-blur.wav` | 完成·未聚焦 | 8-Bit Coin | TheDweebMan | [freesound](https://freesound.org/people/TheDweebMan/sounds/277215) |
|
|
33
|
+
| `g7-ask-focus.wav` | 提问·聚焦 | 8-bit Happy Ding | JapanYoshiTheGamer | [freesound](https://freesound.org/people/JapanYoshiTheGamer/sounds/361264) |
|
|
34
|
+
| `g7-ask-blur.wav` | 提问·未聚焦 | 8-Bit Text Blip - High Pitch | SomeGuy22 | [freesound](https://freesound.org/people/SomeGuy22/sounds/431328) |
|
|
35
|
+
|
|
36
|
+
## g8 Marimba / 木质马林巴
|
|
37
|
+
|
|
38
|
+
| 文件 | 情景 | 原始音效 | 作者 | 出处 |
|
|
39
|
+
|---|---|---|---|---|
|
|
40
|
+
| `g8-done-focus.wav` | 完成·聚焦 | marimba sequence | PhonosUPF | [freesound](https://freesound.org/people/PhonosUPF/sounds/488154) |
|
|
41
|
+
| `g8-done-blur.wav` | 完成·未聚焦 | XYLOPHONE D4.wav | juancamiloorjuela | [freesound](https://freesound.org/people/juancamiloorjuela/sounds/204645) |
|
|
42
|
+
| `g8-ask-focus.wav` | 提问·聚焦 | Kalimba C3 | dvdfu | [freesound](https://freesound.org/people/dvdfu/sounds/536549) |
|
|
43
|
+
| `g8-ask-blur.wav` | 提问·未聚焦 | Popsicle Stick Pluck | BluetoothBoy | [freesound](https://freesound.org/people/BluetoothBoy/sounds/269335) |
|
|
44
|
+
|
|
45
|
+
## g9 Soft synth / 柔和电子
|
|
46
|
+
|
|
47
|
+
| 文件 | 情景 | 原始音效 | 作者 | 出处 |
|
|
48
|
+
|---|---|---|---|---|
|
|
49
|
+
| `g9-done-focus.wav` | 完成·聚焦 | Beep 03 Positive | PaulMorek | [freesound](https://freesound.org/people/PaulMorek/sounds/330046) |
|
|
50
|
+
| `g9-done-blur.wav` | 完成·未聚焦 | Notification | Fupicat | [freesound](https://freesound.org/people/Fupicat/sounds/538149) |
|
|
51
|
+
| `g9-ask-focus.wav` | 提问·聚焦 | [UI Sound] Approval - High Pitched Bell Synth | GabFitzgerald | [freesound](https://freesound.org/people/GabFitzgerald/sounds/625174) |
|
|
52
|
+
| `g9-ask-blur.wav` | 提问·未聚焦 | Blip or Select | Jofae | [freesound](https://freesound.org/people/Jofae/sounds/379339) |
|
|
53
|
+
|
|
54
|
+
全部素材均为 CC0 1.0,无署名义务;出处以各 Freesound 原始页面为准。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dsh-plugin.json
CHANGED
package/lib/index.js
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* "user has to answer, come back" cue
|
|
8
8
|
* - the assistant turn finishes (session/event `turn/end`)
|
|
9
9
|
* with separate variants for focused vs unfocused terminal windows.
|
|
10
|
-
*
|
|
10
|
+
* Nine sound groups — synthetic g1 crisp / g2 wood / g3 chiptune / g4 warm
|
|
11
|
+
* (see scripts/gen-sounds.mjs) and sampled g5 bell / g6 bubble / g7 arcade /
|
|
12
|
+
* g8 marimba / g9 soft synth (CC0, see assets/sounds/CREDITS.md) — are
|
|
11
13
|
* selectable per scenario in a dedicated settings section (zh/en); a master
|
|
12
14
|
* volume (0%–150%, 5% steps) gains the PCM samples before playback
|
|
13
15
|
* (lib/wav.js scales in memory; PlaySoundW gets SND_MEMORY buffers, so
|
|
@@ -81,6 +83,11 @@ const GROUP_OPTIONS = [
|
|
|
81
83
|
{ value: 'g2', label: 'Wood', descriptions: { zh: '木质敲击', en: 'Wood' } },
|
|
82
84
|
{ value: 'g3', label: 'Chiptune', descriptions: { zh: '八比特', en: 'Chiptune' } },
|
|
83
85
|
{ value: 'g4', label: 'Warm', descriptions: { zh: '温馨钢琴', en: 'Warm' } },
|
|
86
|
+
{ value: 'g5', label: 'Bell', descriptions: { zh: '清亮铃声', en: 'Bell' } },
|
|
87
|
+
{ value: 'g6', label: 'Bubble', descriptions: { zh: '气泡水滴', en: 'Bubble' } },
|
|
88
|
+
{ value: 'g7', label: 'Arcade', descriptions: { zh: '街机电子', en: 'Arcade' } },
|
|
89
|
+
{ value: 'g8', label: 'Marimba', descriptions: { zh: '木质马林巴', en: 'Marimba' } },
|
|
90
|
+
{ value: 'g9', label: 'Soft Synth', descriptions: { zh: '柔和电子', en: 'Soft Synth' } },
|
|
84
91
|
{ value: 'off', label: 'Off', descriptions: { zh: '关闭', en: 'Off' } },
|
|
85
92
|
];
|
|
86
93
|
/** Volume choices: 0%–150% in 5% steps (stored as plain value strings). */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-chime-sound",
|
|
3
|
-
"version": "0.2
|
|
4
|
-
"description": "Notification sounds for dsh-tui: distinct tones for conversation done / user question, focused vs unfocused terminal,
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Notification sounds for dsh-tui: distinct tones for conversation done / user question, focused vs unfocused terminal, 9 selectable sound groups, master volume 0-150% in 5% steps, settings section, zh/en",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"dsh-plugin.json",
|
|
30
30
|
"cordis.patch.yml",
|
|
31
31
|
"README.md",
|
|
32
|
+
"README.zh.md",
|
|
33
|
+
"CHANGELOG.md",
|
|
32
34
|
"LICENSE"
|
|
33
35
|
],
|
|
34
36
|
"dsh": {
|