Bundle
dsh-tts-player
TTS 语音播放插件:为 DSH 聊天界面添加语音朗读功能,支持配置本地 TTS 服务,每条助手消息可朗读,AI 可调用 tts-speak 工具发送语音。
- Source
- BakaCirno233
- License
- MIT
- Updated
- Updated 2 days ago
Readme
# dsh-tts-player
DSH 语音播放插件 — 为聊天界面添加 TTS 语音朗读功能。
## 功能
- **🔈 助手消息朗读按钮** — 每条助手消息右侧出现喇叭图标,点击朗读该消息
- **🎵 tts-speak 工具** — AI 模型可调用,合成简短情绪语音,工具卡片上有点击播放按钮
- **⚙️ 设置页面** — 侧边栏 → 设置 → 语音播放,配置本地 TTS 服务地址
- **🧪 测试功能** — 设置页内置测试按钮,快速验证 TTS 服务
## 安装
```bash
# 安装到桌面版
dsh plugin --profile desktop add dsh-tts-player
# 安装到 Web 版
dsh plugin --profile web add dsh-tts-player
```
## 配置
1. 打开侧边栏 → 设置 → 语音播放
2. 填入 TTS 服务地址(默认 `http://127.0.0.1:5000`)
3. 点击「测试」按钮验证
4. 点击「保存」按钮保存
### TTS 地址格式
| 场景 | 填写示例 |
|------|---------|
| 默认(Simple-Bert-VITS2) | `http://127.0.0.1:5000` |
| 自定义端点 | `http://127.0.0.1:5000/voice?text={text}` |
如果 URL 包含 `{text}` 占位符,插件会替换为 URL 编码后的文本;否则自动拼接 `/voice?text=...`。
## 使用
### 朗读助手消息
点击任意助手消息右侧的 🔈 按钮,自动朗读消息文本(截断前 100 字符)。
### AI 发送语音
模型可使用 `tts-speak` 工具发送简短情绪语音,工具调用卡片上会出现「🔈 播放语音」按钮。
## 依赖
- `@deepseek-ai/dsh-tools`
- `@deepseek-ai/dsh-host-webserver`
- `@deepseek-ai/dsh-subprocess`
- 本地 TTS 服务(如 Style-Bert-VITS2)
## 许可证
MITInstall
dsh plugin --profile web add github:BakaCirno233/dsh-tts-player
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-tts-player from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.