Introduction

The pluginization approach of DSH is to split specific capabilities into installable, callable plugins to integrate into agent workflows. Speech input and speech output are a relatively common category of capabilities, but many approaches rely on online speech services, making them inconvenient to use in offline or intranet environments.

dsh-cyberdog-speech-sherpa is a DeepSeek Harness (DSH) local offline speech plugin based on Sherpa-ONNX, providing Chinese STT speech recognition, Chinese TTS speech synthesis, and WebUI “hold to speak”. Below is an introduction to its capabilities, installation methods, tool interfaces, and things to note during use.

What is it

One-sentence positioning: A DSH local offline speech plugin containing STT, TTS, and a WebUI recording button.

The repository path is displayed as:

wuxinzhe/dsh-cyberdog-speech-sherpa

The license is MIT.

It mainly solves three things:

  • Complete Chinese speech recognition locally without depending on online speech interfaces.
  • Complete Chinese speech synthesis locally and output WAV files.
  • Provide “hold to speak” in the WebUI chat input box, automatically transcribing and filling into the input box after recording.

Verified materials indicate that this plugin is fully local and offline, requires no internet connection, has no fees, and runs on CPU.

Core Features

The following introduces them by capability in sections.

Local Offline Operation

Plugin capabilities are focused on local processing and rely on sherpa-onnx-node, with the version precisely locked to:

1.13.4

Verified materials indicate that this plugin can run on CPU and does not depend on online services.

STT Speech Recognition

STT capability is provided via stt_transcribe, using Zipformer Chinese streaming recognition.

Input can be a WAV file path or a data URL. The output is the recognized text.

TTS Speech Synthesis

TTS capability is provided via tts_speak, using VITS Chinese multi-voice.

Input is text, with optional parameters such as speed and voice. Output includes the audio file path, text, and an optional data URL.

WebUI Hold to Speak

The WebUI provides a recording button in the toolbar of the chat input box:

  1. Press and hold to start recording.
  2. Release to automatically stop.
  3. Encode WAV on the browser side.
  4. Call the host interface:
/speech-api/sttTranscribe
  1. The transcribed text is automatically filled into the input box and sent.

Recording is limited to 120 seconds; it will automatically stop sending if exceeded. Moving the mouse out of the button while holding also counts as releasing.

Model Management

The plugin provides model management capabilities, including:

  • Model status query.
  • Model download.
  • Resume download.
  • Mirror fallback.

When a model is missing, stt_transcribe or tts_speak will throw an error and prompt to call sherpa_models_download.

WAV Encoding/Decoding and Resampling

The plugin includes WAV encoding/decoding capabilities and supports 8kHz → 16kHz resampling.

Audio specifications are as follows:

  • STT input WAV supports 16kHz / 8kHz.
  • 8kHz input will be automatically upsampled to 16kHz.
  • TTS output WAV is 8kHz 16bit PCM mono.

Model Download Tool

The plugin provides the sherpa_models_download tool for downloading models.

The input parameter is kinds?, which can take:

["stt", "tts"]

Output includes the download result and the model directory:

{ "results": "...", "modelDir": "..." }

Downloads go through a domestic mirror:

ghfast.top → gh-proxy → GitHub

and support resume download.

Installation and Enablement

First prepare the plugin source code directory, then install using the local path. The installation command is:

dsh plugin --profile <name> add /path/to/dsh-speech-sherpa

Where <name> needs to be replaced with the actual DSH profile name used.

It is recommended to check the source code, dependencies, and license before installation. This plugin runs with the permissions of the current DSH process; the installer should confirm that they trust the code behavior and dependency scope.

If the browser-side source code is modified, the client bundle can be rebuilt:

node scripts/build-client.mjs

If plugin contract verification is needed, you can run:

node scripts/verify-dsh.mjs

Typical Usage

The following introduces the input and output of three tool interfaces.

stt_transcribe

Used for speech recognition.

Input:

  • audioPath: WAV file path.
  • audioBase64: data URL.

Output:

{ "text": "识别出的文本" }

tts_speak

Used for speech synthesis.

Input:

  • text: Text to be synthesized.
  • speed?: Speaking speed, optional.
  • sid?: Voice, optional.
  • inline?: Optional.

Output:

{ "audioPath": "...", "text": "...", "dataUrl": "..." }

sherpa_models_download

Used for downloading models.

Input:

  • kinds?: Optional, value can be ["stt", "tts"] or a subset thereof.

Output:

{ "results": "...", "modelDir": "..." }

If a model is missing, stt_transcribe and tts_speak will throw an error and prompt to call sherpa_models_download.

Applicable Scenarios and Notes

Suitable for these scenarios:

  • Need to integrate local Chinese speech recognition into DSH.
  • Need to integrate local Chinese speech synthesis into DSH.
  • Need to quickly “hold to speak” in WebUI and send the transcribed text to the chat input box.
  • Want to run on CPU and reduce dependency on external speech services.

Things to note:

  • The plugin runs with the permissions of the current DSH process; check the source code, dependencies, and license before installation.
  • The license is MIT.
  • Models may need to be downloaded the first time they are used.
  • stt_transcribe and tts_speak will throw an error when a model is missing and prompt to call sherpa_models_download.
  • WebUI recording is limited to 120 seconds and will automatically stop sending after that.
  • TTS output WAV is 8kHz 16bit PCM mono; STT input WAV supports 16kHz / 8kHz, and 8kHz will be automatically upsampled to 16kHz.
  • The community directory page is an independent site and should not be understood as the DeepSeek or Hugging Face official app store.

Conclusion

The value of dsh-cyberdog-speech-sherpa lies in putting Chinese STT, TTS, and WebUI “hold to speak” into the DSH plugin system and running them in a local offline manner. For scenarios that need to add local speech input and output to agent workflows, it can serve as a relatively direct foundational capability plugin.

Directory page:

https://www.skillhub.cn/plugins/wuxinzhe/dsh-cyberdog-speech-sherpa

GitHub repository:

https://github.com/wuxinzhe/dsh-cyberdog-speech-sherpa