
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-funasr-voice
Advanced tools
DSH Web 本地离线语音输入插件:浏览器采集麦克风 → host 拉起本地 FunASR (SenseVoiceSmall) 识别 → 文字填入输入框。
DeepSeek Harness (DSH) Web GUI 的本地离线语音输入插件。浏览器采集麦克风 → host 半自动拉起本地 FunASR + SenseVoiceSmall 识别 → 文字实时填入输入框。全程离线、不联网、不上传。
0:05)。语音输入(点话筒 → 说话 → 文字进输入框,按钮旁带计时):

配置(设置 → 通用 → 语音输入,支持自动检测 / 手动填路径):

浏览器麦克风 ──AudioWorklet 采集──▶ VAD 断句 ──POST /funasr-voice/asr(原始 f32 PCM @16kHz)
│ host 半代理
▼
本地 FunASR Python 服务(SenseVoiceSmall)
│
输入框 ◀── 识别文字 ──────────┘
| 依赖 | 说明 |
|---|---|
| DeepSeek Harness Desktop | 2.0.2(本插件的开发/测试版本) |
| Python venv + FunASR 1.4.x + torch | 本地 ASR 引擎 |
| SenseVoiceSmall 模型 | 本地离线加载 |
| Node ≥ 20 | 插件 host 半 |
⚠️ DSH Desktop 2.0.2 存在麦克风权限 Bug,直接使用会拿到静音流、无法识别。 详见下方「已知 Bug 与修复」,需要先给 DSH Desktop 打一个补丁。
插件需要一个装好 FunASR 的 Python 环境 + SenseVoiceSmall 模型。以 macOS 为例:
# 1. 创建独立 venv
python3 -m venv ~/Documents/ASR/funasr/.venv
source ~/Documents/ASR/funasr/.venv/bin/activate
# 2. 安装 FunASR(会自动带上 torch、modelscope 等依赖,约数 GB 磁盘空间)
pip install --upgrade pip
pip install funasr
# 3. 下载 SenseVoiceSmall 模型(约 1 GB,二选一)
mkdir -p ~/Documents/ASR/funasr/models
cd ~/Documents/ASR/funasr/models
# 方式 A:ModelScope(国内更快)
python -c "from modelscope import snapshot_download; snapshot_download('iic/SenseVoiceSmall', local_dir='SenseVoiceSmall')"
# 方式 B:HuggingFace
pip install huggingface_hub
python -c "from huggingface_hub import snapshot_download; snapshot_download('FunAudioLLM/SenseVoiceSmall', local_dir='SenseVoiceSmall')"
装完后:
python 路径:~/Documents/ASR/funasr/.venv/bin/python~/Documents/ASR/funasr/models/SenseVoiceSmall(需包含 model.pt 和 config.yaml)把这两个填进插件的 python / model 配置(见下方「配置」)即可,也可以用插件设置里的
「自动检测 Python 与模型」自动识别。
准备好 FunASR 环境(venv + SenseVoiceSmall 模型目录)。
在你 profile 的 cordis.patch.yml(如 ~/.dsh/profiles/<profile>/cordis.patch.yml)里配置 python / model(见下方「配置」)。
安装插件:
dsh plugin --profile <你的profile> add <本插件目录或仓库地址>
重启 DSH,点输入框右侧的话筒图标即可。首次会请求麦克风权限,允许即可。
有两种方式配置 python / model:
① GUI(推荐):DSH 设置 → 通用 → 语音输入,点「自动检测 Python 与模型」会自动
识别本机 FunASR venv 和 SenseVoiceSmall 目录;也可手动填写。持久化到
~/.dsh/dsh-funasr-voice.json,优先级高于 YAML 配置。
② YAML:插件源码不带个人路径(默认 python: python3、model 为空)。在你自己
profile 的 cordis.patch.yml 里覆盖:
# ~/.dsh/profiles/<你的profile>/cordis.patch.yml
- id: dsh-funasr-voice
config:
python: /你的/FunASR/.venv/bin/python
model: /你的/SenseVoiceSmall/模型目录
可配置字段:
| 字段 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
basePath | /funasr-voice | HTTP 路由前缀(一般别改) |
python | python3 | FunASR venv 的 python 解释器(必配) |
model | (空) | SenseVoiceSmall 模型目录(必配) |
port | 18765 | 本地 ASR 服务端口 |
language | auto | auto | zh | en | ja | ko | yue |
useItn | true | 逆文本正则化 |
autoSend | false | 识别后自动发送 |
Bug 现象:DSH Desktop 2.0.2 的 Electron 主进程没有处理 getUserMedia 的
media 权限。结果是浏览器拿到一条静音流,且 macOS 从不弹「想要访问麦克风」
授权框——语音插件表现为「录音了但识别不出、输入框没反应、没有文字」。
根本原因:dsh-plugin-desktop/src/main.ts 缺少
session.setPermissionRequestHandler,也从不调用
systemPreferences.askForMediaAccess('microphone') 去触发 macOS 的系统授权弹窗。
修复方式:给 DSH Desktop 源码打补丁(dsh-plugin-desktop/src/main.ts,在
app.whenReady() 之后):
import { session, systemPreferences } from 'electron'
session.defaultSession.setPermissionRequestHandler((_wc, permission, callback, details) => {
if (permission !== 'media') {
callback(true)
return
}
const mediaTypes = 'mediaTypes' in details ? details.mediaTypes : undefined
const checks: Promise<boolean>[] = []
if (!mediaTypes || mediaTypes.includes('audio')) checks.push(systemPreferences.askForMediaAccess('microphone'))
if (!mediaTypes || mediaTypes.includes('video')) checks.push(systemPreferences.askForMediaAccess('camera'))
void Promise.all(checks).then(results => callback(results.every(Boolean)))
})
重新构建并启动后,点麦克风会弹出系统授权框,允许后即可正常识别。若不想改源码,也可 等官方修复该 Bug 后升级 DSH Desktop。
.
├── lib/index.js # host 半:拉起/代理 FunASR + HTTP 路由
├── lib/client.js # client 半:话筒按钮 + VAD + 计时
├── asr_server.py # FunASR(SenseVoice) HTTP 服务,host 半自动拉起
├── cordis.patch.yml # 插件树插入补丁(配置)
└── package.json
python / model 路径不对,看 DSH 日志里的 stderr。FAQs
DSH Web 本地离线语音输入插件:浏览器采集麦克风 → host 拉起本地 FunASR (SenseVoiceSmall) 识别 → 文字填入输入框。
The npm package dsh-funasr-voice receives a total of 0 weekly downloads. As such, dsh-funasr-voice popularity was classified as not popular.
We found that dsh-funasr-voice demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.