QQ group song requests for dsh-xiaoman-sing; she learns the song and sends the cover back to the group.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-xiaoman-sing-qq
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:xiaomanla2026/dsh-xiaoman-sing-qq
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
在 QQ 里点歌,在自己的电脑上唱,唱完把成品发回群里。
这是 dsh-xiaoman-sing 的 QQ 层。分离、换声、修音全在主插件里跑;这边只负责收消息、调学歌、把音频发回去。
两件套:这个插件不能单独用。 真正的分离、换声、修音在 dsh-xiaoman-sing 里跑,这个插件只是 QQ 那一层。 只装这个:有人点歌,它会回一句「还缺唱歌插件」并给出安装地址;不会唱歌。 两个插件装在同一个 DSH 里,装完不用互相配置,点歌直接能用。
它怎么工作
群里有人发「唱 晴天」
↓
本插件按这个顺序找:
① 歌库里有成品 → 直接发,不重学
② localDirs 里有原文件 → 用本地文件学(无损比 B 站好)
③ 都没有 → 调 dsh-xiaoman-sing 搜 B 站
唯一命中 → 直接学
好几版 → 列出来(标题/作者/时长),
回数字,或者回「周杰伦」「原唱」这类词去选
↓
主插件:六轨分离 → 拆主唱 → 去混响 → 换声 → 修音 → 定调(约 3 分钟)
↓
学完 → 本插件把 mix.mp3 发回那个群(@ 点歌的人)
localDirs 填你放无损/成品歌的目录(比如 ["F:/无损库", "F:/songs_final"]),点歌会先在这里按歌名找,找到就不去 B 站。
所有群串行学歌(一首一首来,不抢显卡);同一首歌 30 分钟内不会被重复点;没学成的歌 5 分钟内不能连着点。
前提
| 需要什么 | 说明 |
|---|---|
| DSH | 装了这个插件跑在 DSH 里 |
| dsh-xiaoman-sing | 真正干活的那个。它的 INSTALL.md 里的模型、显卡、SVC 桥一个都不能少 |
| 任意 OneBot 11 实现(NapCat / Lagrange / LLOneBot / go-cqhttp) | 把 QQ 消息转成事件推过来;三种接法见第 3 步 |
| QQ 小号 | 建议专门给机器人用,别拿主号 |
装
1. 先把唱歌那一套装好
严格按 dsh-xiaoman-sing 的 INSTALL.md 走完,直到在 DSH 侧栏「小满的歌」里能正常学一首歌。
没有这一步,有人点歌时本插件只会回一句「还缺唱歌插件」并给出安装地址,不会唱歌。
2. 装本插件
推荐:npm 版(已经发到 npm,不用 clone):
在 DSH profile 的 package.json 里两处加上它:
{
"dependencies": {
"dsh-xiaoman-sing-qq": "^0.1.6"
},
"dsh": {
"profile": {
"bundles": ["dsh-xiaoman-sing-qq"]
}
}
}
然后让 DSH 重新装依赖(或直接重启 DSH)。
想改代码:从源码装:
git clone https://github.com/xiaomanla2026/dsh-xiaoman-sing-qq.git D:/dsh-xiaoman-sing-qq
cd D:/dsh-xiaoman-sing-qq
npm install
npm run build
上面
D:/dsh-xiaoman-sing-qq只是示例,换成你实际放插件的目录(没 D 盘就换 C: 或别的)。link:里的路径必须和它对字面完全一致,否则插件装了不生效。
然后在 DSH profile 的 package.json 里两处加上它:
{
"dependencies": {
"dsh-xiaoman-sing-qq": "link:D:/dsh-xiaoman-sing-qq"
},
"dsh": {
"profile": {
"bundles": ["dsh-xiaoman-sing-qq"]
}
}
}
3. 让 QQ 端把事件推给本插件
本插件不绑死 NapCat,任何说 OneBot 11 协议的 QQ 端都行(NapCat、Lagrange、LLOneBot、go-cqhttp 等)。三种接法任选一种,用 mode 切换:
A. mode: "ws-client"(默认)——我们去连它
在对方的配置里开一个 WebSocket 服务端。以 NapCat 的 onebot11.json 为例:
{
"network": {
"websocketServers": [
{
"name": "dsh-sing",
"enable": true,
"host": "127.0.0.1",
"port": 12551,
"messagePostFormat": "array",
"token": "换成你自己的随机串",
"heartInterval": 30000
}
]
}
}
本插件填 "wsUrl": "ws://127.0.0.1:12551",token 用同一个。消息格式给 array 或 string(CQ 码)都能解析。
B. mode: "ws-server"——让它来连我们
有些 QQ 端只会主动连出去,或者不方便开远端监听。这时在它的配置里填本插件地址:
ws://<本插件所在机器>:12554/?access_token=<同一个 token>
本插件这边填 "listenHost": "127.0.0.1"、"listenPort": 12554、"token": "<同一个>"。它连上来之后,收事件和调 API(get_login_info、发语音)走同一条连接。
C. mode: "http"——它把事件 POST 过来
go-cqhttp 的 HTTP 上报那种。对方「上报地址」填 http://<本插件所在机器>:12554/;本插件回消息时反过来调它的 API,地址写在 "apiUrl"(go-cqhttp 默认 http://127.0.0.1:3000)。这个端口同时也能接 ws-server,互不冲突。
要点:
- 三种都只监听
127.0.0.1,别开公网。 token三种接法通用;对方没设就留空。- 想知道现在用哪种、连没连上、登的哪个号,私聊发「唱歌状态」。
4. 写设置
不想手改也行:DSH 重启后侧栏会有「点歌设置」,勾群、开私聊、点保存,重启后生效。下面这是手改的路子。
~/.dsh/dsh-xiaoman-sing-qq/settings.json:
默认不响应任何人:
allowGroups为空时一个群都不接,allowPrivate: false时私聊也不接。想让它点歌,把群号填进allowGroups;私聊要点就把allowPrivate改true。
{
"enable": true,
"mode": "ws-client",
"wsUrl": "ws://127.0.0.1:12551",
"token": "对方配的那个 token,没有就留空",
"listenHost": "127.0.0.1",
"listenPort": 12554,
"apiUrl": "http://127.0.0.1:3000",
"prefixes": ["唱", "点歌", "翻唱"],
"allowGroups": ["你的群号"],
"allowPrivate": false,
"sendAs": "auto",
"maxRecordSec": 50,
"splitRecord": true,
"maxParts": 12,
"candidateCount": 4,
"pickTimeoutMin": 10,
"ffmpegPath": "",
"localDirs": ["D:/songs_final", "D:/无损库"],
"cooldownMin": 30,
"atSender": true
}
5. 重启 DSH
重启后群里发一句 唱 晴天。顺序是:已经学会的直接放 → localDirs 里找到本地音源就用它学 → 都没有才去 B 站搜。B 站上同名版本不止一个时,机器人会先把候选列出来让你回数字选,选好才开始学;只有唯一命中时才会直接开始。
第一首会慢(要搜、要分离、要换声),日志里能看到进度。
设置项
| 键 | 默认 | 意思 |
|---|---|---|
enable |
true |
关掉就不连 QQ |
mode |
ws-client |
ws-client 我们连对方 / ws-server 对方连我们 / http 对方 POST 事件过来 |
wsUrl |
ws://127.0.0.1:12551 |
mode=ws-client 时对方的 WebSocket 地址,不是 DSH 的网址 |
token |
"" |
对方配的 access token;没配就留空。三种接法通用 |
listenHost |
127.0.0.1 |
mode=ws-server / http 时本插件监听在哪,别写 0.0.0.0 |
listenPort |
12554 |
本插件监听的端口(那两种接法用得到) |
apiUrl |
http://127.0.0.1:3000 |
mode=http 时回发消息调对方 API 的地址 |
prefixes |
["唱","点歌","翻唱"] |
命中任意一个就当成点歌 |
allowGroups |
[] |
只在这些群响应;空 = 一个群都不响应(要填群号才会点歌) |
allowPrivate |
false |
私聊也能点(默认关) |
sendAs |
auto |
auto 长的切段发语音、短的直接发语音;record 一律发语音;file 一律发文件。语音条会被 QQ 再编码一遍(码率低、有一点底噪),要原音质选 file;设置页「发出去的方式」也能直接选 |
maxRecordSec |
50 |
每段语音最长多少秒(QQ 语音上限约 60 秒,超了会变成文件下载) |
splitRecord |
true |
超过 maxRecordSec 时切成几段语音发 |
maxParts |
12 |
最多切几段;要切更多段就直接发整首文件 |
candidateCount |
4 |
搜到多个版本时最多列几个让人选 |
pickTimeoutMin |
10 |
列出版本后等你回数字的分钟数,过了就作废 |
ffmpegPath |
"" |
切片用的 ffmpeg;空 = 用 PATH 里的,Windows 建议写绝对路径 |
localDirs |
[] |
本地无损库 / 生音源目录(最多往下翻四层)。点歌先在这里按文件名找,找到就直接学,音质比 B 站好;别放已经混好的成品,那会被当成生音源再分离一遍;空 = 只在 B 站搜 |
cooldownMin |
30 |
同一首歌的冷却分钟 |
atSender |
true |
回复时 @ 点歌的人 |
限制
- 只支持 OneBot 11;go-cqhttp 已经停更,推荐 NapCat 或 Lagrange。
- 长歌切段要用 ffmpeg:装了并放进 PATH,或者把
ffmpegPath写成绝对路径。没有 ffmpeg 时会退回「整首发文件」。 - 学歌时长取决于主插件那套链路,AMD 卡约 3 分钟一首,N 卡更快。
- 换声要 SVC 桥在跑;桥没起时主插件会降级成原声,成品照样能听。
- 不支持合唱、不支持指定音源(想换音源就在群里说歌名,主插件按默认顺序找)。
- 同一群并发会被挡:正在学一首时再点会回「还有一首在学」。
许可
MIT。主插件 fork 自 luckui/dsh-singinglab。
Links
More in this category
Yuuyuko-uu/dsh-tts-bridge★ 271
Reads DSH conversations aloud using the DeepSeek web page's built-in read-aloud, driven by a small browser extension.
Fishsb/dsh-voice-prompt-enhancer★ 137
Rewrites a composer draft into a clearer, structured prompt (5 modes, model fallback chain, optional multi-round memory) and adds stop-on-silence, hotkey and filler-word cleanup to DSH voice input; transcription stays with the official speechToText, the plugin ships no engine.
cloudoyx/any-audio★ 77
DSH has its own audio workstation too: real recordings, multiple TTS engines, genuine sound effects and local singing synthesis, with every generated sound landing as its own clip on one visible timeline that you can audition, balance and fine-tune track by track. Use it for scoring animation, producing audiobooks and radio drama, composing and mixing on your own, making ASMR, and whatever else you come up with.
PolinniZhong/dsh-omi-voice★ 75
In-chat read-aloud for DeepSeek Harness: tap to read, pause and resume AI replies with natural Doubao TTS voices (BYOK), reading only the final answer with code, tables and diagrams filtered; local engine, plugin keeps no API key.
ppy-web/dsh-plugin-xiaomi-mimo-tts★ 75
Voice Studio for DSH with 10+ cloud and local speech engines (Xiaomi MiMo, Doubao, Breeze, DeepSeek, local MOSS-Nano, browser speech, external adapters) plus cloud ASR, smart text filtering, live subtitles and voice orbs, /director multi-role WAV drama studio, and desktop pet, novel, QQ Bot, dsh-Go, and AI Passport integrations. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
1624318455/dsh-plugin-tts★ 66
Reads assistant replies aloud via free Edge TTS or your own RVC voice models: read-aloud buttons + auto-read, adaptive chunked progressive playback (gapless long reads), one-click voice-pack installs from a registry, and a portable RVC runtime.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.