Preface

When running agents with DSH Web, the output is text by default. To make it speak, a common approach is to implement a TTS layer yourself: applying for an API, setting up a proxy on the Host side, processing the audio stream on the browser side, and cleaning up code blocks and URLs before reading aloud. While none of these steps are complicated, chaining them together takes a considerable amount of time.

dsh-xiaomi-tts turns this chain into a directly installable DSH Web plugin. Once installed, there is an extra “Read Aloud” button next to the chat; clicking it will play the audio.

What is this

dsh-xiaomi-tts is maintained by ppy-web. Its positioning in a single sentence is: adding Xiaomi MiMo TTS voice reading to DSH Web. It utilizes Xiaomi MiMo TTS to convert text into fluent, clear natural speech, and is licensed under MIT.

Core Features

  • One-click Announce: Displays a “Read Aloud” button in the chat action bar, enabled by default.
  • Built-in Voices: Uses mimo-v2.5-tts to output audio, supports PCM streaming playback.
  • Custom Voices: Uses mimo-v2.5-tts-voicedesign to create voices through text description.
  • Browser Native Voices: Uses offline or online voices provided by the browser host as a fallback.
  • Automatic Text Cleaning: Removes URLs, file paths, code blocks, emojis, icons, and control characters before reading aloud.
  • Third-party Plugin Integration: Exposes PCM streaming playback capabilities (play/stop) externally; new playback automatically interrupts current reading.

Installation and Activation

Environment Requirements:

  • @deepseek-ai/dsh 0.1.1-rc.2 or 0.1.2-rc.1
  • Node.js 22+
  • Xiaomi MiMo API Key

Install from npm (Recommended):

dsh plugin --profile web add dsh-xiaomi-tts

Install from GitHub:

dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts

Alternatively, open Settings → Plugin Market in DSH Web, search for xiaomi-mimo-tts, and click Install.

Enable after installation:

  1. Restart dsh web.
  2. Open Settings → Plugins → Plugin Configuration → Voice Reading (Xiaomi MiMo).
  3. Fill in the Xiaomi MiMo API Key; supports standard API Keys and Token Plan-specific API Keys.
  4. Settings only take effect after clicking Save following any modifications.

Typical Usage

Built-in Voices and Output Format

There are 8 official built-in voices in total:

  • Chinese Female: Bing Tang (Candy), Mo Li (Jasmine)
  • Chinese Male: Su Da (Soda), Bai Hua (Birch)
  • English Female: Mia, Chloe
  • English Male: Milo, Dean

The pre-set model defaults to PCM (Streaming Playback), which starts playing immediately as audio chunks arrive, resulting in shorter wait times. You can also choose MP3 (Full Audio) or WAV (Full Audio). These options wait for the complete file to be generated before playing: MP3 is smaller in size, while WAV preserves lossless audio but is larger in size.

Custom Voices

After switching to mimo-v2.5-tts-voicedesign, you can describe the desired voice using text. The plugin provides common description templates; simply modify and save them:

Young female, clear and bright voice, friendly and natural, articulate, moderate speed, gentle and restrained emotion.

Note: Custom voices currently do not support PCM; this will be adapted once the official feature is released.

Browser Native Fallback

There are three strategies for local fallback voices:

  • MiMo First: Falls back to browser voices if MiMo fails.
  • Local First: Prioritizes using browser voices.
  • Disable Local Voices: Uses only MiMo.

Available voices come from the browser’s Web Speech API; whether they work offline and their actual availability depend on the browser, operating system, and network.

Third-party Plugin Integration

The plugin exposes PCM streaming playback capabilities to other Web plugins. You can write a single line at the position where playback is needed:

ctx.get('xiaomiMimoTts')?.play('Welcome back')

It is recommended to dynamically obtain this capability via ctx.get() rather than declaring it as a required inject service. Calling it safely skips if the plugin is not installed or not ready. play() uses the user’s saved MiMo settings to play PCM streams, and stop() can actively stop playback; new playback automatically interrupts the current reading.

For TypeScript type hints, you can import the types only:

import type { XiaomiMimoTtsService } from 'dsh-xiaomi-tts/client-api'

const tts = ctx.get('xiaomiMimoTts') as XiaomiMimoTtsService | undefined
tts?.play('Welcome back')

Privacy

  • API Keys are stored in the DSH Host and are not sent to the browser.
  • When generating speech, the body text is sent to the Xiaomi MiMo service.
  • Audio is played via Web Audio or temporary Blob URLs in the browser memory; it is not persisted to disk.

Suitable Scenarios and Notes

It is suitable for two types of people: first, end users who use DSH Web daily and want their conversations to be read aloud; second, developers building DSH Web plugins who need ready-made voice broadcasting capabilities and can directly reuse its play/stop services instead of implementing TTS again.

Notes before use:

  • MiMo TTS is currently a time-limited free service; please refer to the official platform for specific policies.
  • The plugin runs with the permissions of the current dsh process. It is recommended to check the source code and license before installing.
  • Windows users switching from the local development version to the npm version must first stop DSH Web to avoid Windows Junctions being occupied by running Node processes:
.\start\dsh-plugin-reinstall.bat 3.0.1

Conclusion

dsh-xiaomi-tts encapsulates the most tedious parts of TTS integration—API proxying, streaming playback, text cleaning, and fallback strategies—into a single plugin that is ready to use. If you want to add voice reading to DSH Web, or if you want to reuse broadcasting capabilities in your own plugins, you can start here.

  • Community Plugin Directory: https://www.skillhub.cn/plugins/ppy-web/dsh-plugin-xiaomi-mimo-tts
  • GitHub Repository: https://github.com/ppy-web/dsh-plugin-xiaomi-mimo-tts