dsh-vox-input
其他 活跃维护

dsh-vox-input

promisez322-prog/dsh-vox-input

Web Speech API实现,点击麦克风即可语音录入内容,识别结果自动填入DSH网页编辑器对应输入框,全程无需服务器、无需申请API密钥,打开即可直接使用。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
25 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:promisez322-prog/dsh-vox-input
git clone https://github.com/promisez322-prog/dsh-vox-input.git
git clone git@github.com:promisez322-prog/dsh-vox-input.git
README.md main

dsh-vox-input

Voice (speech-to-text) input for the DSH Web composer via the browser Web Speech API
(Chrome/Edge). Tap the mic, speak, and the transcript fills the input box — editable before send.
Zero server, zero API keys, zero model downloads; nothing leaves the machine.

Install

# symlink the package into the web profile (local dev), then add the row:
ln -s <this-dir> "$DSH_HOME/profiles/web/node_modules/dsh-vox-input"
# append to $DSH_HOME/profiles/web/cordis.patch.yml:
#   - insert:
#       - id: dsh-voice-input
#         name: dsh-vox-input
#
# IMPORTANT: the short `id: dsh-voice-input` above is only the host patch-row
# identifier. In client.js, the module registration MUST use the exact package
# name:
#   window.__ModuleLoader__.load({ id: "dsh-vox-input", factory })
# Never replace that client registration with the short row id.
# restart: node <dsh>/lib/bin.js web

Use

A waveform 🎙️ control appears in the composer tool row. Tap to listen (Chinese by default; the
tiny chip cycles zh-CN / en-US / auto). Interim text streams in a live caption above the
composer; final text is appended into the draft sentence by sentence (pause ~1s between
sentences — the session stays open, and auto-ends after ~4s of silence). Non-Chromium
browsers show a muted badge.

Notes

  • Client UI (dual-face) plugin: the host half is an empty shell; all logic lives in
    client.js via window.__ModuleLoader__.load. The registration ID must equal
    package.json.name exactly (dsh-vox-input). See AGENTS.md.
  • MIT licensed. Conventions follow the ecosystem references (dsh-mic-input, dsh-voice-input-web);
    implementation is original.