Yihong89/dsh-voice-core
语音引擎,使用Qwen TTS模型
Project Overview项目介绍
This is a core shared voice library built exclusively for DeepSeek Harness (DSH). It is not a standalone plugin, but rather a shared dependency that powers the two DSH plugins dsh-teacher and dsh-companion. To install it via the DSH CLI, users can run the command dsh plugin --profile web add github:Yihong89/dsh-voice-core, then add an entry for it in their profile’s cordis.patch.yml to register the library’s events. The library splits functionality into a host side and a client side, with the host handling routing to a local Qwen3-TTS service that runs on the user’s own machine. The default port for the local TTS service is 3091, which can be overridden via the DSH_VOICE_TTS_URL environment variable.
The host side of the library provides multiple key features for voice functionality in DSH. It exposes the applyVoice(ctx, config) method that consuming plugins call in their own apply() setup. It adds speak and cheer model tools, registers /speak, /cheer, /voice and other slash commands, and manages session projection for voice events. It also includes a daily greeting scheduler that can trigger the agent to generate a welcome message plus a daily fun fact or news item to read aloud, or read a fixed configured message if that is preferred by the user. Users can configure multiple voice styles and set a default style via the library’s config.
The client side of the library handles the actual audio playback and user-facing behavior, but it does not include any built-in UI like icons or buttons. All configuration and selection interfaces are handled by the consuming plugins that depend on this core library. It automatically queues audio files for sequential playback, so audio clips never overlap, and it automatically reads aloud every assistant response after a 1-second delay to let text render first. It stores a persistent cursor in the user’s localStorage per session, so switching sessions or refreshing the page will not re-read old messages. The library is released under the open source MIT license, and includes 49 unit tests to validate core functionality.
这是专为DeepSeek Harness(DSH)开发的共享语音核心库,并非独立可用的插件,主要为DSH生态中的dsh-teacher和dsh-companion两个插件提供公共语音底层能力。它对接本地运行的Qwen3-TTS服务,默认转发请求到127.0.0.1:3091,也可通过环境变量DSH_VOICE_TTS_URL覆盖地址,提供语音播报、指令调度等基础能力。
它分为Host端和Client端两部分,Host端负责路由转发、命令注册和会话管理,支持配置多种不同音色,还可开启每日问候调度,到点自动让Agent生成欢迎语加每日趣闻朗读,也可配置固定文案。Client端不自带UI,只提供音频队列播放、自动朗读、会话持久化等底层行为,配置界面交给消费插件实现。
安装时可通过DSH CLI执行dsh plugin --profile web add github:Yihong89/dsh-voice-core完成,之后需要在profile的cordis.patch.yml中注册该库的事件。由于pnpm 11默认开启blockExoticSubdeps,若遇到依赖报错,需要在pnpm-workspace.yaml中手动关闭该配置项。项目采用MIT许可证,包含49个单元测试可验证功能正确性。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-voice-core(Yihong89/dsh-voice-core)
仓库:https://github.com/Yihong89/dsh-voice-core
本站详情页:https://www.yhbd.top/plugins/yihong89-dsh-voice-core/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-08-17 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:Yihong89/dsh-voice-core
把 Yihong89/dsh-voice-core 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-voice-core
共享语音引擎(Shared Voice Engine)—— dsh-teacher 与 dsh-companion 的公共底层。
一个 library,不是独立插件:消费插件(dsh-teacher / dsh-companion)在自己的
apply() 里调用 applyVoice(ctx, config)(host 侧),client 侧通过
createVoiceClient(opts) 组合共享 UI。语音由 mac mini 上的 Qwen3-TTS
(VoiceDesign,MPS 加速)生成,浏览器播放——声音从使用者自己的机器出来。
提供的能力
Host(applyVoice(ctx, config))
- Qwen3-TTS 代理路由:
{ttsPath}(如/dsh-teacher/tts)+-health,转发到 本地 TTS 服务(127.0.0.1:3091,可用DSH_VOICE_TTS_URL覆盖) speak/cheer模型工具(log-onlyvoice/*事件)/speak /cheer /cheer-at /cheer-text /voice命令voiceSpeak会话投影(foldvoice/speak/voice/spoken/voice/cheer)- 每日问候调度器:到点
agent.followup让 Agent 自己生成"欢迎 + 趣闻/新闻" (或配置固定文案直接朗读);schedulerEnabled控制开关 - 音色配置驱动:
config.styles(音色目录)+config.defaultStyle
Client(createVoiceClient(opts))
- 无内置 UI(不渲染任何图标/按钮)——只提供底层行为:自动朗读、音频播放、 💛 cheer 卡片,配置/选择界面完全交给消费插件自己实现
- 音频队列播放(fetch WAV →
<audio>,顺序播放不重叠) - 自动朗读每条 assistant 回复(1s 先显示文字),带按会话持久化的 localStorage cursor —— 切换会话/刷新页面不会重复朗读旧消息
- preset 门控:只在该消费插件的 agent preset 会话里生效
opts.resolveInstruct(sessionId)可选:按会话动态决定 TTS instruct(优先于defaultStyle的静态值),供需要"每个会话自己的音色"的消费者使用
配置示例
// dsh-teacher 的 apply()
import { applyVoice } from 'dsh-voice-core'
await applyVoice(ctx, {
presetName: 'teacher',
ttsPath: '/dsh-teacher/tts',
styles: { onee: { label: '🎧 清冷御姐', instruct: '清冷柔和的成年女声…' } },
defaultStyle: 'onee',
schedulerEnabled: false,
})
// client 侧
import { createVoiceClient } from 'dsh-voice-core'
var voiceClient = createVoiceClient({
presetName: 'teacher',
ttsPath: '/dsh-teacher/tts',
styles: { onee: { label: '🎧 清冷御姐', instruct: '…' } },
defaultStyle: 'onee',
})
// 在 apply 里:voiceClient.apply(ctx)
安装
dsh plugin --profile web add github:Yihong89/dsh-voice-core
profile 的 cordis.patch.yml 注册事件:
- insert:
- id: dsh-voice-registrar
name: dsh-voice-core/register-events
pnpm 11 默认
blockExoticSubdeps: true,而 dsh-teacher/dsh-companion 把 dsh-voice-core 作为 git 子依赖。若报ERR_PNPM_EXOTIC_SUBDEP,在 profile 的pnpm-workspace.yaml加blockExoticSubdeps: false。
测试
node --test test/*.test.js # 49 tests
License
MIT
nexu-io/open-design
Devin-AXIS/iPolloWork
liustack/modlens
Alisa0808/vox-director
EthanYoQ/AI-Novel-Writer
Anionex/agent-vision-toolkit
ysr666/dsh-vision-router
tong-io/tongflow