dsh-xiaomi-tts 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +58 -27
- package/README.md +5 -9
- package/assets/preset.png +0 -0
- package/assets/voice-presets/asmr-whisper.webp +0 -0
- package/assets/voice-presets/documentary-narrator.webp +0 -0
- package/assets/voice-presets/energetic-girl.webp +0 -0
- package/assets/voice-presets/gentle-girlfriend.webp +0 -0
- package/assets/voice-presets/girl-next-door.webp +0 -0
- package/assets/voice-presets/news-anchor.webp +0 -0
- package/assets/voice-presets/suspense-narrator.webp +0 -0
- package/assets/voice-presets/tech-explainer.webp +0 -0
- package/assets/voice-presets/young-man.webp +0 -0
- package/cordis.patch.yml +2 -2
- package/lib/client/index.d.ts +4 -2
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client.js +383 -98
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +30 -1
- package/lib/{shared-BW0MDw4T.js → shared-DQA9zfpt.js} +46 -33
- package/lib/shared.d.ts +46 -27
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js +2 -2
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<p><a href="README.md"><strong>中文说明 →</strong></a></p>
|
|
4
4
|
|
|
5
|
-
Xiaomi MiMo
|
|
5
|
+
Add Xiaomi MiMo TTS read-aloud playback to assistant replies in DeepSeek Harness Web.
|
|
6
6
|
|
|
7
7
|
> Powered by Xiaomi MiMo TTS models to turn assistant replies into smooth, clear natural speech. MiMo TTS is currently free for a limited time; refer to Xiaomi MiMo for the current policy.
|
|
8
8
|
|
|
@@ -16,72 +16,103 @@ Xiaomi MiMo text-to-speech controls for finalized assistant messages in DeepSeek
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
- Uses Xiaomi MiMo's currently
|
|
19
|
+
- Shows a read-aloud button below each completed assistant reply body when needed; enabled by default.
|
|
20
|
+
- Uses Xiaomi MiMo's currently limited-time-free TTS models: `mimo-v2.5-tts` outputs smooth, clear audio; preset-voice autoplay uses streaming PCM16, while manual playback uses MP3 or WAV.
|
|
21
21
|
- Uses `mimo-v2.5-tts-voicedesign` Voice Design to create the voice you want from a text description.
|
|
22
|
-
-
|
|
23
|
-
- Keeps the API key on the DSH Host. The browser sends only the
|
|
24
|
-
- Supports pause, resume, regeneration,
|
|
25
|
-
-
|
|
22
|
+
- Lets you switch between the preset-voice model and the custom voice-design model under **Settings → Plugins → Plugin configuration**, and configure the API key, autoplay, voice, voice description, and format.
|
|
23
|
+
- Keeps the API key on the DSH Host. The browser sends only the reply body text to a same-origin Host route.
|
|
24
|
+
- Supports pause, resume, regeneration, and autoplay-blocked prompts. Automatic playback only triggers for the latest reply newly completed in the current run; opening messages from history does not play them.
|
|
25
|
+
- Aggressively cleans speech text before sending it to TTS: URLs, file paths, code blocks, emoji, icons, and control characters are removed, and common Chinese punctuation is converted to ASCII punctuation.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- `@deepseek-ai/dsh` `0.1.0-rc.7` or a compatible version
|
|
30
|
+
- Node.js 22+
|
|
31
|
+
- Xiaomi MiMo API Key
|
|
32
|
+
|
|
33
|
+
Official Xiaomi MiMo TTS API reference: <https://mimo.mi.com/static/docs/api/audio/tts.md>
|
|
28
34
|
|
|
29
35
|
## Install
|
|
30
36
|
|
|
37
|
+
Install from npm:
|
|
38
|
+
|
|
31
39
|
```bash
|
|
32
40
|
dsh plugin --profile web add dsh-xiaomi-tts
|
|
33
41
|
```
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
Install from a local directory:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
dsh plugin --profile web add ./dsh-plugin-xiaomi-mimo-tts
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Install from GitHub:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After installation, restart `dsh web`, then open **Settings → Plugins → Plugin configuration → Xiaomi MiMo Read Aloud**, enter the API key, and save.
|
|
36
56
|
|
|
37
57
|
When updating or switching from the local development link to the npm package, stop DSH Web before changing the profile dependencies. This prevents a running Node process from holding the Windows Junction that pnpm needs to replace:
|
|
38
58
|
|
|
39
59
|
```powershell
|
|
40
|
-
.\start\dsh-plugin-reinstall.bat 2.
|
|
60
|
+
.\start\dsh-plugin-reinstall.bat 2.3.0
|
|
41
61
|
```
|
|
42
62
|
|
|
43
|
-
The script stops DSH Web, removes the plugin from the
|
|
63
|
+
The script stops DSH Web, removes the current plugin from the profile, installs the requested npm version, and starts DSH Web again. If you run the steps manually, keep the same order:
|
|
44
64
|
|
|
45
65
|
```powershell
|
|
46
66
|
.\start\dsh-web-stop.bat
|
|
47
67
|
dsh plugin --profile web remove dsh-xiaomi-tts
|
|
48
|
-
dsh plugin --profile web add dsh-xiaomi-tts@2.
|
|
68
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.0
|
|
49
69
|
.\start\dsh-web-start.bat
|
|
50
70
|
```
|
|
51
71
|
|
|
52
|
-
|
|
72
|
+
## Configuration
|
|
53
73
|
|
|
54
|
-
|
|
74
|
+
Available built-in voices for `mimo-v2.5-tts`:
|
|
55
75
|
|
|
56
|
-
|
|
76
|
+
- Chinese female: `冰糖`, `茉莉`
|
|
77
|
+
- Chinese male: `苏打`, `白桦`
|
|
78
|
+
- English female: `Mia`, `Chloe`
|
|
79
|
+
- English male: `Milo`, `Dean`
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
Custom voice design with `mimo-v2.5-tts-voicedesign`
|
|
59
82
|
|
|
60
|
-
|
|
83
|
+
The plugin provides common voice-description templates. The selector defaults to **Custom**, so users can edit and save the description directly. After switching to another template and back to **Custom**, the previously saved custom content is restored.
|
|
61
84
|
|
|
62
|
-
|
|
85
|
+
```text
|
|
86
|
+
Young adult woman, bright and approachable voice, clear articulation, moderate pace, gentle and restrained emotional tone.
|
|
87
|
+
```
|
|
63
88
|
|
|
64
|
-
|
|
89
|
+
It is recommended to describe age and gender, vocal texture, speaking pace, and emotional baseline, while avoiding scenes or actions. Preset-voice mode still uses the built-in voice configuration.
|
|
65
90
|
|
|
66
|
-
|
|
91
|
+
Browsers may block autoplay. If that happens, click the read-aloud button first.
|
|
67
92
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
pnpm test
|
|
72
|
-
pnpm pack:check
|
|
73
|
-
```
|
|
93
|
+
### Speech text preprocessing
|
|
94
|
+
|
|
95
|
+
Read-aloud uses only the cleaned reply body and does not modify the assistant message shown in the chat. Markdown links keep their readable labels while their targets are removed; URLs, file paths, complete code blocks, emoji, icons, zero-width characters, and control characters are not sent to Xiaomi MiMo. Parentheses, brackets, book-title marks, quotation marks, and other non-boundary punctuation are removed; retained sentence-boundary punctuation is converted to ASCII. Streaming playback accumulates at least 20 speakable characters, then sends any remaining shorter text when the reply ends.
|
|
74
96
|
|
|
75
97
|
## Privacy
|
|
76
98
|
|
|
77
99
|
- The API key stays on the DSH Host and is never sent to the browser.
|
|
78
|
-
-
|
|
100
|
+
- Reply text is sent to Xiaomi MiMo when speech is generated.
|
|
79
101
|
- Audio is played through a temporary Blob URL and is not persisted to disk.
|
|
80
102
|
|
|
81
103
|
## Feedback and support
|
|
82
104
|
|
|
83
105
|
Please use [GitHub Issues](https://github.com/ppy-web/dsh-plugin-xiaomi-mimo-tts/issues) for bug reports, feature requests, or feedback.
|
|
84
106
|
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pnpm install
|
|
111
|
+
pnpm typecheck
|
|
112
|
+
pnpm test
|
|
113
|
+
pnpm pack:check
|
|
114
|
+
```
|
|
115
|
+
|
|
85
116
|
## License
|
|
86
117
|
|
|
87
118
|
MIT
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
|
57
57
|
更新或从本地开发版切换到 npm 版时,必须先停止 DSH Web,避免 Windows Junction 被运行中的 Node 进程占用:
|
|
58
58
|
|
|
59
59
|
```powershell
|
|
60
|
-
.\start\dsh-plugin-reinstall.bat 2.
|
|
60
|
+
.\start\dsh-plugin-reinstall.bat 2.3.0
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
这个脚本会按顺序停止 DSH Web、卸载当前 profile 中的插件、从 npm 安装指定版本并重新启动 DSH Web。若手动操作,请保持相同顺序:
|
|
@@ -65,7 +65,7 @@ dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
|
65
65
|
```powershell
|
|
66
66
|
.\start\dsh-web-stop.bat
|
|
67
67
|
dsh plugin --profile web remove dsh-xiaomi-tts
|
|
68
|
-
dsh plugin --profile web add dsh-xiaomi-tts@2.
|
|
68
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.0
|
|
69
69
|
.\start\dsh-web-start.bat
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -78,9 +78,9 @@ dsh plugin --profile web add dsh-xiaomi-tts@2.2.1
|
|
|
78
78
|
- 英文女声:`Mia`、`Chloe`
|
|
79
79
|
- 英文男声:`Milo`、`Dean`
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
自定义音色(`mimo-v2.5-tts-voicedesign`)
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
为你提供了常用音色描述模板;下拉框默认选择“自定义”,用户可以直接修改并保存描述。切换到其他模板后再切回“自定义”时,会恢复之前保存的自定义内容。
|
|
84
84
|
|
|
85
85
|
```text
|
|
86
86
|
青年女性,声线清亮、亲切自然,吐字清楚,语速适中,情绪温柔克制。
|
|
@@ -88,11 +88,7 @@ dsh plugin --profile web add dsh-xiaomi-tts@2.2.1
|
|
|
88
88
|
|
|
89
89
|
建议包含年龄段与性别、声音质感、语速节奏和情绪底色,不写场景或动作。预置音色模式仍使用原来的内置音色配置。
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
配置项包括 API Key、朗读按钮、自动播报、模型、内置音色、音色描述和音频格式。两个开关默认开启;关闭朗读按钮会同步关闭自动播报,开启自动播报会自动开启朗读按钮。
|
|
94
|
-
|
|
95
|
-
浏览器可能阻止自动播放;遇到这种情况,请点击回复下方的朗读按钮。
|
|
91
|
+
浏览器可能阻止自动播放;遇到这种情况,请先尝试点击朗读按钮。
|
|
96
92
|
|
|
97
93
|
### 朗读文本处理
|
|
98
94
|
|
package/assets/preset.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cordis.patch.yml
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
voice: '冰糖'
|
|
12
12
|
voiceDesignPrompt: '青年女性,声线清亮、亲切自然,吐字清楚,语速适中,情绪温柔克制。'
|
|
13
13
|
voiceDesignCustomPrompt: '青年女性,声线清亮、亲切自然,吐字清楚,语速适中,情绪温柔克制。'
|
|
14
|
-
presetStylePrompt: '
|
|
14
|
+
presetStylePrompt: '使用清晰、自然、准确的声音朗读,语速适中,停顿自然,语气平和克制,避免夸张表达。'
|
|
15
15
|
format: 'mp3'
|
|
16
16
|
autoPlay: true
|
|
17
|
-
instruction: '
|
|
17
|
+
instruction: '请忠实朗读原文,根据文本语气自然表达,不添加或改写内容。'
|
|
18
18
|
maxTextLength: 12000
|
|
19
19
|
requestTimeoutMs: 120000
|
package/lib/client/index.d.ts
CHANGED
|
@@ -22,12 +22,14 @@ declare const zh: {
|
|
|
22
22
|
readonly 'settings.autoPlay': "开启自动播报";
|
|
23
23
|
readonly 'settings.autoPlayHint': "开启时会同步显示朗读按钮;浏览器也可能拒绝自动播放。";
|
|
24
24
|
readonly 'settings.model': "TTS 模型";
|
|
25
|
-
readonly 'settings.presetModel': "预置音色模型";
|
|
26
|
-
readonly 'settings.voiceDesignModel': "自定义音色模型";
|
|
25
|
+
readonly 'settings.presetModel': "预置音色模型 (mimo-v2.5-tts)";
|
|
26
|
+
readonly 'settings.voiceDesignModel': "自定义音色模型 (mimo-v2.5-tts-voicedesign)";
|
|
27
27
|
readonly 'settings.modelAutoPlayHintPreset': "预置音色模型支持实时流式播放。";
|
|
28
28
|
readonly 'settings.modelAutoPlayHintVoiceDesign': "自定义音色仅支持在回复完成后自动播放。";
|
|
29
29
|
readonly 'settings.voice': "内置音色";
|
|
30
30
|
readonly 'settings.voiceDesignPrompt': "自定义音色描述";
|
|
31
|
+
readonly 'settings.customVoiceOption': "自定义";
|
|
32
|
+
readonly 'settings.customVoiceSummary': "手动编写音色描述";
|
|
31
33
|
readonly 'settings.voiceDesignPromptHint': "按“年龄段 + 性别、声音质感、语速节奏、情绪底色”描述声音本身;不写场景或动作。";
|
|
32
34
|
readonly 'settings.format': "音频格式";
|
|
33
35
|
readonly 'settings.save': "保存";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAuC,MAAM,wCAAwC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAuC,MAAM,wCAAwC,CAAA;AAuBhH,+CAA+C;AAC/C,eAAO,MAAM,MAAM,UAMlB,CAAA;AAiBD,QAAA,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CE,CAAA;AA+CV,KAAK,SAAS,GAAG,MAAM,OAAO,EAAE,CAAA;AAIhC,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,iBAAiB,EAAE,SAAS,CAAA;KAC7B;CACF;AAotCD,+EAA+E;AAC/E,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAwD9C"}
|