Preface¶
DeepSeek Harness (DSH) adopts a plugin-based architecture that allows developers to extend its functionality. In the Web GUI environment, users often need a more natural interaction mode instead of relying on typing on the keyboard. The dsh-voice-chat plugin addresses this issue by allowing users to control the system with voice input and directly hear the AI’s responses in audio.
Plugin Overview¶
This is a Doubao-style voice chat plugin maintained by maoyuching. It integrates speech recognition (ASR) and text-to-speech (TTS) into the DSH Web GUI, creating a closed-loop experience where users can “speak with a tap and receive an AI audio response.”
Core Features¶
-
Voice Input
Click the microphone button (🎤) to start recording. After hearing the “ding” notification sound, begin speaking. After finishing, pause for 2.5 seconds. The system will play a “dong” notification sound, automatically stop recording, and then send the transcribed text to the AI. -
Voice Output
After the AI responds, the system automatically invokes the TTS engine to synthesize and read the response. The speaking speed is increased by 10% by default. -
Engine Support
- ASR Engines: Supports SiliconFlow (SenseVoice, free in mainland China), Groq (Whisper), Xiaomi MiMo (chat/completions protocol), and custom OpenAI-compatible endpoints.
- TTS Engines: Supports Edge TTS (free from Microsoft, no extra runtime required), Xiaomi MiMo TTS, and custom TTS.
-
Configuration Isolation
ASR and TTS configurations do not interfere with each other. Each engine saves its own Base URL, model, API Key, and voice. Switching engines does not overwrite their configurations. -
Playback Control
- Single-channel Playback: Only one audio playback is allowed at a time. When a new response is received, it preempts and interrupts the previous playback. It can also be interrupted immediately via a shortcut key or an UI button.
- Replay Prevention: The system records responses that have already been spoken in a session and does not read them again when re-entering the session.
- Mute Switch: Clicking the mute button during playback mutes the audio immediately. Clicking it again restores automatic reading.
Installation and Enablement¶
Installing this plugin requires that the DeepSeek Harness (dsh) Web GUI is already installed and running.
- Run the following command to install the plugin:
dsh plugin --profile web add dsh-voice-chat
- After installation is complete, restart
dsh webfor the configuration to take effect.
Usage and Configuration¶
Shortcuts and Entry Point¶
- Toggle Microphone: Use the
Ctrl+Shift+Spaceshortcut key (fallback:Ctrl+M/Ctrl+Shift+M). - Settings Entry: In the DSH settings dialog (gear icon in the bottom-left corner), click the “voice chat” category on the left to configure it.
Configuration File¶
In addition to changing settings in the settings panel, you can override settings in the profile configuration file. The file path is usually ~/.dsh/profiles/web/cordis.patch.yml. After modifying the file, restart dsh web to apply the changes.
Configuration priority: settings panel > cordis.patch.yml (per-engine > legacy flat keys) > environment variables > default values.
- id: dsh-voice-chat
name: 'dsh-voice-chat'
config:
asrEngine: siliconflow # Select ASR engine
asrApiKey: sk-xxxx # ASR key
asrBaseUrl: https://api.siliconflow.cn/v1
asrModel: FunAudioLLM/SenseVoiceSmall
silenceMs: 2500
ttsEngine: edge # Select TTS engine
voice: zh-CN-XiaoxiaoNeural # Voice
rate: '+10%' # Speaking speed adjustment
Environment Requirements¶
- Host Environment: Node.js ≥ 22 is required (on both the host and the browser side).
- Runtime Environment:
dsh webmust be installed and running. - Browser: Chrome or Edge is recommended (
MediaRecorderrecording API support is required). - API Keys: SiliconFlow provides a free quota upon registration; Xiaomi MiMo is billed according to usage.
Conclusion¶
By integrating ASR and TTS capabilities, dsh-voice-chat simplifies the interaction flow in the DSH Web environment. Its configuration isolation mechanism ensures flexibility when switching between multiple engines, making it suitable for developers who want to run the system locally and value a voice interaction experience.
- GitHub: https://github.com/maoyuching/dsh-voice-chat