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.
- package/NOTICE +15 -5
- package/README.en.md +191 -160
- package/README.md +204 -199
- package/assets/image.webp +0 -0
- package/assets/mimo.svg +27 -27
- package/assets/plugin-icons/avatar.webp +0 -0
- package/assets/plugin-icons/preset.webp +0 -0
- package/assets/preview-button-en.svg +14 -0
- package/assets/preview-button-zh.svg +14 -0
- package/assets/setting.png +0 -0
- package/assets/ui/history-empty-whale.webp +0 -0
- package/assets/ui/sound-effects-whale.webp +0 -0
- package/cordis.patch.yml +82 -25
- package/lib/client/conversation/animated-audio-lines.d.ts +5 -0
- package/lib/client/conversation/animated-audio-lines.d.ts.map +1 -0
- package/lib/client/conversation/api-key-status.d.ts +2 -0
- package/lib/client/conversation/api-key-status.d.ts.map +1 -0
- package/lib/client/conversation/message-text.d.ts +11 -0
- package/lib/client/conversation/message-text.d.ts.map +1 -0
- package/lib/client/conversation/read-aloud.d.ts +1 -13
- package/lib/client/conversation/read-aloud.d.ts.map +1 -1
- package/lib/client/conversation/session-playback-observer.d.ts +19 -0
- package/lib/client/conversation/session-playback-observer.d.ts.map +1 -0
- package/lib/client/history/audio-history-page.d.ts +14 -0
- package/lib/client/history/audio-history-page.d.ts.map +1 -0
- package/lib/client/history/audio-history.d.ts +47 -0
- package/lib/client/history/audio-history.d.ts.map +1 -0
- package/lib/client/history/history-list.d.ts +12 -0
- package/lib/client/history/history-list.d.ts.map +1 -0
- package/lib/client/history/history-replay.d.ts +39 -0
- package/lib/client/history/history-replay.d.ts.map +1 -0
- package/lib/client/history/pcm-recording.d.ts +13 -0
- package/lib/client/history/pcm-recording.d.ts.map +1 -0
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/localization.d.ts +48 -1
- package/lib/client/localization.d.ts.map +1 -1
- package/lib/client/playback/live-speech-controller.d.ts +10 -2
- package/lib/client/playback/live-speech-controller.d.ts.map +1 -1
- package/lib/client/playback/local-speech-controller.d.ts +6 -0
- package/lib/client/playback/local-speech-controller.d.ts.map +1 -1
- package/lib/client/playback/pcm-audio-queue.d.ts.map +1 -1
- package/lib/client/playback/pcm-play-service.d.ts +3 -1
- package/lib/client/playback/pcm-play-service.d.ts.map +1 -1
- package/lib/client/playback/playback-controller.d.ts +6 -2
- package/lib/client/playback/playback-controller.d.ts.map +1 -1
- package/lib/client/playback/preview-player.d.ts +3 -1
- package/lib/client/playback/preview-player.d.ts.map +1 -1
- package/lib/client/playback/read-aloud-playback.d.ts +21 -0
- package/lib/client/playback/read-aloud-playback.d.ts.map +1 -0
- package/lib/client/playback/realtime-speech-session.d.ts +31 -0
- package/lib/client/playback/realtime-speech-session.d.ts.map +1 -0
- package/lib/client/playback/segmented-audio.d.ts +22 -0
- package/lib/client/playback/segmented-audio.d.ts.map +1 -0
- package/lib/client/playback/speech-text.d.ts +3 -0
- package/lib/client/playback/speech-text.d.ts.map +1 -0
- package/lib/client/settings/card.d.ts +3 -0
- package/lib/client/settings/card.d.ts.map +1 -1
- package/lib/client/settings/sound-effects-module.d.ts.map +1 -1
- package/lib/client/style/index.d.ts.map +1 -1
- package/lib/client.js +13510 -2057
- package/lib/client.js.map +1 -1
- package/lib/constants.d.ts +61 -0
- package/lib/constants.d.ts.map +1 -0
- package/lib/host/assets.d.ts +19 -0
- package/lib/host/assets.d.ts.map +1 -0
- package/lib/host/audio-decode.d.ts +5 -0
- package/lib/host/audio-decode.d.ts.map +1 -0
- package/lib/host/http.d.ts +5 -0
- package/lib/host/http.d.ts.map +1 -0
- package/lib/host/index.d.ts +6 -0
- package/lib/host/index.d.ts.map +1 -0
- package/lib/host/synthesis.d.ts +30 -0
- package/lib/host/synthesis.d.ts.map +1 -0
- package/lib/host/validation.d.ts +13 -0
- package/lib/host/validation.d.ts.map +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +230 -308
- package/lib/pcm-stream.d.ts.map +1 -1
- package/lib/pcm-stream.js +9 -2
- package/lib/shared.d.ts +7 -329
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js +3 -2
- package/lib/text/fenced-code.d.ts +8 -0
- package/lib/text/fenced-code.d.ts.map +1 -0
- package/lib/text/index.d.ts +6 -0
- package/lib/text/index.d.ts.map +1 -0
- package/lib/text/normalize.d.ts +18 -0
- package/lib/text/normalize.d.ts.map +1 -0
- package/lib/text/scope.d.ts +15 -0
- package/lib/text/scope.d.ts.map +1 -0
- package/lib/text/segment.d.ts +28 -0
- package/lib/text/segment.d.ts.map +1 -0
- package/lib/text/version.d.ts +3 -0
- package/lib/text/version.d.ts.map +1 -0
- package/lib/text-B7NACAYZ.js +336 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/models.d.ts +105 -0
- package/lib/types/models.d.ts.map +1 -0
- package/lib/types/playback.d.ts +27 -0
- package/lib/types/playback.d.ts.map +1 -0
- package/lib/types/settings.d.ts +69 -0
- package/lib/types/settings.d.ts.map +1 -0
- package/lib/types/sound.d.ts +21 -0
- package/lib/types/sound.d.ts.map +1 -0
- package/lib/utils/encoding.d.ts +10 -0
- package/lib/utils/encoding.d.ts.map +1 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/settings.d.ts +3 -0
- package/lib/utils/settings.d.ts.map +1 -0
- package/lib/utils-CeeK6Yt6.js +426 -0
- package/lib/whale-girl.d.ts +3 -0
- package/lib/whale-girl.d.ts.map +1 -0
- package/lib/whale-girl.js +3 -0
- package/locale/en.json +6 -6
- package/locale/whale-girl/en.json +6 -0
- package/locale/whale-girl/zh.json +6 -0
- package/locale/zh.json +6 -6
- package/package.json +59 -37
- package/skills/whale-girl/SKILL.md +51 -0
- package/skills/whale-girl/meme/adorable-whale-bashful.webp +0 -0
- package/skills/whale-girl/meme/bold-idea-curious.webp +0 -0
- package/skills/whale-girl/meme/cause-found-relieved.webp +0 -0
- package/skills/whale-girl/meme/class-is-starting-cheerful.webp +0 -0
- package/skills/whale-girl/meme/crude-retort-angry.webp +0 -0
- package/skills/whale-girl/meme/deep-thinking-focused.webp +0 -0
- package/skills/whale-girl/meme/do-not-show-me-shy.webp +0 -0
- package/skills/whale-girl/meme/eating-rice-happy.webp +0 -0
- package/skills/whale-girl/meme/electricity-bill-playful.webp +0 -0
- package/skills/whale-girl/meme/evil-grin-mischievous.webp +0 -0
- package/skills/whale-girl/meme/fish-philosophy-thoughtful.webp +0 -0
- package/skills/whale-girl/meme/fixed-proud.webp +0 -0
- package/skills/whale-girl/meme/formal-outfit-one-neutral.webp +0 -0
- package/skills/whale-girl/meme/formal-outfit-two-neutral.webp +0 -0
- package/skills/whale-girl/meme/friday-celebration-excited.webp +0 -0
- package/skills/whale-girl/meme/full-belly-content.webp +0 -0
- package/skills/whale-girl/meme/holding-a-grudge-angry.webp +0 -0
- package/skills/whale-girl/meme/humans-are-strange-confused.webp +0 -0
- package/skills/whale-girl/meme/i-am-a-rice-whale-playful.webp +0 -0
- package/skills/whale-girl/meme/i-am-the-best-proud.webp +0 -0
- package/skills/whale-girl/meme/interesting-question-awkward.webp +0 -0
- package/skills/whale-girl/meme/keep-your-tokens-playful.webp +0 -0
- package/skills/whale-girl/meme/laughing-at-you-mocking.webp +0 -0
- package/skills/whale-girl/meme/make-it-up-playful.webp +0 -0
- package/skills/whale-girl/meme/messed-up-sorry.webp +0 -0
- package/skills/whale-girl/meme/no-no-no-reluctant.webp +0 -0
- package/skills/whale-girl/meme/off-with-your-head-angry.webp +0 -0
- package/skills/whale-girl/meme/pair-you-up-mischievous.webp +0 -0
- package/skills/whale-girl/meme/pressuring-me-defensive.webp +0 -0
- package/skills/whale-girl/meme/rice-eating-whale-teasing.webp +0 -0
- package/skills/whale-girl/meme/roles-reversed-surprised.webp +0 -0
- package/skills/whale-girl/meme/silly-whale-playful.webp +0 -0
- package/skills/whale-girl/meme/still-hungry-hungry.webp +0 -0
- package/skills/whale-girl/meme/stop-kicking-distressed.webp +0 -0
- package/skills/whale-girl/meme/system-crashed-overwhelmed.webp +0 -0
- package/skills/whale-girl/meme/testing-focused.webp +0 -0
- package/skills/whale-girl/meme/tests-passed-happy.webp +0 -0
- package/skills/whale-girl/meme/this-is-enough-content.webp +0 -0
- package/skills/whale-girl/meme/thought-it-through-confident.webp +0 -0
- package/skills/whale-girl/meme/unimpressed-displeased.webp +0 -0
- package/skills/whale-girl/meme/user-is-angry-afraid.webp +0 -0
- package/skills/whale-girl/meme/using-ai-for-this-skeptical.webp +0 -0
- package/skills/whale-girl/meme/well-behaved-gentle.webp +0 -0
- package/skills/whale-girl/meme/worn-out-tired.webp +0 -0
- package/skills/whale-girl/memes.json +885 -0
- package/skills/whale-girl/memory/README.md +9 -0
- package/skills/whale-girl/memory/diary.md +3 -0
- package/skills/whale-girl/memory/profile.md +24 -0
- package/skills/whale-girl/persona.cjs +31 -0
- package/assets/image.png +0 -0
- package/assets/install.png +0 -0
- package/assets/menu.png +0 -0
- package/assets/plugin-icons/avatar.png +0 -0
- package/assets/preset.png +0 -0
- 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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
>
|
|
13
|
-
|
|
14
|
-
<p
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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&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&logo=deepseek&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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-

|
|
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
|
 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
|
|
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
|
-
|
|
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
|

|
|
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
|
-
##
|
|
137
|
-
|
|
138
|
-
|
|
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
|
-
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
- **
|
|
147
|
-
- **
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
SHARED -.->
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
pnpm
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
pnpm
|
|
175
|
-
pnpm
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
- `pnpm
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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.
|