dsh-audio-rail
Manifest validA DeepSeek Harness (DSH) plugin that makes the quick-jump anchors (turn rail) on the right edge of the conversation page dance with whatever music your system is playing.
dsh-audio-rail
中文 | English
让 DSH Web GUI 会话页面右侧的「快捷跳转锚点」(turn rail)随系统正在播放的音乐律动——像把频谱可视化的柱形旋转了 90°。
兼容性声明:当前版本(v1.0.1)仅针对 dsh v0.1.7-rc.2 适配验证。本插件依赖
dsh-client-ui-chat的 TurnNavigator DOM 契约(_marks容器内的_mark按钮、data-index排序、固定 20px 短条、scaleX 状态系数);DSH 升级若再次重构该组件,视觉效果可能失效(采集与 SSE 音频管线不受影响)。不同版本请自查该组件结构。
效果演示

GitHub 会剥离手写 <video> 标签,所以用 GIF 内联自动循环播放;有声完整版见 demo1.mp4。
原理
┌─ bin/AudioRailCapture.exe ─┐ stdout JSON ┌─ index.js (host) ─┐ SSE ┌─ client.js (browser) ─┐
│ WASAPI 环回采集默认渲染端点 │ ───────────────▶ │ /audio-rail/events │ ───────▶ │ 每个锚点绑定一个频段, │
│ FFT → 12 个对数频段 @30fps │ │ /audio-rail/status │ │ scaleX 伸缩 ::before │
└────────────────────────────┘ └────────────────────┘ └────────────────────────┘
- 采集:
src/AudioRailCapture.cs(csc.exe 编译,零依赖单文件)以环回模式捕获默认渲染端点的系统混音(WASAPI shared mode +AUDCLNT_STREAMFLAGS_LOOPBACK),FFT 后归约为 12 个对数分布频段(45 Hz–16 kHz)。归一化采用「约 1 秒滑窗均值」为基准的相对动态映射(-9/+17 dB 窗口):持续内容停在中线、鼓点瞬态上冲、弱奏回落,不会像峰值跟踪那样一直顶格。约 30 fps 输出 JSON 行,静默时输出衰减到 0。 - 宿主:
index.js注册/audio-rail/events(SSE)与/audio-rail/status。有订阅者才启动采集进程,最后一个订阅者断开 15 秒后停止;崩溃按指数退避重启(设备热插拔 exit 3 可恢复)。 - 浏览器:
client.js注入一条 CSS 规则,把锚点短条(.…_mark::before)的transform变为translateY(-50%) scaleX(var(--dsh-audio-rail-scale, .6));EventSource 接收频段帧,rAF 循环内对每个锚点做攻击/释放平滑后写入 CSS 变量。宿主的短条为固定 20px、以 scaleX 表达状态长度(.4 未加载 / .6 默认 / .9 预览 / 1 当前),插件把音频脉冲乘在宿主状态系数之上(上限 26px),状态样式完全保留。低音在底部锚点。尊重prefers-reduced-motion(此时完全不启用)。
安装
克隆后先编译采集器(build.cmd 调用 Windows 自带的 .NET Framework csc.exe,无需安装任何依赖):
build.cmd
然后在 DeepSeek Harness 会话里让 agent 安装 bundle,或手动:
dsh plugin --profile web add link:<本仓库克隆路径>
安装后浏览器页面自动热加载,无需刷新。
备注
- 本机(部分 Windows 版本/运行时组合)
IMMDevice::Activate对IID_IAudioClient返回E_NOINTERFACE,因此 helper 按IAudioClient3 → IAudioClient2 → IAudioClient1顺序探测,并且设备以下的 COM 调用全部走原始 vtable 委托(避开该运行时对Activate封送抛InvalidCastException的问题)。 - 高采样率设备(如 192 kHz)会自动放大 FFT 点数,保证低频段分辨率。
- 卸载/禁用插件后,SSE 断开,采集进程随之退出,不产生常驻开销。
- 仅支持 Windows(WASAPI 是 Windows 音频栈)。
文件
| 文件 | 作用 |
|---|---|
index.js | Host 半面:路由 + 采集进程生命周期 |
client.js | 浏览器半面:样式注入 + SSE + rAF 动画 |
src/AudioRailCapture.cs | WASAPI 环回采集 + FFT(C#5,csc.exe 可编译) |
build.cmd | 采集器一键编译脚本(调用系统自带 csc.exe) |
bin/AudioRailCapture.exe | 采集器编译产物(不随仓库分发,由 build.cmd 生成,.gitignore 忽略) |
docs/demo1.gif | 效果演示(README 内联播放) |
docs/demo1.mp4 | 效果演示完整视频 |
cordis.patch.yml | bundle 补丁,插入 ui-dsh-audio-rail 行 |
许可
Comments
Loading…
Similar plugins
by LeonSone
DSH web plugin: 模仿 deepseek 网页版界面右侧的问题条 — 右缘一条竖向问题栏,列出当前会话每一轮的用户提问,点击平滑滚动定位。DeepSeek Harness right-edge question rail.
★ 0
MIT
JavaScript
Sep 4, 2026
dsh plugin --profile web add dsh-question-railby EnkiduGilgamesh
DeepSeek Harness plugin: a hoverable/clickable outline rail on the left of the chat column (one marker per turn, summary card on hover, click to jump).
★ 0
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add dsh-codex-side-outlineby Goothe13-gugu
用于Deepseek Harness的插件,让你的大模型边思考边唱歌。A plugin for Deepseek Harness (DSH) to play music or audio when your LLM is thinking.
★ 0
MIT
JavaScript
Sep 23, 2026
dsh plugin --profile web add dsh-audio-cueby GooDAnDReaDY
DSH plugin: audio chimes, cross-session toasts, desktop push, and IM webhooks for turn completion, errors, and approvals.
★ 0
MIT
JavaScript
Sep 25, 2026
dsh plugin --profile web add @goodandready/dsh-plugin-notifyby xccpddym
Bubble navigation for DSH (DeepSeek Harness): a draggable accelerator ball listing all of your questions (numbered + timed), plus a full conversation outline panel with category filters. Click to jump
★ 0
MIT
JavaScript
Aug 17, 2026
dsh plugin --profile web add dsh-bubble-navby SocFeng
DSH WebUI session query navigation with a faint conversation-edge rail, a hover list of real user queries, and click-to-jump back to the matching bubble.
★ 1
MIT
JavaScript
Aug 26, 2026
dsh plugin --profile web add dsh-query-jump