dsh-ellen-voice
给 DeepSeek Harness(DSH)装上「艾莲」的克隆声线 · Gives the DeepSeek Harness agent a voice.
English
A DSH plugin that turns a short piece of text into speech through a local TTS endpoint, caches the audio, and plays it on this machine's speakers.
The plugin ships no models. It only asks an HTTP endpoint for audio bytes, caches them, and plays them.
Any service that returns audio for ?text=&lang= works; the author's setup is GPT-SoVITS behind a thin
proxy on http://127.0.0.1:7811/tts.
Requirements
- Windows (playback uses PowerShell
Media.SoundPlayer). - Node.js 20 or newer.
- DeepSeek Harness with the plugin API (0.2+).
- A TTS endpoint reachable from this machine.
Install
dsh plugin add dsh-ellen-voice
You can also install it from the plugin manager, or from a local directory while developing.
Check it worked: the tool list should contain ellen_speak, or just say “read this out loud” in a
conversation.
The install adds an ellen-voice entry to your profile's cordis.patch.yml; its config lives on that
line. Change the config, then reinstall the plugin to apply it.
Your TTS endpoint
Defaults to http://127.0.0.1:7811/tts with the convention ?text=…&lang=…, returning audio bytes.
Self-check:
http://127.0.0.1:7811/healthreturns JSON.http://127.0.0.1:7811/tts?text=hello&lang=endownloads an audio file.
Point ttsUrl anywhere else if you like — the contract is just “audio bytes for text”.
Tool
| Tool | Purpose |
|---|---|
ellen_speak |
Speaks a short piece of text. Arguments: text (required), lang (zh / ko / en / ja / auto). Playback is synchronous — the call returns only after the audio finishes, so keep the text short. |
Configuration
Edit the config of the ellen-voice line in your profile's cordis.patch.yml:
| Key | Default | Meaning |
|---|---|---|
ttsUrl |
http://127.0.0.1:7811/tts |
TTS endpoint, ?text=&lang= convention. |
lang |
zh |
Default language. auto lets the server decide. |
maxChars |
400 |
Maximum characters per call; longer text is rejected so you split it. |
cacheDir |
%LOCALAPPDATA%\dsh-ellen-voice\cache |
Audio cache; identical text hits the cache. |
player |
empty | Custom player command. Empty means PowerShell SoundPlayer (wav only). |
ffmpeg |
empty | Used to convert mp3 replies to wav. Empty means look for ffmpeg.exe on PATH. |
synthTimeoutMs / playTimeoutMs |
60000 / 120000 | Synthesis and playback timeouts. |
Data and privacy
- The plugin contacts
ttsUrlonly (loopback by default). Nothing is uploaded to third parties. - Synthesized audio is cached under
%LOCALAPPDATA%\dsh-ellen-voice\cache; deleting the folder clears it. - Playback spawns
powershell.exeand calls .NETMedia.SoundPlayeron a local file. It downloads nothing and executes no external script.
Troubleshooting
- Cannot reach the TTS service — the service behind
ttsUrlis not running, or something else owns the port. - Empty synthesis result (< 1024 bytes) — the model is still loading (30–90 s on first start), or the backend is down.
- “mp3 but no ffmpeg” — set
ffmpegto the full path offfmpeg.exe, or make the server return wav. - Silent but no error — check the DeepSeek Harness volume in the Windows volume mixer.
- Speech cut off mid-sentence — playback is synchronous; a host timeout or manual abort truncates it.
Uninstall
Remove the bundle with the plugin manager, or delete the ellen-voice line from your profile's
cordis.patch.yml. The cache directory can be deleted freely.
Known limitations
- Windows only (PowerShell
SoundPlayer). - Audio comes out of this machine's speakers; it is not streamed into the web UI.
- Playback blocks the tool call until the sentence finishes.
License
MIT. Models, reference audio and datasets are not part of this package — check the licence of whatever voice material you use.
中文
让 DeepSeek Harness 用「艾莲」的克隆声线说话。
插件本身不含模型,只做三件事:向本机的 TTS 接口要一段音频、缓存它、从这台电脑的扬声器放出来。
合成本身交给任意一个「给文字、回音频」的 HTTP 服务(作者用的是 GPT-SoVITS + 一个薄代理,默认 http://127.0.0.1:7811/tts)。
安装
要求:Windows、Node 20+、DeepSeek Harness(插件 API 与 DSH 一同升级,0.2 以上可用)。
装进当前 profile:
dsh plugin add dsh-ellen-voice也可以在
plugin_manager里以dsh-ellen-voice为 target 安装,或从本地目录安装(开发时用)。确认装上了:工具列表里出现
ellen_speak,或在对话里说「用艾莲的声音念一句你好」。准备好 TTS 接口(见下一节),再用。
插件会往 profile 的 cordis.patch.yml 插一行 ellen-voice,config 就在那一行里,改完重装即可生效。
使用前提
- 有一个会返回音频的 HTTP TTS 服务,默认地址
http://127.0.0.1:7811/tts,约定?text=…&lang=…。 作者的环境是 GPT-SoVITS:中文模型 7812、韩语模型 7813、薄代理 7811。 - 自检:
http://127.0.0.1:7811/health返回 JSON;http://127.0.0.1:7811/tts?text=你好&lang=zh能直接下载到音频。
如果不用 7811,把 ttsUrl 改成你自己的地址即可;只要对方按上面的约定返回音频字节就行。
能力
| 工具 | 作用 |
|---|---|
ellen_speak |
把一小段文字念出来。参数 text(必填)、lang(zh/ko/en/ja/auto)。播放是同步的:调用会在念完后才返回,所以文字要短。 |
配置项
改 profile 的 cordis.patch.yml 里 ellen-voice 行的 config:
| 键 | 默认 | 说明 |
|---|---|---|
ttsUrl |
http://127.0.0.1:7811/tts |
TTS 接口地址,按 ?text=&lang= 约定。 |
lang |
zh |
默认语种。ko 走韩语参考音克隆,auto 让服务端判断。 |
maxChars |
400 |
单次最多念多少字,超了直接报错让你拆分。 |
cacheDir |
%LOCALAPPDATA%\dsh-ellen-voice\cache |
音频缓存目录,同一句话第二次直接命中。 |
player |
空 | 自定义播放器命令;留空用 PowerShell 的 SoundPlayer(只认 wav)。 |
ffmpeg |
空 | 返回 mp3 时用它转 wav。留空则去 PATH 里找 ffmpeg.exe。 |
synthTimeoutMs / playTimeoutMs |
60000 / 120000 | 合成、播放的超时。 |
数据流向
- 只访问
ttsUrl(默认本机回环地址),不向任何外部服务器发送内容。 - 合成结果缓存在本机
%LOCALAPPDATA%\dsh-ellen-voice\cache,删目录即清空。 - 播放通过
powershell.exe调用 .NETMedia.SoundPlayer,不下载、不执行任何脚本。
排错
- 连不上语音服务:
ttsUrl对应的服务没起,或端口被别的程序占了。 - 合成结果为空(<1024 字节):模型还在加载(首次 30–90 秒),或后端挂了。
- 提示 mp3 但没 ffmpeg:把
ffmpeg指向ffmpeg.exe的完整路径,或让服务端直接返回 wav。 - 没声音但没报错:检查 Windows 音量混合器里 DeepSeek Harness 的音量。
- 念到一半被打断:工具是同步播放的,宿主超时或你手动中止都会截断。
卸载
plugin_manager 里 remove_bundle,或从 profile 的 cordis.patch.yml 删掉 ellen-voice 那一行;缓存目录可直接删。
已知限制
- 仅 Windows(依赖 PowerShell
SoundPlayer)。 - 音频只从这台电脑的扬声器出声,不会在网页界面里播放。
- 播放是阻塞的:一句太长会占住工具调用直到念完。
许可
MIT。模型、参考音频、数据集都不在本包里;请自行确认你所使用的声线素材的授权。
No comments yet. Be the first to write one.