dsh-xiaomi-tts 3.0.7 → 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 +15 -5
  2. package/README.en.md +191 -160
  3. package/README.md +204 -199
  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 +82 -25
  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 +13510 -2057
  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 +59 -37
  121. package/skills/whale-girl/SKILL.md +51 -0
  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 -0
  168. package/skills/whale-girl/memory/diary.md +3 -0
  169. package/skills/whale-girl/memory/profile.md +24 -0
  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-BbkftxTV.js +0 -658
package/NOTICE CHANGED
@@ -1,5 +1,15 @@
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
- Licensed under the MIT License.
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
+ Licensed under the MIT License.
6
+
7
+ Whale-chan character inspiration: DeepSeek Whale-chan Project
8
+ https://github.com/Neko3000/deepseek-whalechan
9
+ Reference revision: 4f59071b75429076c39b37504948efc304f08150
10
+ The upstream project credits the community, Bilibili ZipZipPipe, and 上善无形
11
+ for its character designs. Its specification documents and skill templates
12
+ are licensed under CC-BY-NC-SA 4.0; see the upstream README for attribution
13
+ and character usage terms. This package's dialogue and voice instructions
14
+ are independently written; no upstream images or template files are bundled
15
+ by this preset update.
package/README.en.md CHANGED
@@ -1,56 +1,69 @@
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
-
20
- | Settings | Message action |
21
- |:---:|:---:|
22
- | ![Plugin settings](assets/setting.png) | ![Read-aloud action in a conversation](assets/image.png) |
23
-
24
- ## ✨ Features
25
-
26
- - One-click read-aloud action on assistant messages.
27
- - Low-latency PCM streaming for `mimo-v2.5-tts`, with complete-audio or browser-speech fallback when appropriate.
28
- - Official built-in voices and text-described custom voices through `mimo-v2.5-tts-voicedesign`.
29
- - MiMo-first, local-first, or MiMo-only speech strategies.
30
- - Smart, full, and first-segment read-aloud ranges.
31
- - 0.5×–2.0× playback speed, voice volume, pause, resume, and stop controls.
32
- - Text preparation that removes URLs, paths, code blocks, emoji, and control characters before synthesis.
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.
33
47
  - Optional task and semantic click sounds, disabled by default.
34
- - An optional PCM playback service for other DSH Web plugins.
35
-
36
- ## 📋 Requirements
37
-
38
- - `@deepseek-ai/dsh` `0.2.0-rc.1` (the current target; compatible with `0.1.7-rc.1` through `0.2.x` releases)
39
- - Node.js 22+
40
- - A Xiaomi MiMo API key for MiMo speech
41
- - [Official TTS API documentation](https://mimo.mi.com/models/zh-CN/mimo-v2.5-tts)
42
-
43
- ## 🚀 Installation
44
-
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
+
45
60
  ### Official installation (desktop/web) (recommended)
46
61
 
47
62
  Open the desktop or web client, go to the Plugin Manager, and search for `dsh-xiaomi-tts`.
48
63
 
49
- ![Installation example](assets/install.png)
50
-
51
64
  ### Install from npm (web)
52
-
53
- ```bash
65
+
66
+ ```bash
54
67
  dsh plugin --profile web add dsh-xiaomi-tts@latest
55
68
  ```
56
69
 
@@ -63,128 +76,146 @@ The plugin is published to npm. In DSH Web's sidebar, open the Plugin Manager, c
63
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**.
64
77
 
65
78
  **Sidebar → Plugins → dsh-xiaomi-tts → Text To Speech (MiMo TTS)**
66
-
67
- ## 🐋 First use
68
-
69
- New installations start with:
70
-
71
- - the manual Read aloud action available;
72
- - **automatic playback disabled**;
73
- - **UI sound effects disabled**;
74
- - browser-local fallback available under the default MiMo-first strategy, even before a MiMo key is saved.
75
-
76
- Recommended setup order:
77
-
78
- 1. [Create a Xiaomi MiMo API key](https://platform.xiaomimimo.com/console/api-keys).
79
- 2. Enter it in the plugin settings and click **Save**.
80
- 3. Open Mixing Console and choose a model and voice.
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.
81
94
  4. Test it in Broadcast Studio.
82
95
  5. Enable automatic playback and UI sounds only if wanted, then save again.
83
-
84
- ## ⚙️ Configuration
85
-
86
- ### Official built-in voices
87
-
88
- `mimo-v2.5-tts` currently provides:
89
-
90
- - Chinese female: `冰糖`, `茉莉`
91
- - Chinese male: `苏打`, `白桦`
92
- - English female: `Mia`, `Chloe`
93
- - English male: `Milo`, `Dean`
94
-
95
- ### Custom voices
96
-
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
+
97
110
  `mimo-v2.5-tts-voicedesign` generates a voice from a description. The settings panel includes presets and an editable custom description:
98
-
99
- ### Browser-local speech
100
-
101
- - **MiMo first**: tries browser speech if MiMo fails before audio starts.
102
- - **Local first**: uses browser speech first, then tries MiMo if local speech fails.
103
- - **Disable local speech**: uses MiMo only.
104
-
105
- 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.
106
-
107
- ### Read-aloud range
108
-
109
- - **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.
110
- - **Full mode**: automatic and manual playback both read the full reply.
111
- - **First-segment mode**: automatic and manual playback both read only the opening segment.
112
-
113
- 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.
114
-
111
+
112
+ ### Browser-local speech
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
+
115
130
  ## 🔌 Third-party plugin integration
116
131
 
117
132
  ![whale-girls](assets/whale-girls.webp)
118
133
 
119
134
  The plugin exposes an optional PCM streaming service to Web plugins:
120
-
121
- ```ts
122
- ctx.get('xiaomiMimoTts')?.play('Welcome back')
123
- ```
124
-
125
- 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.
126
-
127
- For TypeScript types:
128
-
129
- ```ts
130
- import type { XiaomiMimoTtsService } from 'dsh-xiaomi-tts/client-api'
131
-
132
- const tts = ctx.get('xiaomiMimoTts') as XiaomiMimoTtsService | undefined
133
- tts?.play('Welcome back')
134
- ```
135
-
136
- ## 🔒 Privacy and network access
137
-
138
- - 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.
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.
139
162
  - Browser-local speech uses the Web Speech API. Voices marked online may send text to browser, operating-system, or network speech services.
140
- - Audio plays from browser memory through Web Audio or temporary Blob URLs; the plugin does not intentionally persist generated audio.
141
- - The sound core is migrated from [uisfx 0.4.0](https://github.com/romainsimon/uisfx) under the MIT License; see `NOTICE`.
142
-
143
- ## 🏗️ Architecture
144
-
145
- - **Shared layer**: defaults, text processing, segmentation, SSE, and playback contracts.
146
- - **Host plugin**: settings and static assets, plus complete-audio and PCM streaming proxies for MiMo.
147
- - **Web Client**: settings, message actions, browser-speech fallback, previews, and the optional third-party playback service.
148
-
149
- ```mermaid
150
- flowchart LR
151
- DSH["DSH Web"] --> CLIENT["Web Client<br/>Settings and playback"]
152
- THIRD["Third-party Web plugin"] -. "ctx.get('xiaomiMimoTts')" .-> CLIENT
153
- CLIENT -->|"Complete audio / PCM stream"| HOST["Host plugin<br/>Settings and API proxy"]
154
- HOST --> MIMO["Xiaomi MiMo API"]
155
- CLIENT -->|"Web Speech API"| SPEECH["Browser / system speech service"]
156
- SHARED["Shared layer<br/>Configuration, text, SSE"] -.-> CLIENT
157
- SHARED -.-> HOST
158
- ```
159
-
160
- ## 🛠️ Development
161
-
162
- ```bash
163
- pnpm install
164
- pnpm dev
165
- ```
166
-
167
- `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.
168
-
169
- Common checks:
170
-
171
- ```bash
172
- pnpm typecheck
173
- pnpm test
174
- pnpm dev:build
175
- pnpm pack:check
176
- ```
177
-
178
- - `pnpm build`: normal build.
179
- - `pnpm build:debug`: build with PCM-path debug logging enabled.
180
- - `pnpm profile:check`: verify the installation in the local DSH Web profile.
181
-
182
- 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:
183
-
184
- ```powershell
185
- .\start\dsh-plugin-reinstall.bat 3.0.7
186
- ```
187
-
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
+
188
219
  ## 🤝 Recommended
189
220
 
190
221
  > The Whale Maid artwork is inspired by community projects and generated with GPT.