Introduction¶
In agent development, converting speech input to text is a common requirement. Cloud-based ASR services require network access, are subject to API key limitations, and raise privacy concerns. Local inference can avoid these constraints, but the configuration and usage barriers are relatively high. The goal of the DSH plugin ecosystem is to encapsulate such capabilities into plug-and-play components that developers can invoke directly within the DSH workflow.
dsh-asr-local is a DeepWhale DSH plugin that is built on whisper.cpp. It turns local speech transcription into a command-line tool, supporting single-file transcription, batch transcription, and JSON output — all with zero network requests, keeping audio entirely on the local machine.
What It Is¶
dsh-asr-local is a DSH plugin that provides whisper.cpp local inference capabilities. It is maintained by feely0208 and categorized under “Model Inference.” The plugin transcribes audio files into plain text, or generates JSON with segment-level timestamps for downstream processing.
Core Features¶
- Automatic model discovery: Searches for available models in the
~/.whisper,~/opt,~/Library/Caches/whisper.cpp, and/opt/homebrew/share/whisperdirectories. - Automatic audio format conversion to WAV: Uses
afconverton macOS andffmpegon Linux, supporting formats such as aiff/m4a. - Model selection by keyword: Specify a model name via
--model <keyword>; defaults to the smallest model to prioritize speed. - Output formats: Defaults to plain text
.txt; use--jsonto output segment-level timestamped JSON in the form[{start,end,text}]. - Zero network requests: All inference is performed locally; audio never leaves the machine.
Installation & Activation¶
Install via DSH:
dsh plugin --profile web add @deepwhale-cn/dsh-asr-local
Or install via npm:
npm i @deepwhale-cn/dsh-asr-local
Or install directly from a local repository:
dsh plugin install ./
Typical Usage¶
Transcribe a single file:
dsh-asr-local --file 录音.m4a --model base
Batch transcribe a directory:
dsh-asr-local --dir 会议录音/ --model large
List available models on the local machine:
dsh-asr-local --models
Output JSON with segment-level timestamps:
dsh-asr-local --file a.wav --json
Dependencies & Prerequisites¶
Install whisper.cpp (version ≥ 1.7):
brew install whisper-cpp
Download a model and place it in any of the auto-discovery directories, for example:
~/.whisper/ggml-base-q5_1.bin(57 MB)~/.whisper/ggml-large-v3-turbo-q5_0.bin(547 MB)
Example model source: https://huggingface.co/ggerganov/whisper.cpp
Use Cases & Notes¶
Ideal for developers who need offline speech transcription, operate in privacy-sensitive environments, or work under network restrictions. The plugin runs with the privileges of the current DSH process. It is recommended to review the source code and license (MIT © Wenzhou DeepWhale Intelligent Technology Co., Ltd.) before installation.
Summary¶
dsh-asr-local encapsulates whisper.cpp local inference as a DSH plugin, providing single-file and batch transcription capabilities, automatic format conversion, and JSON output — all with zero network requests. It can be used directly in any scenario that requires offline speech transcription.
- Plugin directory page: https://www.skillhub.cn/plugins/feely0208/dsh-asr-local
- GitHub: https://github.com/feely0208/dsh-asr-local