Transcribes a local video or audio file into a plain-text script and an SRT subtitle file using a local sherpa-onnx engine, chunking long files and keeping the timeline aligned.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:F-Sheng/dsh-asr
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Local, offline speech-to-text for DeepSeek Harness. Turn a video or audio file into a plain-text script and an SRT subtitle file with a local sherpa-onnx engine. No API key, no per-minute cost, nothing uploaded.
What it gives you
Two tools, available to the agent as soon as the plugin is enabled:
| Tool | What it does |
|---|---|
asr_transcribe |
Video/audio file → .txt transcript + .srt subtitles |
asr_status |
Reports whether the engine, Python, ffmpeg and model files are ready |
Output files land next to the source by default. Long files are chunked at 40 s and the timeline is reassembled client-side, so timestamps do not drift.
Install
1. Add the plugin
npx dsh plugins add dsh-asr # if published to npm
# or point Plugins > Add plugin at a local checkout
2. Install the engine once (about 1 GB, one time)
node node_modules/dsh-asr/bin/setup.mjs
It installs sherpa-onnx + flask into Python and downloads the Chinese paraformer model
plus the silero VAD model into ~/.dsh/asr-models/. Re-runs are incremental.
ffmpeg must be on PATH (or set ffmpegPath in the plugin config). Windows:
winget install ffmpeg.
3. Use it
asr_transcribe({ input: "D:\\video\\ep01.mp4" })
Configuration
Every field is optional; defaults are discovered automatically.
- insert:
- id: dsh-asr
name: dsh-asr
config:
port: 8765
pythonPath: 'C:\Python312\python.exe'
ffmpegPath: 'C:\ffmpeg\bin\ffmpeg.exe'
modelDir: 'E:\models\sherpa-onnx-paraformer-zh-2024-03-09'
vadModel: 'E:\models\silero_vad.onnx'
dataDir: 'C:\Users\me\.dsh\asr'
How it works
video/audio ──ffmpeg──▶ 16 kHz mono WAV (40 s chunks)
│
▼
sherpa-onnx + paraformer (standalone Python process)
│
VAD → sentence segments
│
▼
timestamped segments ──┬── .txt
└── .srt
The recogniser listens on 127.0.0.1 only. The plugin spawns it detached on first use and
reuses the same process afterwards, so DSH restarts do not pay the cold-start cost again.
Limitations
- Chinese model only. Point
modelDirat another paraformer language build to switch. - Proper nouns get misheard. A 217 MB quantised model is unstable on homophones, names and jargon. Cross-check numbers and names against the source before quoting them.
- No speaker diarisation. Multi-speaker audio comes back as one continuous string.
- Music can hallucinate a line. VAD reduces it a lot, but review music-heavy sections.
- Windows is the tested path. On Linux/macOS set
pythonPath/ffmpegPathexplicitly.
License
MIT
Links
More in this category
Yuuyuko-uu/dsh-tts-bridge★ 271
Reads DSH conversations aloud using the DeepSeek web page's built-in read-aloud, driven by a small browser extension.
Fishsb/dsh-voice-prompt-enhancer★ 137
Rewrites a composer draft into a clearer, structured prompt (5 modes, model fallback chain, optional multi-round memory) and adds stop-on-silence, hotkey and filler-word cleanup to DSH voice input; transcription stays with the official speechToText, the plugin ships no engine.
cloudoyx/any-audio★ 77
DSH has its own audio workstation too: real recordings, multiple TTS engines, genuine sound effects and local singing synthesis, with every generated sound landing as its own clip on one visible timeline that you can audition, balance and fine-tune track by track. Use it for scoring animation, producing audiobooks and radio drama, composing and mixing on your own, making ASMR, and whatever else you come up with.
PolinniZhong/dsh-omi-voice★ 75
In-chat read-aloud for DeepSeek Harness: tap to read, pause and resume AI replies with natural Doubao TTS voices (BYOK), reading only the final answer with code, tables and diagrams filtered; local engine, plugin keeps no API key.
ppy-web/dsh-plugin-xiaomi-mimo-tts★ 75
Voice Studio for DSH with 10+ cloud and local speech engines (Xiaomi MiMo, Doubao, Breeze, DeepSeek, local MOSS-Nano, browser speech, external adapters) plus cloud ASR, smart text filtering, live subtitles and voice orbs, /director multi-role WAV drama studio, and desktop pet, novel, QQ Bot, dsh-Go, and AI Passport integrations. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
1624318455/dsh-plugin-tts★ 66
Reads assistant replies aloud via free Edge TTS or your own RVC voice models: read-aloud buttons + auto-read, adaptive chunked progressive playback (gapless long reads), one-click voice-pack installs from a registry, and a portable RVC runtime.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.