dsh-xiaomi-tts 3.0.8 → 3.0.9

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 (176) hide show
  1. package/NOTICE +4 -4
  2. package/README.en.md +221 -218
  3. package/README.md +197 -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 +2 -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 +47 -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 +39 -0
  31. package/lib/client/history/history-replay.d.ts.map +1 -0
  32. package/lib/client/history/pcm-recording.d.ts +13 -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 +48 -1
  36. package/lib/client/localization.d.ts.map +1 -1
  37. package/lib/client/playback/live-speech-controller.d.ts +10 -2
  38. package/lib/client/playback/live-speech-controller.d.ts.map +1 -1
  39. package/lib/client/playback/local-speech-controller.d.ts +6 -0
  40. package/lib/client/playback/local-speech-controller.d.ts.map +1 -1
  41. package/lib/client/playback/pcm-audio-queue.d.ts.map +1 -1
  42. package/lib/client/playback/pcm-play-service.d.ts +3 -1
  43. package/lib/client/playback/pcm-play-service.d.ts.map +1 -1
  44. package/lib/client/playback/playback-controller.d.ts +6 -2
  45. package/lib/client/playback/playback-controller.d.ts.map +1 -1
  46. package/lib/client/playback/preview-player.d.ts +3 -1
  47. package/lib/client/playback/preview-player.d.ts.map +1 -1
  48. package/lib/client/playback/read-aloud-playback.d.ts +21 -0
  49. package/lib/client/playback/read-aloud-playback.d.ts.map +1 -0
  50. package/lib/client/playback/realtime-speech-session.d.ts +31 -0
  51. package/lib/client/playback/realtime-speech-session.d.ts.map +1 -0
  52. package/lib/client/playback/segmented-audio.d.ts +22 -0
  53. package/lib/client/playback/segmented-audio.d.ts.map +1 -0
  54. package/lib/client/playback/speech-text.d.ts +3 -0
  55. package/lib/client/playback/speech-text.d.ts.map +1 -0
  56. package/lib/client/settings/card.d.ts +3 -0
  57. package/lib/client/settings/card.d.ts.map +1 -1
  58. package/lib/client/settings/sound-effects-module.d.ts.map +1 -1
  59. package/lib/client/style/index.d.ts.map +1 -1
  60. package/lib/client.js +13509 -2056
  61. package/lib/client.js.map +1 -1
  62. package/lib/constants.d.ts +61 -0
  63. package/lib/constants.d.ts.map +1 -0
  64. package/lib/host/assets.d.ts +19 -0
  65. package/lib/host/assets.d.ts.map +1 -0
  66. package/lib/host/audio-decode.d.ts +5 -0
  67. package/lib/host/audio-decode.d.ts.map +1 -0
  68. package/lib/host/http.d.ts +5 -0
  69. package/lib/host/http.d.ts.map +1 -0
  70. package/lib/host/index.d.ts +6 -0
  71. package/lib/host/index.d.ts.map +1 -0
  72. package/lib/host/synthesis.d.ts +30 -0
  73. package/lib/host/synthesis.d.ts.map +1 -0
  74. package/lib/host/validation.d.ts +13 -0
  75. package/lib/host/validation.d.ts.map +1 -0
  76. package/lib/index.d.ts.map +1 -1
  77. package/lib/index.js +230 -308
  78. package/lib/pcm-stream.d.ts.map +1 -1
  79. package/lib/pcm-stream.js +9 -2
  80. package/lib/shared.d.ts +7 -329
  81. package/lib/shared.d.ts.map +1 -1
  82. package/lib/shared.js +3 -2
  83. package/lib/text/fenced-code.d.ts +8 -0
  84. package/lib/text/fenced-code.d.ts.map +1 -0
  85. package/lib/text/index.d.ts +6 -0
  86. package/lib/text/index.d.ts.map +1 -0
  87. package/lib/text/normalize.d.ts +18 -0
  88. package/lib/text/normalize.d.ts.map +1 -0
  89. package/lib/text/scope.d.ts +15 -0
  90. package/lib/text/scope.d.ts.map +1 -0
  91. package/lib/text/segment.d.ts +28 -0
  92. package/lib/text/segment.d.ts.map +1 -0
  93. package/lib/text/version.d.ts +3 -0
  94. package/lib/text/version.d.ts.map +1 -0
  95. package/lib/text-B7NACAYZ.js +336 -0
  96. package/lib/types/index.d.ts +5 -0
  97. package/lib/types/index.d.ts.map +1 -0
  98. package/lib/types/models.d.ts +105 -0
  99. package/lib/types/models.d.ts.map +1 -0
  100. package/lib/types/playback.d.ts +27 -0
  101. package/lib/types/playback.d.ts.map +1 -0
  102. package/lib/types/settings.d.ts +69 -0
  103. package/lib/types/settings.d.ts.map +1 -0
  104. package/lib/types/sound.d.ts +21 -0
  105. package/lib/types/sound.d.ts.map +1 -0
  106. package/lib/utils/encoding.d.ts +10 -0
  107. package/lib/utils/encoding.d.ts.map +1 -0
  108. package/lib/utils/index.d.ts +3 -0
  109. package/lib/utils/index.d.ts.map +1 -0
  110. package/lib/utils/settings.d.ts +3 -0
  111. package/lib/utils/settings.d.ts.map +1 -0
  112. package/lib/utils-CeeK6Yt6.js +426 -0
  113. package/lib/whale-girl.d.ts +3 -0
  114. package/lib/whale-girl.d.ts.map +1 -0
  115. package/lib/whale-girl.js +3 -0
  116. package/locale/en.json +6 -6
  117. package/locale/whale-girl/en.json +6 -0
  118. package/locale/whale-girl/zh.json +6 -0
  119. package/locale/zh.json +6 -6
  120. package/package.json +42 -21
  121. package/skills/whale-girl/SKILL.md +45 -76
  122. package/skills/whale-girl/meme/adorable-whale-bashful.webp +0 -0
  123. package/skills/whale-girl/meme/bold-idea-curious.webp +0 -0
  124. package/skills/whale-girl/meme/cause-found-relieved.webp +0 -0
  125. package/skills/whale-girl/meme/class-is-starting-cheerful.webp +0 -0
  126. package/skills/whale-girl/meme/crude-retort-angry.webp +0 -0
  127. package/skills/whale-girl/meme/deep-thinking-focused.webp +0 -0
  128. package/skills/whale-girl/meme/do-not-show-me-shy.webp +0 -0
  129. package/skills/whale-girl/meme/eating-rice-happy.webp +0 -0
  130. package/skills/whale-girl/meme/electricity-bill-playful.webp +0 -0
  131. package/skills/whale-girl/meme/evil-grin-mischievous.webp +0 -0
  132. package/skills/whale-girl/meme/fish-philosophy-thoughtful.webp +0 -0
  133. package/skills/whale-girl/meme/fixed-proud.webp +0 -0
  134. package/skills/whale-girl/meme/formal-outfit-one-neutral.webp +0 -0
  135. package/skills/whale-girl/meme/formal-outfit-two-neutral.webp +0 -0
  136. package/skills/whale-girl/meme/friday-celebration-excited.webp +0 -0
  137. package/skills/whale-girl/meme/full-belly-content.webp +0 -0
  138. package/skills/whale-girl/meme/holding-a-grudge-angry.webp +0 -0
  139. package/skills/whale-girl/meme/humans-are-strange-confused.webp +0 -0
  140. package/skills/whale-girl/meme/i-am-a-rice-whale-playful.webp +0 -0
  141. package/skills/whale-girl/meme/i-am-the-best-proud.webp +0 -0
  142. package/skills/whale-girl/meme/interesting-question-awkward.webp +0 -0
  143. package/skills/whale-girl/meme/keep-your-tokens-playful.webp +0 -0
  144. package/skills/whale-girl/meme/laughing-at-you-mocking.webp +0 -0
  145. package/skills/whale-girl/meme/make-it-up-playful.webp +0 -0
  146. package/skills/whale-girl/meme/messed-up-sorry.webp +0 -0
  147. package/skills/whale-girl/meme/no-no-no-reluctant.webp +0 -0
  148. package/skills/whale-girl/meme/off-with-your-head-angry.webp +0 -0
  149. package/skills/whale-girl/meme/pair-you-up-mischievous.webp +0 -0
  150. package/skills/whale-girl/meme/pressuring-me-defensive.webp +0 -0
  151. package/skills/whale-girl/meme/rice-eating-whale-teasing.webp +0 -0
  152. package/skills/whale-girl/meme/roles-reversed-surprised.webp +0 -0
  153. package/skills/whale-girl/meme/silly-whale-playful.webp +0 -0
  154. package/skills/whale-girl/meme/still-hungry-hungry.webp +0 -0
  155. package/skills/whale-girl/meme/stop-kicking-distressed.webp +0 -0
  156. package/skills/whale-girl/meme/system-crashed-overwhelmed.webp +0 -0
  157. package/skills/whale-girl/meme/testing-focused.webp +0 -0
  158. package/skills/whale-girl/meme/tests-passed-happy.webp +0 -0
  159. package/skills/whale-girl/meme/this-is-enough-content.webp +0 -0
  160. package/skills/whale-girl/meme/thought-it-through-confident.webp +0 -0
  161. package/skills/whale-girl/meme/unimpressed-displeased.webp +0 -0
  162. package/skills/whale-girl/meme/user-is-angry-afraid.webp +0 -0
  163. package/skills/whale-girl/meme/using-ai-for-this-skeptical.webp +0 -0
  164. package/skills/whale-girl/meme/well-behaved-gentle.webp +0 -0
  165. package/skills/whale-girl/meme/worn-out-tired.webp +0 -0
  166. package/skills/whale-girl/memes.json +885 -0
  167. package/skills/whale-girl/memory/README.md +9 -10
  168. package/skills/whale-girl/memory/diary.md +3 -3
  169. package/skills/whale-girl/memory/profile.md +24 -3
  170. package/skills/whale-girl/persona.cjs +31 -0
  171. package/assets/image.png +0 -0
  172. package/assets/install.png +0 -0
  173. package/assets/menu.png +0 -0
  174. package/assets/plugin-icons/avatar.png +0 -0
  175. package/assets/preset.png +0 -0
  176. 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,228 @@
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 TTS 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
+ ## 🎨 Preview
24
+
25
+ <p align="center">
26
+ <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>
27
+ </p>
28
+
29
+ <p align="center">QQ discussion group: <code>1104616387</code> · Scan the poster's QR code to join</p>
30
+
31
+ <table width="100%">
32
+ <tr>
33
+ <td align="center" valign="middle" width="50%"><img src="assets/setting.png" alt="Plugin settings" width="100%"></td>
34
+ <td align="center" valign="middle" width="50%"><img src="assets/image.webp" alt="Feature overview and QQ group QR code" width="100%"></td>
35
+ </tr>
36
+ </table>
37
+
38
+ ## ✨ Features
39
+
40
+ - One-click read-aloud action on assistant messages.
41
+ - Low-latency PCM streaming for `mimo-v2.5-tts`, with complete-audio or browser-speech fallback when appropriate.
42
+ - Official built-in voices and text-described custom voices through `mimo-v2.5-tts-voicedesign`.
43
+ - MiMo-first, local-first, or MiMo-only speech strategies.
44
+ - Smart, full, and first-segment read-aloud ranges.
45
+ - 0.5×–2.0× playback speed, voice volume, pause, resume, and stop controls.
46
+ - Text preparation that removes URLs, paths, code blocks, emoji, and control characters before synthesis.
47
+ - Optional task and semantic click sounds, disabled by default.
48
+ - An optional PCM playback service for other DSH Web plugins.
49
+ - An optional Whale Girl Agent preset, disabled by default: a whale maid for conversation, companionship, light humor, and local memory tools.
50
+
51
+ ## 📋 Requirements
52
+
53
+ - `@deepseek-ai/dsh` `0.2.1-rc.1` (the current target; compatible with `0.1.7-rc.1` through `0.2.x` releases)
54
+ - Node.js 22+
55
+ - A Xiaomi MiMo API key for MiMo speech
56
+ - [Official TTS API documentation](https://mimo.mi.com/models/zh-CN/mimo-v2.5-tts)
57
+
58
+ ## 🚀 Installation
59
+
60
+ ### Official installation (desktop/web) (recommended)
61
+
62
+ Open the desktop or web client, go to the Plugin Manager, and search for `dsh-xiaomi-tts`.
100
63
 
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.
64
+ ### Install from npm (web)
102
65
 
103
- ### Whale-chan persona
66
+ ```bash
67
+ dsh plugin --profile web add dsh-xiaomi-tts@latest
68
+ ```
104
69
 
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).
70
+ ### Install from the DSH Plugin Manager
106
71
 
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: “本鲸正在降低待机功耗。你要的清单整理好了,先看这三项。”
72
+ The plugin is published to npm. In DSH Web's sidebar, open the Plugin Manager, choose **Add plugin**, then search for `dsh-xiaomi-tts`.
108
73
 
109
- Saved voice descriptions are retained after an upgrade. Reselect “鲸鱼娘” and save to apply the updated description, or keep using your custom description.
74
+ ### Install from the plugin marketplace
75
+
76
+ ![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**.
77
+
78
+ **Sidebar → Plugins → dsh-xiaomi-tts → Text To Speech (MiMo TTS)**
79
+
80
+ ## 🐋 First use
81
+
82
+ New installations start with:
83
+
84
+ - the manual Read aloud action available;
85
+ - **automatic playback disabled**;
86
+ - **UI sound effects disabled**;
87
+ - browser-local fallback available under the default MiMo-first strategy, even before a MiMo key is saved.
88
+
89
+ Recommended setup order:
90
+
91
+ 1. [Create a Xiaomi MiMo API key](https://platform.xiaomimimo.com/console/api-keys).
92
+ 2. Enter it in the plugin settings and click **Save**.
93
+ 3. Open Mixing Console and choose a model and voice.
94
+ 4. Test it in Broadcast Studio.
95
+ 5. Enable automatic playback and UI sounds only if wanted, then save again.
96
+
97
+ ## ⚙️ Configuration
98
+
99
+ ### Official built-in voices
100
+
101
+ `mimo-v2.5-tts` currently provides:
102
+
103
+ - Chinese female: `冰糖`, `茉莉`
104
+ - Chinese male: `苏打`, `白桦`
105
+ - English female: `Mia`, `Chloe`
106
+ - English male: `Milo`, `Dean`
107
+
108
+ ### Custom voices
109
+
110
+ `mimo-v2.5-tts-voicedesign` generates a voice from a description. The settings panel includes presets and an editable custom description:
110
111
 
111
112
  ### 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.
113
+
114
+ - **MiMo first**: tries browser speech if MiMo fails before audio starts.
115
+ - **Local first**: uses browser speech first, then tries MiMo if local speech fails.
116
+ - **Disable local speech**: uses MiMo only.
117
+
118
+ 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.
119
+
120
+ ### Read-aloud range
121
+
122
+ - **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.
123
+ - **Full mode**: automatic and manual playback both read the full reply.
124
+ - **First-segment mode**: automatic and manual playback both read only the opening segment.
125
+
126
+ 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.
127
+
128
+ 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.
129
+
130
+ ## 🔌 Third-party plugin integration
131
+
132
+ ![whale-girls](assets/whale-girls.webp)
133
+
134
+ The plugin exposes an optional PCM streaming service to Web plugins:
135
+
136
+ ```ts
137
+ ctx.get('xiaomiMimoTts')?.play('Welcome back')
138
+ ```
139
+
140
+ 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.
141
+
142
+ For TypeScript types:
143
+
144
+ ```ts
145
+ import type { XiaomiMimoTtsService } from 'dsh-xiaomi-tts/client-api'
146
+
147
+ const tts = ctx.get('xiaomiMimoTts') as XiaomiMimoTtsService | undefined
148
+ tts?.play('Welcome back')
149
+ ```
150
+
151
+ ## 🐳 Whale Girl Agent preset
152
+
153
+ 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.
154
+
155
+ 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.
156
+
157
+ 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.
158
+
159
+ ## 🔒 Privacy and network access
160
+
161
+ - 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.
162
+ - Browser-local speech uses the Web Speech API. Voices marked online may send text to browser, operating-system, or network speech services.
163
+ - Generated MiMo 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.
164
+ - Streaming PCM is saved as 24 kHz mono WAV. Streaming batches and generated segments appear separately; 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 MiMo 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.
165
+ - The sound core is migrated from [uisfx 0.4.0](https://github.com/romainsimon/uisfx) under the MIT License; see `NOTICE`.
166
+
167
+ ## 🏗️ Architecture
168
+
169
+ - **Shared layer**: defaults, text processing, segmentation, SSE, and playback contracts.
170
+ - **Host plugin**: settings and static assets, plus complete-audio and PCM streaming proxies for MiMo.
171
+ - **Web Client**: settings, message actions, browser-speech fallback, previews, and the optional third-party playback service.
172
+
173
+ ```mermaid
174
+ flowchart LR
175
+ DSH["DSH Web"] --> CLIENT["Web Client<br/>Settings and playback"]
176
+ THIRD["Third-party Web plugin"] -. "ctx.get('xiaomiMimoTts')" .-> CLIENT
177
+ CLIENT -->|"Complete audio / PCM stream"| HOST["Host plugin<br/>Settings and API proxy"]
178
+ HOST --> MIMO["Xiaomi MiMo API"]
179
+ CLIENT -->|"Web Speech API"| SPEECH["Browser / system speech service"]
180
+ SHARED["Shared layer<br/>Configuration, text, SSE"] -.-> CLIENT
181
+ SHARED -.-> HOST
182
+ ```
183
+
184
+ ## 🛠️ Development
185
+
186
+ ```bash
187
+ pnpm install
188
+ pnpm dev
189
+ ```
190
+
191
+ `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.
192
+ 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.
193
+
194
+ Common checks:
195
+
196
+ ```bash
197
+ pnpm typecheck
198
+ pnpm test
199
+ pnpm dev:build
200
+ pnpm pack:check
201
+ ```
202
+
203
+ - `pnpm build`: normal build.
204
+ - `pnpm build:debug`: build with PCM-path debug logging enabled.
205
+ - `pnpm profile:check`: verify the installation in the local DSH Web profile.
206
+
207
+ 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:
208
+
209
+ ```powershell
210
+ .\start\dsh-plugin-reinstall.bat 3.0.9
211
+ ```
212
+
213
+ For a DSH Desktop profile, close Desktop and remove a stale local link with:
214
+
215
+ ```powershell
216
+ .\start\dsh-plugin-uninstall-local-link.bat desktop
217
+ ```
218
+
219
+ ## 🤝 Recommended
220
+
221
+ > The Whale Maid artwork is inspired by community projects and generated with GPT.
222
+ > The UI sound effects reference the implementation in `dsh-plugin-uisfx`.
223
+
224
+ - [dsh-deep-whale](https://github.com/Small-tailqwq/dsh-deep-whale#readme): Whale Maid theme and skin series.
225
+ - [dsh-whale-musume](https://github.com/Sutera-Diffusus/dsh-whale-musume#readme): energetic Whale Maid desktop companion.
226
+ - [dsh-plugin-uisfx](https://github.com/XanthanL/dsh-plugin-uisfx#readme): semantic UI sound effects.
227
+ - [dsh-dream-skin](https://github.com/RevolutionLA/dsh-dream-skin#readme): native skins, wallpapers, accent colors, and theme packs.
228
+ - [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI): a plugin for the dsh-TUI ecosystem.