DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

nanchen8888 /

nanchen8888/dsh-voice-inject

Verified

把外部语音识别结果注入 DSH 会话的本地插件(127.0.0.1:8790),不抢焦点。

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@65ca82f5

dsh-voice-inject

把外部语音识别结果直接注入 DSH 会话的本地插件。它解决的是「在游戏/全屏应用前台按 F9 说话」的场景:不需要抢焦点、不需要模拟键盘,语音文本从本机 HTTP 端口进来,宿主直接把消息塞进目标会话。

它做什么

  • 监听 127.0.0.1:8790(仅本机,不对外)。
  • POST /inject:把一段文本投递到会话。body 可选 sessionId;不传时按「最近更新的会话 → voice-target.json 钉住的会话」选择。
  • POST /tts/toggle(或 /tts):翻转 TTS 开关,并写回 <DSH_HOME>/tts/config.json。
  • GET /state:返回当前 TTS 状态与目标会话。

安装

把本目录作为 DSH bundle 安装到 profile(或直接把目录链接进 profile 的 node_modules),在 cordis.patch.yml 里注册。插件入口是 lib/index.js,只依赖 Node 内置模块。

路径约定

插件按 Windows 本机环境写死了 D:\dsh-home 作为 DSH 数据目录(sessions/、tts/、pet-lan/)。如果你的目录不同,改 lib/index.js 顶部的 HOME 常量。

安全

  • 服务只绑定 127.0.0.1,没有鉴权;同一台机器上的其它进程可以调用它。不要把它暴露到公网。
  • 日志写到 <DSH_HOME>/tts/inject.log,超过 200 KB 会清空重写。

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 65ca82f53f92

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout