npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-voice-webspeech

v0.1.1

Published

DSH Web 语音输入插件:默认使用浏览器内置 Web Speech API,也可按需下载本地模型离线识别。

Readme

dsh-voice-webspeech

GitHub DSH License: MIT

DSH Web GUI 的浏览器语音输入插件:默认零服务端、零 API Key、零模型下载、零 Python, 也可在设置中按需下载本地模型用于离线识别。 按住输入框旁的麦克风按钮说话,松手即把语音转成文字——转写完全由浏览器内置语音识别 (Web Speech API)完成:

DSH 输入框中的语音按钮

| 浏览器 | 实际语音服务 | |---|---| | Microsoft Edge | 微软 Azure 语音 | | Google Chrome | Google/Chrome 语音 |

与社区里 dsh-voice-funasr 的差异:后者以本地 FunASR 引擎为主(需安装 Python + 下载 ~520MB 模型),浏览器识别只是回退路径。本插件只做"浏览器内置识别"这一件事, 安装即用,适合不想要本地引擎开销的用户。

特性

  • 按住说话 / 松手转文字:按住麦克风按钮开始聆听,松手停止;期间连续短句自动累积。
  • 实时反馈:聆听时按钮上方悬浮显示"正在聆听… + 实时识别文字"(可关闭)。
  • 两种落字方式(设置里切换):
    • 默认"转进输入框":识别结果写入 composer,可编辑后再发送;支持追加到已有文字。
    • "松手自动发送":识别完成直接发送(免提)。
  • 多语言:中文普通话/粤语/繁体、英/日/韩/法/德/西/俄等(BCP-47)。
  • 隐私:音频直接交给浏览器语音服务,不经过任何 DSH 服务端、不落盘。

兼容性

  • DSH:>=0.1.0-rc.3 <0.2.0(Profile Bundle + 嵌套 dsh.client 契约)
  • Node.js:^22.19.0 || >=24.0.0
  • 浏览器:需 Edge 或 Chrome(Web Speech API);Firefox/Safari 不支持
  • 麦克风:浏览器需获得麦克风权限(首次使用会在地址栏请求授权)

安装

插件为 out-of-tree client bundle(dsh.client + dsh.bundle.patch)。 仓库已提交构建产物 lib/,git 安装无需再 build。

方式 A:从 GitHub 安装(推荐)

pnpm dsh plugin --profile web add github:anweat/dsh-voice-webspeech

若 pnpm ≥10 提示需要 allowBuilds(因 prepare),把打印的包键写进 profile 的 pnpm-workspace.yaml 后重跑;本仓库已提交 lib/,通常不会触发。建议固定到提交: github:anweat/dsh-voice-webspeech#<sha>

方式 B:本地 checkout 开发链接

cd D:/codeproject/dsh-voice-webspeech
pnpm dsh plugin --profile web add .

方式 C:打包 tgz 安装

cd D:/codeproject/dsh-voice-webspeech
pnpm run build
pnpm pack    # 产出 dsh-voice-webspeech-0.1.0.tgz
pnpm dsh plugin --profile web add ./dsh-voice-webspeech-0.1.0.tgz

激活:重启 dsh webpnpm dsh web)。插件的 dsh.bundle.patch 会把它自动挂进 插件树,客户端 bundle 由 dsh.client 声明 + exports["./client"] 自动加载。 不要手工把本插件插进 profile 的 cordis.patch.yml,否则同一 loader id 会重复。

使用

  • 输入框工具行左侧出现麦克风按钮按住说话,松手转文字
  • 默认把文字写进输入框(追加到已有文字后);可在 设置 → 语音输入(Web Speech) 改为 "松手自动发送"。
  • 聆听时按钮变红并脉动;识别中的文字实时显示在按钮上方。

设置(设置 → 语音输入(Web Speech))

语音输入插件设置

设置页以独立的“语音输入”标签挂载,不依赖 host settings namespace;偏好保存在浏览器本地。

| 项 | 默认 | 说明 | |---|---|---| | 识别语言 | zh-CN | 普通话/粤语/繁体/英/日/韩/法/德/西/俄 | | 松手自动发送 | 关 | 开启后按住说话、松手直接发送 | | 追加到已有文字 | 开 | 关闭则每次识别替换输入框内容 | | 显示实时识别 | 开 | 聆听时实时显示识别中的文字 |

隐私与卸载

  • 音频只交给浏览器语音服务(Edge=Azure、Chrome=Google),不经过 DSH 服务端、不落盘、无遥测。
  • 卸载:pnpm dsh plugin --profile web remove dsh-voice-webspeech(或从 profile 依赖里删掉再 pnpm install)。

开发

pnpm install
pnpm run dev:link-dsh -- --source D:/codeproject/deepseek-harness   # 可选:从源码链接 @deepseek-ai 类型
pnpm run build
pnpm run typecheck
  • host 半:src/index.ts(空 apply,仅让插件出现在宿主插件树)
  • 客户端:src/client/(tsdown → lib/client.js__ModuleLoader__ 注册)
  • 识别:src/client/webspeech.ts(Web Speech API 封装:continuous + interim + abort)
  • @deepseek-ai/* 是 peer 依赖(optional),构建时外部化,运行时由 DSH 提供。

路线图

  • v0.1:按住说话 + 连续听写 + 追加/自动发送 + 多语言 + 实时反馈 ✅
  • 后续:本地 ASR 可选后端(SenseVoice/Whisper);TTS 语音朗读回复;快捷键按住