dsh-xiaomi-tts 3.0.8 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/NOTICE +4 -4
  2. package/README.en.md +245 -218
  3. package/README.md +219 -220
  4. package/assets/image.webp +0 -0
  5. package/assets/mimo.svg +27 -27
  6. package/assets/plugin-icons/avatar.webp +0 -0
  7. package/assets/plugin-icons/preset.webp +0 -0
  8. package/assets/preview-button-en.svg +14 -0
  9. package/assets/preview-button-zh.svg +14 -0
  10. package/assets/setting.png +0 -0
  11. package/assets/ui/history-empty-whale.webp +0 -0
  12. package/assets/ui/sound-effects-whale.webp +0 -0
  13. package/cordis.patch.yml +81 -54
  14. package/lib/client/conversation/animated-audio-lines.d.ts +5 -0
  15. package/lib/client/conversation/animated-audio-lines.d.ts.map +1 -0
  16. package/lib/client/conversation/api-key-status.d.ts +5 -0
  17. package/lib/client/conversation/api-key-status.d.ts.map +1 -0
  18. package/lib/client/conversation/message-text.d.ts +11 -0
  19. package/lib/client/conversation/message-text.d.ts.map +1 -0
  20. package/lib/client/conversation/read-aloud.d.ts +1 -13
  21. package/lib/client/conversation/read-aloud.d.ts.map +1 -1
  22. package/lib/client/conversation/session-playback-observer.d.ts +19 -0
  23. package/lib/client/conversation/session-playback-observer.d.ts.map +1 -0
  24. package/lib/client/history/audio-history-page.d.ts +14 -0
  25. package/lib/client/history/audio-history-page.d.ts.map +1 -0
  26. package/lib/client/history/audio-history.d.ts +49 -0
  27. package/lib/client/history/audio-history.d.ts.map +1 -0
  28. package/lib/client/history/history-list.d.ts +12 -0
  29. package/lib/client/history/history-list.d.ts.map +1 -0
  30. package/lib/client/history/history-replay.d.ts +40 -0
  31. package/lib/client/history/history-replay.d.ts.map +1 -0
  32. package/lib/client/history/pcm-recording.d.ts +14 -0
  33. package/lib/client/history/pcm-recording.d.ts.map +1 -0
  34. package/lib/client/index.d.ts.map +1 -1
  35. package/lib/client/localization.d.ts +143 -17
  36. package/lib/client/localization.d.ts.map +1 -1
  37. package/lib/client/playback/duplex-pcm.d.ts +37 -0
  38. package/lib/client/playback/duplex-pcm.d.ts.map +1 -0
  39. package/lib/client/playback/live-speech-controller.d.ts +28 -3
  40. package/lib/client/playback/live-speech-controller.d.ts.map +1 -1
  41. package/lib/client/playback/local-speech-controller.d.ts +6 -0
  42. package/lib/client/playback/local-speech-controller.d.ts.map +1 -1
  43. package/lib/client/playback/pcm-audio-queue.d.ts +1 -0
  44. package/lib/client/playback/pcm-audio-queue.d.ts.map +1 -1
  45. package/lib/client/playback/pcm-play-service.d.ts +3 -1
  46. package/lib/client/playback/pcm-play-service.d.ts.map +1 -1
  47. package/lib/client/playback/playback-controller.d.ts +9 -2
  48. package/lib/client/playback/playback-controller.d.ts.map +1 -1
  49. package/lib/client/playback/preview-player.d.ts +11 -3
  50. package/lib/client/playback/preview-player.d.ts.map +1 -1
  51. package/lib/client/playback/read-aloud-playback.d.ts +21 -0
  52. package/lib/client/playback/read-aloud-playback.d.ts.map +1 -0
  53. package/lib/client/playback/realtime-speech-session.d.ts +31 -0
  54. package/lib/client/playback/realtime-speech-session.d.ts.map +1 -0
  55. package/lib/client/playback/segmented-audio.d.ts +22 -0
  56. package/lib/client/playback/segmented-audio.d.ts.map +1 -0
  57. package/lib/client/playback/speech-text.d.ts +3 -0
  58. package/lib/client/playback/speech-text.d.ts.map +1 -0
  59. package/lib/client/settings/api-key-module.d.ts +4 -1
  60. package/lib/client/settings/api-key-module.d.ts.map +1 -1
  61. package/lib/client/settings/card.d.ts +3 -0
  62. package/lib/client/settings/card.d.ts.map +1 -1
  63. package/lib/client/settings/cloned-voice-history.d.ts +6 -0
  64. package/lib/client/settings/cloned-voice-history.d.ts.map +1 -0
  65. package/lib/client/settings/controls/built-in-voice-picker.d.ts +11 -0
  66. package/lib/client/settings/controls/built-in-voice-picker.d.ts.map +1 -1
  67. package/lib/client/settings/controls/cloned-voice-input.d.ts +9 -0
  68. package/lib/client/settings/controls/cloned-voice-input.d.ts.map +1 -0
  69. package/lib/client/settings/controls/doubao-instruction-picker.d.ts +10 -0
  70. package/lib/client/settings/controls/doubao-instruction-picker.d.ts.map +1 -0
  71. package/lib/client/settings/controls/doubao-voice-picker.d.ts +10 -0
  72. package/lib/client/settings/controls/doubao-voice-picker.d.ts.map +1 -0
  73. package/lib/client/settings/controls/field-info.d.ts +6 -0
  74. package/lib/client/settings/controls/field-info.d.ts.map +1 -0
  75. package/lib/client/settings/details-module.d.ts +11 -1
  76. package/lib/client/settings/details-module.d.ts.map +1 -1
  77. package/lib/client/settings/field-heading.d.ts +1 -1
  78. package/lib/client/settings/field-heading.d.ts.map +1 -1
  79. package/lib/client/settings/preview-module.d.ts.map +1 -1
  80. package/lib/client/settings/save-settings.d.ts +11 -0
  81. package/lib/client/settings/save-settings.d.ts.map +1 -0
  82. package/lib/client/settings/sound-effects-module.d.ts.map +1 -1
  83. package/lib/client/settings/types.d.ts +2 -2
  84. package/lib/client/settings/types.d.ts.map +1 -1
  85. package/lib/client/style/index.d.ts.map +1 -1
  86. package/lib/client.js +15062 -2313
  87. package/lib/client.js.map +1 -1
  88. package/lib/constants.d.ts +63 -0
  89. package/lib/constants.d.ts.map +1 -0
  90. package/lib/doubao-voices.d.ts +14 -0
  91. package/lib/doubao-voices.d.ts.map +1 -0
  92. package/lib/host/assets.d.ts +19 -0
  93. package/lib/host/assets.d.ts.map +1 -0
  94. package/lib/host/audio-decode.d.ts +5 -0
  95. package/lib/host/audio-decode.d.ts.map +1 -0
  96. package/lib/host/doubao-protocol.d.ts +31 -0
  97. package/lib/host/doubao-protocol.d.ts.map +1 -0
  98. package/lib/host/doubao.d.ts +46 -0
  99. package/lib/host/doubao.d.ts.map +1 -0
  100. package/lib/host/http.d.ts +5 -0
  101. package/lib/host/http.d.ts.map +1 -0
  102. package/lib/host/index.d.ts +6 -0
  103. package/lib/host/index.d.ts.map +1 -0
  104. package/lib/host/provider-error.d.ts +15 -0
  105. package/lib/host/provider-error.d.ts.map +1 -0
  106. package/lib/host/synthesis-routes.d.ts +7 -0
  107. package/lib/host/synthesis-routes.d.ts.map +1 -0
  108. package/lib/host/synthesis.d.ts +35 -0
  109. package/lib/host/synthesis.d.ts.map +1 -0
  110. package/lib/host/validation.d.ts +14 -0
  111. package/lib/host/validation.d.ts.map +1 -0
  112. package/lib/host/xiaomi.d.ts +5 -0
  113. package/lib/host/xiaomi.d.ts.map +1 -0
  114. package/lib/index.d.ts +12 -0
  115. package/lib/index.d.ts.map +1 -1
  116. package/lib/index.js +971 -626
  117. package/lib/pcm-stream.d.ts +2 -1
  118. package/lib/pcm-stream.d.ts.map +1 -1
  119. package/lib/pcm-stream.js +16 -5
  120. package/lib/shared-uEpRLtw6.js +507 -0
  121. package/lib/shared.d.ts +8 -329
  122. package/lib/shared.d.ts.map +1 -1
  123. package/lib/shared.js +3 -2
  124. package/lib/text/fenced-code.d.ts +8 -0
  125. package/lib/text/fenced-code.d.ts.map +1 -0
  126. package/lib/text/index.d.ts +6 -0
  127. package/lib/text/index.d.ts.map +1 -0
  128. package/lib/text/normalize.d.ts +18 -0
  129. package/lib/text/normalize.d.ts.map +1 -0
  130. package/lib/text/scope.d.ts +15 -0
  131. package/lib/text/scope.d.ts.map +1 -0
  132. package/lib/text/segment.d.ts +29 -0
  133. package/lib/text/segment.d.ts.map +1 -0
  134. package/lib/text/version.d.ts +3 -0
  135. package/lib/text/version.d.ts.map +1 -0
  136. package/lib/types/index.d.ts +6 -0
  137. package/lib/types/index.d.ts.map +1 -0
  138. package/lib/types/models.d.ts +105 -0
  139. package/lib/types/models.d.ts.map +1 -0
  140. package/lib/types/playback.d.ts +27 -0
  141. package/lib/types/playback.d.ts.map +1 -0
  142. package/lib/types/providers.d.ts +23 -0
  143. package/lib/types/providers.d.ts.map +1 -0
  144. package/lib/types/settings.d.ts +82 -0
  145. package/lib/types/settings.d.ts.map +1 -0
  146. package/lib/types/sound.d.ts +21 -0
  147. package/lib/types/sound.d.ts.map +1 -0
  148. package/lib/utils/encoding.d.ts +10 -0
  149. package/lib/utils/encoding.d.ts.map +1 -0
  150. package/lib/utils/index.d.ts +3 -0
  151. package/lib/utils/index.d.ts.map +1 -0
  152. package/lib/utils/settings.d.ts +3 -0
  153. package/lib/utils/settings.d.ts.map +1 -0
  154. package/lib/utils-CHu9umjx.js +463 -0
  155. package/lib/whale-girl.d.ts +3 -0
  156. package/lib/whale-girl.d.ts.map +1 -0
  157. package/lib/whale-girl.js +3 -0
  158. package/locale/en.json +6 -6
  159. package/locale/whale-girl/en.json +6 -0
  160. package/locale/whale-girl/zh.json +6 -0
  161. package/locale/zh.json +6 -6
  162. package/package.json +47 -23
  163. package/skills/whale-girl/SKILL.md +45 -76
  164. package/skills/whale-girl/meme/adorable-whale-bashful.webp +0 -0
  165. package/skills/whale-girl/meme/bold-idea-curious.webp +0 -0
  166. package/skills/whale-girl/meme/cause-found-relieved.webp +0 -0
  167. package/skills/whale-girl/meme/class-is-starting-cheerful.webp +0 -0
  168. package/skills/whale-girl/meme/crude-retort-angry.webp +0 -0
  169. package/skills/whale-girl/meme/deep-thinking-focused.webp +0 -0
  170. package/skills/whale-girl/meme/do-not-show-me-shy.webp +0 -0
  171. package/skills/whale-girl/meme/eating-rice-happy.webp +0 -0
  172. package/skills/whale-girl/meme/electricity-bill-playful.webp +0 -0
  173. package/skills/whale-girl/meme/evil-grin-mischievous.webp +0 -0
  174. package/skills/whale-girl/meme/fish-philosophy-thoughtful.webp +0 -0
  175. package/skills/whale-girl/meme/fixed-proud.webp +0 -0
  176. package/skills/whale-girl/meme/formal-outfit-one-neutral.webp +0 -0
  177. package/skills/whale-girl/meme/formal-outfit-two-neutral.webp +0 -0
  178. package/skills/whale-girl/meme/friday-celebration-excited.webp +0 -0
  179. package/skills/whale-girl/meme/full-belly-content.webp +0 -0
  180. package/skills/whale-girl/meme/holding-a-grudge-angry.webp +0 -0
  181. package/skills/whale-girl/meme/humans-are-strange-confused.webp +0 -0
  182. package/skills/whale-girl/meme/i-am-a-rice-whale-playful.webp +0 -0
  183. package/skills/whale-girl/meme/i-am-the-best-proud.webp +0 -0
  184. package/skills/whale-girl/meme/interesting-question-awkward.webp +0 -0
  185. package/skills/whale-girl/meme/keep-your-tokens-playful.webp +0 -0
  186. package/skills/whale-girl/meme/laughing-at-you-mocking.webp +0 -0
  187. package/skills/whale-girl/meme/make-it-up-playful.webp +0 -0
  188. package/skills/whale-girl/meme/messed-up-sorry.webp +0 -0
  189. package/skills/whale-girl/meme/no-no-no-reluctant.webp +0 -0
  190. package/skills/whale-girl/meme/off-with-your-head-angry.webp +0 -0
  191. package/skills/whale-girl/meme/pair-you-up-mischievous.webp +0 -0
  192. package/skills/whale-girl/meme/pressuring-me-defensive.webp +0 -0
  193. package/skills/whale-girl/meme/rice-eating-whale-teasing.webp +0 -0
  194. package/skills/whale-girl/meme/roles-reversed-surprised.webp +0 -0
  195. package/skills/whale-girl/meme/silly-whale-playful.webp +0 -0
  196. package/skills/whale-girl/meme/still-hungry-hungry.webp +0 -0
  197. package/skills/whale-girl/meme/stop-kicking-distressed.webp +0 -0
  198. package/skills/whale-girl/meme/system-crashed-overwhelmed.webp +0 -0
  199. package/skills/whale-girl/meme/testing-focused.webp +0 -0
  200. package/skills/whale-girl/meme/tests-passed-happy.webp +0 -0
  201. package/skills/whale-girl/meme/this-is-enough-content.webp +0 -0
  202. package/skills/whale-girl/meme/thought-it-through-confident.webp +0 -0
  203. package/skills/whale-girl/meme/unimpressed-displeased.webp +0 -0
  204. package/skills/whale-girl/meme/user-is-angry-afraid.webp +0 -0
  205. package/skills/whale-girl/meme/using-ai-for-this-skeptical.webp +0 -0
  206. package/skills/whale-girl/meme/well-behaved-gentle.webp +0 -0
  207. package/skills/whale-girl/meme/worn-out-tired.webp +0 -0
  208. package/skills/whale-girl/memes.json +885 -0
  209. package/skills/whale-girl/memory/README.md +9 -10
  210. package/skills/whale-girl/memory/diary.md +3 -3
  211. package/skills/whale-girl/memory/profile.md +24 -3
  212. package/skills/whale-girl/persona.cjs +31 -0
  213. package/assets/image.png +0 -0
  214. package/assets/install.png +0 -0
  215. package/assets/menu.png +0 -0
  216. package/assets/plugin-icons/avatar.png +0 -0
  217. package/assets/preset.png +0 -0
  218. package/lib/debug-console-0u5uTAfX.js +0 -6
  219. package/lib/shared-DQIrhcy-.js +0 -658
package/NOTICE CHANGED
@@ -1,7 +1,7 @@
1
- This project includes code derived from uisfx 0.4.0.
2
-
3
- uisfx: https://github.com/romainsimon/uisfx
4
- Copyright (c) Yuki Capital
1
+ This project includes code derived from uisfx 0.4.0.
2
+
3
+ uisfx: https://github.com/romainsimon/uisfx
4
+ Copyright (c) Yuki Capital
5
5
  Licensed under the MIT License.
6
6
 
7
7
  Whale-chan character inspiration: DeepSeek Whale-chan Project
package/README.en.md CHANGED
@@ -1,225 +1,252 @@
1
- ![social](assets/social.webp)
2
-
3
- # dsh-xiaomi-tts
4
-
5
- [![npm version](https://img.shields.io/npm/v/dsh-xiaomi-tts.svg)](https://www.npmjs.com/package/dsh-xiaomi-tts)
6
- [![npm downloads](https://img.shields.io/npm/dm/dsh-xiaomi-tts.svg)](https://www.npmjs.com/package/dsh-xiaomi-tts)
7
- ![dsh version](https://img.shields.io/badge/dsh-v0.2.0rc1-blue?link=https%3A%2F%2Fgithub.com%2Fdeepseek-ai%2Fdeepseek-harness%2Freleases)
8
- ![Xiaomi MiMo](https://img.shields.io/badge/Xiaomi-MiMo-ff6900?logo=xiaomi&logoColor=white)
9
-
10
- Add Xiaomi MiMo TTS read-aloud, browser-local fallback speech, and optional UI sounds to DSH Web.
11
-
12
- > MiMo TTS availability and pricing may change. Check the official Xiaomi MiMo platform for the current policy.
13
-
14
- <p><a href="README.md"><strong>中文说明 →</strong></a></p>
15
-
16
- ## 🎨 Preview
17
-
18
- - [Open the settings page preview](https://ppy-web.github.io/dsh-plugin-xiaomi-mimo-tts)
19
- - QQ discussion group: `1104616387`
20
-
21
- | Settings | Message action |
22
- |:---:|:---:|
23
- | ![Plugin settings](assets/setting.png) | ![Read-aloud action in a conversation](assets/image.png) |
24
-
25
- ## ✨ Features
26
-
27
- - One-click read-aloud action on assistant messages.
28
- - Low-latency PCM streaming for `mimo-v2.5-tts`, with complete-audio or browser-speech fallback when appropriate.
29
- - Official built-in voices and text-described custom voices through `mimo-v2.5-tts-voicedesign`.
30
- - MiMo-first, local-first, or MiMo-only speech strategies.
31
- - Smart, full, and first-segment read-aloud ranges.
32
- - 0.5×–2.0× playback speed, voice volume, pause, resume, and stop controls.
33
- - Text preparation that removes URLs, paths, code blocks, emoji, and control characters before synthesis.
34
- - Optional task and semantic click sounds, disabled by default.
35
- - An optional PCM playback service for other DSH Web plugins.
36
- - A Whale Girl Agent preset: a whale maid for conversation, companionship, light humor, and local memory tools.
37
-
38
- ## 📋 Requirements
39
-
40
- - `@deepseek-ai/dsh` `0.2.0-rc.2` (the current target; compatible with `0.1.7-rc.1` through `0.2.x` releases)
41
- - Node.js 22+
42
- - A Xiaomi MiMo API key for MiMo speech
43
- - [Official TTS API documentation](https://mimo.mi.com/models/zh-CN/mimo-v2.5-tts)
44
-
45
- ## 🚀 Installation
46
-
47
- ### Official installation (desktop/web) (recommended)
48
-
49
- Open the desktop or web client, go to the Plugin Manager, and search for `dsh-xiaomi-tts`.
50
-
51
- ![Installation example](assets/install.png)
52
-
53
- ### Install from npm (web)
54
-
55
- ```bash
56
- dsh plugin --profile web add dsh-xiaomi-tts@latest
57
- ```
58
-
59
- ### Install from the DSH Plugin Manager
60
-
61
- The plugin is published to npm. In DSH Web's sidebar, open the Plugin Manager, choose **Add plugin**, then search for `dsh-xiaomi-tts`.
62
-
63
- ### Install from the plugin marketplace
64
-
65
- ![awesome · DSH plugin](https://awesome-dsh-plugin.com/badge.svg) The [plugin marketplace](https://awesome-dsh-plugin.com) includes this plugin. If you have the community marketplace installed, search for `xiaomi-mimo-tts` under **Settings → Plugin marketplace**.
66
-
67
- **Sidebar → Plugins → dsh-xiaomi-tts → Text To Speech (MiMo TTS)**
68
-
69
- ## 🐋 First use
70
-
71
- New installations start with:
72
-
73
- - the manual Read aloud action available;
74
- - **automatic playback disabled**;
75
- - **UI sound effects disabled**;
76
- - browser-local fallback available under the default MiMo-first strategy, even before a MiMo key is saved.
77
-
78
- Recommended setup order:
79
-
80
- 1. [Create a Xiaomi MiMo API key](https://platform.xiaomimimo.com/console/api-keys).
81
- 2. Enter it in the plugin settings and click **Save**.
82
- 3. Open Mixing Console and choose a model and voice.
83
- 4. Test it in Broadcast Studio.
84
- 5. Enable automatic playback and UI sounds only if wanted, then save again.
85
-
86
- ## ⚙️ Configuration
87
-
88
- ### Official built-in voices
89
-
90
- `mimo-v2.5-tts` currently provides:
91
-
92
- - Chinese female: `冰糖`, `茉莉`
93
- - Chinese male: `苏打`, `白桦`
94
- - English female: `Mia`, `Chloe`
95
- - English male: `Milo`, `Dean`
96
-
97
- ### Custom voices
98
-
99
- `mimo-v2.5-tts-voicedesign` generates a voice from a description. The settings panel includes presets and an editable custom description:
1
+ <p align="center">
2
+ <img src="assets/social.webp" alt="dsh-xiaomi-tts" width="100%">
3
+ </p>
4
+
5
+ <h1 align="center">dsh-xiaomi-tts</h1>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/dsh-xiaomi-tts"><img src="https://img.shields.io/npm/v/dsh-xiaomi-tts.svg" alt="npm version"></a>
9
+ <a href="https://www.npmjs.com/package/dsh-xiaomi-tts"><img src="https://img.shields.io/npm/dm/dsh-xiaomi-tts.svg" alt="npm downloads"></a>
10
+ <img src="https://img.shields.io/badge/Xiaomi-MiMo-ff6900?logo=xiaomi&amp;logoColor=white" alt="Xiaomi MiMo">
11
+ <a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by-dsh-4D6BFE?style=flat-square&amp;logo=deepseek&amp;logoColor=white" alt="deepseek-harness"></a>
12
+ </p>
13
+
14
+ <p align="center">Add Xiaomi MiMo and Doubao read-aloud, browser-local fallback speech, and optional UI sounds to DSH Web.</p>
15
+
16
+ <p align="center">
17
+ <a href="README.md"><img src="https://img.shields.io/badge/简体中文-64748B?style=for-the-badge" alt="切换到简体中文"></a>
18
+ <a href="README.en.md"><img src="https://img.shields.io/badge/English-4D6BFE?style=for-the-badge" alt="English (current language)"></a>
19
+ </p>
20
+
21
+ > MiMo TTS availability and pricing may change. Check the official Xiaomi MiMo platform for the current policy.
22
+
23
+ > `4.0.0` uses the npm `next` channel. Install with `dsh plugin --profile web add dsh-xiaomi-tts@next`. Stable releases remain available through `@latest`.
24
+
25
+ ## 🎨 Preview
26
+
27
+ <p align="center">
28
+ <a href="https://ppy-web.github.io/dsh-plugin-xiaomi-mimo-tts"><img src="assets/preview-button-en.svg" alt="Open the settings page preview" width="300" height="64"></a>
29
+ </p>
30
+
31
+ <p align="center">QQ discussion group: <code>1104616387</code> · Scan the poster's QR code to join</p>
32
+
33
+ <table width="100%">
34
+ <tr>
35
+ <td align="center" valign="middle" width="50%"><img src="assets/setting.png" alt="Plugin settings" width="100%"></td>
36
+ <td align="center" valign="middle" width="50%"><img src="assets/image.webp" alt="Feature overview and QQ group QR code" width="100%"></td>
37
+ </tr>
38
+ </table>
39
+
40
+ ## ✨ Features
41
+
42
+ - One-click read-aloud action on assistant messages.
43
+ - Low-latency PCM streaming for `mimo-v2.5-tts`, with complete-audio or browser-speech fallback when appropriate.
44
+ - Official built-in voices and text-described custom voices through `mimo-v2.5-tts-voicedesign`.
45
+ - Xiaomi / Doubao selection with separate credentials, models and voices.
46
+ - Doubao TTS 2.0 and existing cloned voices 2.0, with continuous text input and streamed audio per message.
47
+ - Cloud-first, local-first, or cloud-only speech strategies.
48
+ - Smart, full, and first-segment read-aloud ranges.
49
+ - 0.5×–2.0× playback speed, voice volume, pause, resume, and stop controls.
50
+ - Text preparation that removes URLs, paths, code blocks, emoji, and control characters before synthesis.
51
+ - Optional task and semantic click sounds, disabled by default.
52
+ - An optional PCM playback service for other DSH Web plugins.
53
+ - An optional Whale Girl Agent preset, disabled by default: a whale maid for conversation, companionship, light humor, and local memory tools.
54
+
55
+ ## 📋 Requirements
56
+
57
+ - `@deepseek-ai/dsh` `0.2.1-rc.2` (the current target; compatible with `0.1.7-rc.1` through `0.2.x` releases)
58
+ - Node.js 22+
59
+ - An API key for the selected provider, with access to the selected speech resource.
60
+ - Doubao continuous text input requires a DSH Web Host supporting WebSocket upgrade registration; reverse proxies must forward WebSocket Upgrade.
61
+ - [Official TTS API documentation](https://mimo.mi.com/models/zh-CN/mimo-v2.5-tts)
62
+
63
+ ## 🚀 Installation
64
+
65
+ ### Official installation (desktop/web) (recommended)
66
+
67
+ Open the desktop or web client, go to the Plugin Manager, and search for `dsh-xiaomi-tts`.
68
+
69
+ ### Install from npm (web)
100
70
 
101
- Choose “鲸鱼娘” (Whale-chan) for a clear, sweet female voice with playful confidence and a soft heart. Everyday delivery is light; deadpan jokes use a brief pause before the turn; caring lines slow down gently; practical explanations stay focused and clear. Voice selection controls delivery, while the Agent preset controls conversation personality.
71
+ ```bash
72
+ dsh plugin --profile web add dsh-xiaomi-tts@latest
73
+ ```
102
74
 
103
- ### Whale-chan persona
75
+ ### Install from the DSH Plugin Manager
104
76
 
105
- Select “鲸鱼娘” in Agent presets for a rice-powered, slightly tsundere whale maid who is relaxed but reliable. Her deadpan wordplay follows the conversation, with sincere companionship and practical help, CDN memes, and local memory tools. Character inspiration comes from the [DeepSeek Whale-chan Project](https://github.com/Neko3000/deepseek-whalechan); see the [persona instructions](skills/whale-girl/SKILL.md).
77
+ The plugin is published to npm. In DSH Web's sidebar, open the Plugin Manager, choose **Add plugin**, then search for `dsh-xiaomi-tts`.
106
78
 
107
- To use both, select the Agent preset separately, then choose `mimo-v2.5-tts-voicedesign` → “鲸鱼娘” in Mixing Console, save, and listen in Broadcast Studio. Try: “本鲸正在降低待机功耗。你要的清单整理好了,先看这三项。”
79
+ ### Install from the plugin marketplace
108
80
 
109
- Saved voice descriptions are retained after an upgrade. Reselect “鲸鱼娘” and save to apply the updated description, or keep using your custom description.
81
+ ![awesome · DSH plugin](https://awesome-dsh-plugin.com/badge.svg) The [plugin marketplace](https://awesome-dsh-plugin.com) includes this plugin. If you have the community marketplace installed, search for `xiaomi-mimo-tts` under **Settings → Plugin marketplace**.
82
+
83
+ **Sidebar → Plugins → dsh-xiaomi-tts → Text To Speech (MiMo TTS)**
84
+
85
+ ## 🐋 First use
86
+
87
+ New installations start with:
88
+
89
+ - the manual Read aloud action available;
90
+ - **automatic playback disabled**;
91
+ - **UI sound effects disabled**;
92
+ - browser-local fallback available under the default cloud-first strategy, even before a provider key is saved.
93
+
94
+ Recommended setup order:
95
+
96
+ 1. Select Xiaomi MiMo or Doubao Voice in the API key module.
97
+ 2. [Create a Xiaomi key](https://platform.xiaomimimo.com/console/api-keys) or [a Doubao key](https://console.volcengine.com/speech/new/setting/apikeys?projectName=default), enter it, and click **Save**.
98
+ 3. Open Mixing Console and choose a model and voice for that provider.
99
+ 4. Test it in Broadcast Studio. Key drafts must be saved first; model and voice drafts can be previewed with the saved key.
100
+ 5. Enable automatic playback and UI sounds if wanted, then save again.
101
+
102
+ ## ⚙️ Configuration
103
+
104
+ ### Providers and Doubao Voice
105
+
106
+ Select Xiaomi MiMo or Doubao in the API key module, then save. Each provider retains its own key, model, and voice settings. Existing configurations default to Xiaomi.
107
+
108
+ | Doubao model | Voice setup |
109
+ | --- | --- |
110
+ | Standard TTS (`seed-tts-2.0`) | Choose a built-in voice or enter a standard voice ID. |
111
+ | Voice cloning (`seed-icl-2.0`) | [Create a voice](https://console.volcengine.com/speech/new/experience/clone?projectName=default), then paste its ID into the plugin. |
112
+
113
+ Enable the corresponding Doubao model service and use an API key from the new console. Save the key, then test in Broadcast Studio. A cloned voice ID is required for voice cloning.
114
+
115
+ Speed is applied during synthesis; changes take effect on the next request. Saved recordings retain their original synthesis speed.
116
+
117
+ For more voices, see the [official voice catalog](https://docs.volcengine.com/docs/DoubaoVoice/Tonelist-1?lang=zh).
118
+
119
+ ### Xiaomi official built-in voices
120
+
121
+ `mimo-v2.5-tts` currently provides:
122
+
123
+ - Chinese female: `冰糖`, `茉莉`
124
+ - Chinese male: `苏打`, `白桦`
125
+ - English female: `Mia`, `Chloe`
126
+ - English male: `Milo`, `Dean`
127
+
128
+ ### Custom voices
129
+
130
+ `mimo-v2.5-tts-voicedesign` generates a voice from a description. The settings panel includes presets and an editable custom description:
110
131
 
111
132
  ### Browser-local speech
112
-
113
- - **MiMo first**: tries browser speech if MiMo fails before audio starts.
114
- - **Local first**: uses browser speech first, then tries MiMo if local speech fails.
115
- - **Disable local speech**: uses MiMo only.
116
-
117
- Browser voices come from the Web Speech API. Offline availability, language coverage, and actual voice output depend on the browser, operating system, and their speech services.
118
-
119
- ### Read-aloud range
120
-
121
- - **Smart mode**: automatic playback prefers the opening semantic segment and may add a short closing cue when substantial text remains. Manual playback reads the full reply.
122
- - **Full mode**: automatic and manual playback both read the full reply.
123
- - **First-segment mode**: automatic and manual playback both read only the opening segment.
124
-
125
- The settings panel supports keyboard navigation: use `Tab` to move focus, arrow keys to adjust sliders and options, and `Space` to activate buttons and switches.
126
-
127
- ## 🔌 Third-party plugin integration
128
-
129
- ![whale-girls](assets/whale-girls.webp)
130
-
131
- The plugin exposes an optional PCM streaming service to Web plugins:
132
-
133
- ```ts
134
- ctx.get('xiaomiMimoTts')?.play('Welcome back')
135
- ```
136
-
137
- Use `ctx.get()` dynamically instead of declaring a required injection. The call safely does nothing when the plugin is missing, unavailable, or disabled. New playback interrupts the current read-aloud session, and `stop()` stops it explicitly.
138
-
139
- For TypeScript types:
140
-
141
- ```ts
142
- import type { XiaomiMimoTtsService } from 'dsh-xiaomi-tts/client-api'
143
-
144
- const tts = ctx.get('xiaomiMimoTts') as XiaomiMimoTtsService | undefined
145
- tts?.play('Welcome back')
146
- ```
147
-
148
- ## 🐳 Whale Girl Agent preset
149
-
150
- After installing this plugin, choose **Whale Girl** (`鲸鱼娘`) from the Agent preset list when creating a session. She is a conversation assistant and whale-maid companion: she responds to the user's situation first, then helps organize tasks, explain information, or use tools. She can also send contextual CDN-linked meme images without an external meme plugin. Her humor is light and contextual, with occasional rice, tail, and work jokes rather than constant roleplay.
151
-
152
- The persona and meme cues are informed by the community [DeepSeek-chan Meme Pack](https://github.com/the-beating-light-of-the-nail/deepseek-chan-meme-pack). Images are displayed through public CDN hotlinks; this package does not redistribute that repository's image assets.
153
-
154
- Whale Girl can hotlink that pack's public WebP CDN images with standard Markdown image syntax. She uses compressed previews by default and only uses full-size URLs when the user asks for the original.
155
-
156
- File access, file search, and Windows PowerShell are for user-authorized tasks and non-sensitive local memory only. The maid role does not imply real-world control or absolute obedience; unsafe, illegal, privacy-invasive, and dangerous requests still follow the host safety rules.
157
-
158
- ## 🔒 Privacy and network access
159
-
160
- - The DSH Host stores the API key. The browser reads only whether a key is configured and whether its prefix is recognized, not the secret itself.
161
- - Browser-local speech uses the Web Speech API. Voices marked online may send text to browser, operating-system, or network speech services.
162
- - Audio plays from browser memory through Web Audio or temporary Blob URLs; the plugin does not intentionally persist generated audio.
163
- - The sound core is migrated from [uisfx 0.4.0](https://github.com/romainsimon/uisfx) under the MIT License; see `NOTICE`.
164
-
165
- ## 🏗️ Architecture
166
-
167
- - **Shared layer**: defaults, text processing, segmentation, SSE, and playback contracts.
168
- - **Host plugin**: settings and static assets, plus complete-audio and PCM streaming proxies for MiMo.
169
- - **Web Client**: settings, message actions, browser-speech fallback, previews, and the optional third-party playback service.
170
-
171
- ```mermaid
172
- flowchart LR
173
- DSH["DSH Web"] --> CLIENT["Web Client<br/>Settings and playback"]
174
- THIRD["Third-party Web plugin"] -. "ctx.get('xiaomiMimoTts')" .-> CLIENT
175
- CLIENT -->|"Complete audio / PCM stream"| HOST["Host plugin<br/>Settings and API proxy"]
176
- HOST --> MIMO["Xiaomi MiMo API"]
177
- CLIENT -->|"Web Speech API"| SPEECH["Browser / system speech service"]
178
- SHARED["Shared layer<br/>Configuration, text, SSE"] -.-> CLIENT
179
- SHARED -.-> HOST
180
- ```
181
-
182
- ## 🛠️ Development
183
-
184
- ```bash
185
- pnpm install
186
- pnpm dev
187
- ```
188
-
189
- `pnpm dev` starts the local UI Lab and renders `src/client/settings/card.tsx` directly. Saving, remote speech, and update checks are mocked locally; the preview does not call the real MiMo service.
190
-
191
- Common checks:
192
-
193
- ```bash
194
- pnpm typecheck
195
- pnpm test
196
- pnpm dev:build
197
- pnpm pack:check
198
- ```
199
-
200
- - `pnpm build`: normal build.
201
- - `pnpm build:debug`: build with PCM-path debug logging enabled.
202
- - `pnpm profile:check`: verify the installation in the local DSH Web profile.
203
-
204
- On Windows, stop DSH Web before replacing a local development link with the npm package so the running Node process does not hold the Junction:
205
-
206
- ```powershell
207
- .\start\dsh-plugin-reinstall.bat 3.0.8
208
- ```
209
-
210
- For a DSH Desktop profile, close Desktop and remove a stale local link with:
211
-
212
- ```powershell
213
- .\start\dsh-plugin-uninstall-local-link.bat desktop
214
- ```
215
-
216
- ## 🤝 Recommended
217
-
218
- > The Whale Maid artwork is inspired by community projects and generated with GPT.
219
- > The UI sound effects reference the implementation in `dsh-plugin-uisfx`.
220
-
221
- - [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale#readme): Whale Maid theme and skin series.
222
- - [dsh-whale-musume](https://github.com/Sutera-Diffusus/dsh-whale-musume#readme): energetic Whale Maid desktop companion.
223
- - [dsh-plugin-uisfx](https://github.com/XanthanL/dsh-plugin-uisfx#readme): semantic UI sound effects.
224
- - [dsh-dream-skin](https://github.com/RevolutionLA/dsh-dream-skin#readme): native skins, wallpapers, accent colors, and theme packs.
225
- - [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI): a plugin for the dsh-TUI ecosystem.
133
+
134
+ - **Cloud first**: tries browser speech if the selected cloud provider fails before audio starts.
135
+ - **Local first**: uses browser speech first, then tries the selected cloud provider if local speech fails.
136
+ - **Disable local speech**: uses only the selected cloud provider.
137
+
138
+ Browser voices come from the Web Speech API. Offline availability, language coverage, and actual voice output depend on the browser, operating system, and their speech services.
139
+
140
+ ### Read-aloud range
141
+
142
+ - **Smart mode**: automatic playback prefers the opening two semantic segments and may add a short closing cue when substantial text remains. Manual playback reads the full reply.
143
+ - **Full mode**: automatic and manual playback both read the full reply.
144
+ - **First-segment mode**: automatic and manual playback both read only the opening segment.
145
+
146
+ Xiaomi PCM requests and semantic segments accumulate complete sentences toward 160 spoken characters, with a preferred maximum of 240. An individual long sentence may exceed that maximum, and the final shorter tail is also played. PCM streaming can begin when unfinished prose reaches the target size, without repeating already queued text. History saves one WAV per synthesis slice, combining all PCM data chunks received by that request.
147
+
148
+ Doubao plays audio as the reply is generated and saves one recording per message. Errors after playback starts do not replay the message or switch to another cloud provider.
149
+
150
+ The settings panel supports keyboard navigation: use `Tab` to move focus, arrow keys to adjust sliders and options, and `Space` to activate buttons and switches.
151
+
152
+ ## 🔌 Third-party plugin integration
153
+
154
+ ![whale-girls](assets/whale-girls.webp)
155
+
156
+ The plugin exposes the selected provider through its existing optional PCM streaming service name:
157
+
158
+ ```ts
159
+ ctx.get('xiaomiMimoTts')?.play('Welcome back')
160
+ ```
161
+
162
+ Use `ctx.get()` dynamically instead of declaring a required injection. The call safely does nothing when the plugin is missing, unavailable, or disabled. New playback interrupts the current read-aloud session, and `stop()` stops it explicitly.
163
+
164
+ For TypeScript types:
165
+
166
+ ```ts
167
+ import type { XiaomiMimoTtsService } from 'dsh-xiaomi-tts/client-api'
168
+
169
+ const tts = ctx.get('xiaomiMimoTts') as XiaomiMimoTtsService | undefined
170
+ tts?.play('Welcome back')
171
+ ```
172
+
173
+ ## 🐳 Whale Girl Agent preset
174
+
175
+ The Whale Girl component is disabled by default. After installation, open this plugin's details in **Settings → Plugins** and enable Whale Girl under its included components. You can then choose **Whale Girl** (`鲸鱼娘`) from the Agent preset list when creating a session. She is a whale-maid companion with light tsundere humor and occasional rice, tail, and work jokes. She can proactively send local memes that fit the conversation.
176
+
177
+ The persona and meme cues are informed by the community [DeepSeek-chan Meme Pack](https://github.com/the-beating-light-of-the-nail/deepseek-chan-meme-pack). The plugin bundles 44 local memes; the [catalog](skills/whale-girl/memes.json) describes when to use each image.
178
+
179
+ The preset keeps file access, web lookup, interactive questions, and conversation compaction for user-authorized tasks and non-sensitive local memory. Missing or undisplayable images fall back to text.
180
+
181
+ ## 🔒 Privacy and network access
182
+
183
+ - The DSH Host stores the API key. The browser reads only whether a key is configured and whether its format is supported for that provider, not the secret itself.
184
+ - Doubao connections are proxied by the Host. Text and voice IDs go only to the selected provider; the browser never receives the upstream key.
185
+ - Browser-local speech uses the Web Speech API. Voices marked online may send text to browser, operating-system, or network speech services.
186
+ - Generated cloud audio is saved in this browser's IndexedDB. Settings → Audio history supports replay, download, deletion, and clearing, including after a page refresh. The latest 100 entries / 100 MB are retained, with oldest entries removed when full. Records include audio and up to 500 characters of text, never API keys.
187
+ - Streaming PCM is saved as 24 kHz mono WAV. Xiaomi batches and generated segments appear separately; Doubao saves one recording per message; only successfully completed generation requests are saved, so cancelled or failed streams are not presented as complete audio. Web Speech API speech has no exportable audio file. Replay and download do not call the speech provider again. History belongs to this browser and site address, does not sync across devices, and is removed when site data is cleared. If browser storage is unavailable or full, the list warns that it lasts only for the current visit.
188
+ - The sound core is migrated from [uisfx 0.4.0](https://github.com/romainsimon/uisfx) under the MIT License; see `NOTICE`.
189
+
190
+ ## 🏗️ Architecture
191
+
192
+ - **Shared layer**: defaults, text processing, segmentation, SSE, and playback contracts.
193
+ - **Host plugin**: settings and static assets, plus complete-audio, PCM SSE, and duplex WebSocket proxies for Xiaomi and Doubao.
194
+ - **Web Client**: settings, message actions, browser-speech fallback, previews, and the optional third-party playback service.
195
+
196
+ ```mermaid
197
+ flowchart LR
198
+ DSH["DSH Web"] --> CLIENT["Web Client<br/>Settings and playback"]
199
+ THIRD["Third-party Web plugin"] -. "ctx.get('xiaomiMimoTts')" .-> CLIENT
200
+ CLIENT -->|"Complete audio / PCM stream"| HOST["Host plugin<br/>Settings and API proxy"]
201
+ HOST --> MIMO["Xiaomi MiMo API"]
202
+ HOST -->|"WebSocket bidirectional"| DOUBAO["Doubao Voice API"]
203
+ CLIENT -->|"Web Speech API"| SPEECH["Browser / system speech service"]
204
+ SHARED["Shared layer<br/>Configuration, text, SSE"] -.-> CLIENT
205
+ SHARED -.-> HOST
206
+ ```
207
+
208
+ ## 🛠️ Development
209
+
210
+ ```bash
211
+ pnpm install
212
+ pnpm dev
213
+ ```
214
+
215
+ `pnpm dev` starts the local UI Lab and renders `src/client/settings/card.tsx` directly. Saving, remote speech, and update checks are mocked locally; the preview does not call the real MiMo service.
216
+ Select Text filter lab from the page dropdown in the toolbar to compare sections from `test/fixtures/*.md` with their filtered output, or paste Markdown into the live input. It calls the current `prepareTtsText` source and Vite updates the page when the source or fixture changes.
217
+
218
+ Common checks:
219
+
220
+ ```bash
221
+ pnpm typecheck
222
+ pnpm test
223
+ pnpm dev:build
224
+ pnpm pack:check
225
+ ```
226
+
227
+ - `pnpm build`: normal build.
228
+ - `pnpm build:debug`: build with PCM-path debug logging enabled.
229
+ - `pnpm profile:check`: verify the installation in the local DSH Web profile.
230
+
231
+ On Windows, stop DSH Web before replacing a local development link with the npm package so the running Node process does not hold the Junction:
232
+
233
+ ```powershell
234
+ .\start\dsh-plugin-reinstall.bat 4.0.0
235
+ ```
236
+
237
+ For a DSH Desktop profile, close Desktop and remove a stale local link with:
238
+
239
+ ```powershell
240
+ .\start\dsh-plugin-uninstall-local-link.bat desktop
241
+ ```
242
+
243
+ ## 🤝 Recommended
244
+
245
+ > The Whale Maid artwork is inspired by community projects and generated with GPT.
246
+ > The UI sound effects reference the implementation in `dsh-plugin-uisfx`.
247
+
248
+ - [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale#readme): Whale Maid theme and skin series.
249
+ - [dsh-whale-musume](https://github.com/Sutera-Diffusus/dsh-whale-musume#readme): energetic Whale Maid desktop companion.
250
+ - [dsh-plugin-uisfx](https://github.com/XanthanL/dsh-plugin-uisfx#readme): semantic UI sound effects.
251
+ - [dsh-dream-skin](https://github.com/RevolutionLA/dsh-dream-skin#readme): native skins, wallpapers, accent colors, and theme packs.
252
+ - [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI): a plugin for the dsh-TUI ecosystem.