dsh-xiaomi-tts 3.0.9 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +45 -21
- package/README.md +40 -18
- package/lib/client/conversation/api-key-status.d.ts +4 -1
- package/lib/client/conversation/api-key-status.d.ts.map +1 -1
- package/lib/client/conversation/read-aloud.d.ts.map +1 -1
- package/lib/client/conversation/session-playback-observer.d.ts.map +1 -1
- package/lib/client/history/audio-history.d.ts +2 -0
- package/lib/client/history/audio-history.d.ts.map +1 -1
- package/lib/client/history/history-replay.d.ts +1 -0
- package/lib/client/history/history-replay.d.ts.map +1 -1
- package/lib/client/history/pcm-recording.d.ts +1 -0
- package/lib/client/history/pcm-recording.d.ts.map +1 -1
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/localization.d.ts +96 -17
- package/lib/client/localization.d.ts.map +1 -1
- package/lib/client/playback/duplex-pcm.d.ts +37 -0
- package/lib/client/playback/duplex-pcm.d.ts.map +1 -0
- package/lib/client/playback/live-speech-controller.d.ts +18 -1
- package/lib/client/playback/live-speech-controller.d.ts.map +1 -1
- package/lib/client/playback/pcm-audio-queue.d.ts +1 -0
- package/lib/client/playback/pcm-audio-queue.d.ts.map +1 -1
- package/lib/client/playback/pcm-play-service.d.ts.map +1 -1
- package/lib/client/playback/playback-controller.d.ts +3 -0
- package/lib/client/playback/playback-controller.d.ts.map +1 -1
- package/lib/client/playback/preview-player.d.ts +8 -2
- package/lib/client/playback/preview-player.d.ts.map +1 -1
- package/lib/client/playback/read-aloud-playback.d.ts.map +1 -1
- package/lib/client/playback/realtime-speech-session.d.ts.map +1 -1
- package/lib/client/settings/api-key-module.d.ts +4 -1
- package/lib/client/settings/api-key-module.d.ts.map +1 -1
- package/lib/client/settings/card.d.ts.map +1 -1
- package/lib/client/settings/cloned-voice-history.d.ts +6 -0
- package/lib/client/settings/cloned-voice-history.d.ts.map +1 -0
- package/lib/client/settings/controls/built-in-voice-picker.d.ts +11 -0
- package/lib/client/settings/controls/built-in-voice-picker.d.ts.map +1 -1
- package/lib/client/settings/controls/cloned-voice-input.d.ts +9 -0
- package/lib/client/settings/controls/cloned-voice-input.d.ts.map +1 -0
- package/lib/client/settings/controls/doubao-instruction-picker.d.ts +10 -0
- package/lib/client/settings/controls/doubao-instruction-picker.d.ts.map +1 -0
- package/lib/client/settings/controls/doubao-voice-picker.d.ts +10 -0
- package/lib/client/settings/controls/doubao-voice-picker.d.ts.map +1 -0
- package/lib/client/settings/controls/field-info.d.ts +6 -0
- package/lib/client/settings/controls/field-info.d.ts.map +1 -0
- package/lib/client/settings/details-module.d.ts +11 -1
- package/lib/client/settings/details-module.d.ts.map +1 -1
- package/lib/client/settings/field-heading.d.ts +1 -1
- package/lib/client/settings/field-heading.d.ts.map +1 -1
- package/lib/client/settings/preview-module.d.ts.map +1 -1
- package/lib/client/settings/save-settings.d.ts +11 -0
- package/lib/client/settings/save-settings.d.ts.map +1 -0
- package/lib/client/settings/types.d.ts +2 -2
- package/lib/client/settings/types.d.ts.map +1 -1
- package/lib/client.js +1559 -263
- package/lib/client.js.map +1 -1
- package/lib/constants.d.ts +3 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/doubao-voices.d.ts +14 -0
- package/lib/doubao-voices.d.ts.map +1 -0
- package/lib/host/doubao-protocol.d.ts +31 -0
- package/lib/host/doubao-protocol.d.ts.map +1 -0
- package/lib/host/doubao.d.ts +46 -0
- package/lib/host/doubao.d.ts.map +1 -0
- package/lib/host/provider-error.d.ts +15 -0
- package/lib/host/provider-error.d.ts.map +1 -0
- package/lib/host/synthesis-routes.d.ts +7 -0
- package/lib/host/synthesis-routes.d.ts.map +1 -0
- package/lib/host/synthesis.d.ts +5 -0
- package/lib/host/synthesis.d.ts.map +1 -1
- package/lib/host/validation.d.ts +1 -0
- package/lib/host/validation.d.ts.map +1 -1
- package/lib/host/xiaomi.d.ts +5 -0
- package/lib/host/xiaomi.d.ts.map +1 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +718 -295
- package/lib/pcm-stream.d.ts +2 -1
- package/lib/pcm-stream.d.ts.map +1 -1
- package/lib/pcm-stream.js +8 -4
- package/lib/{text-B7NACAYZ.js → shared-uEpRLtw6.js} +173 -2
- package/lib/shared.d.ts +1 -0
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js +3 -3
- package/lib/text/segment.d.ts +1 -0
- package/lib/text/segment.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/providers.d.ts +23 -0
- package/lib/types/providers.d.ts.map +1 -0
- package/lib/types/settings.d.ts +14 -1
- package/lib/types/settings.d.ts.map +1 -1
- package/lib/utils/settings.d.ts.map +1 -1
- package/lib/{utils-CeeK6Yt6.js → utils-CHu9umjx.js} +40 -3
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +26 -23
- package/lib/debug-console-0u5uTAfX.js +0 -6
package/README.en.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
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
12
|
</p>
|
|
13
13
|
|
|
14
|
-
<p align="center">Add Xiaomi MiMo
|
|
14
|
+
<p align="center">Add Xiaomi MiMo and Doubao read-aloud, browser-local fallback speech, and optional UI sounds to DSH Web.</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
17
|
<a href="README.md"><img src="https://img.shields.io/badge/简体中文-64748B?style=for-the-badge" alt="切换到简体中文"></a>
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
> MiMo TTS availability and pricing may change. Check the official Xiaomi MiMo platform for the current policy.
|
|
22
22
|
|
|
23
|
+
> `4.0.0` uses the npm `next` channel. Install with `dsh plugin --profile web add dsh-xiaomi-tts@next`. Stable releases remain available through `@latest`.
|
|
24
|
+
|
|
23
25
|
## 🎨 Preview
|
|
24
26
|
|
|
25
27
|
<p align="center">
|
|
@@ -40,7 +42,9 @@
|
|
|
40
42
|
- One-click read-aloud action on assistant messages.
|
|
41
43
|
- Low-latency PCM streaming for `mimo-v2.5-tts`, with complete-audio or browser-speech fallback when appropriate.
|
|
42
44
|
- Official built-in voices and text-described custom voices through `mimo-v2.5-tts-voicedesign`.
|
|
43
|
-
-
|
|
45
|
+
- Xiaomi / Doubao selection with separate credentials, models and voices.
|
|
46
|
+
- Doubao TTS 2.0 and existing cloned voices 2.0, with continuous text input and streamed audio per message.
|
|
47
|
+
- Cloud-first, local-first, or cloud-only speech strategies.
|
|
44
48
|
- Smart, full, and first-segment read-aloud ranges.
|
|
45
49
|
- 0.5×–2.0× playback speed, voice volume, pause, resume, and stop controls.
|
|
46
50
|
- Text preparation that removes URLs, paths, code blocks, emoji, and control characters before synthesis.
|
|
@@ -50,9 +54,10 @@
|
|
|
50
54
|
|
|
51
55
|
## 📋 Requirements
|
|
52
56
|
|
|
53
|
-
- `@deepseek-ai/dsh` `0.2.1-rc.
|
|
57
|
+
- `@deepseek-ai/dsh` `0.2.1-rc.2` (the current target; compatible with `0.1.7-rc.1` through `0.2.x` releases)
|
|
54
58
|
- Node.js 22+
|
|
55
|
-
-
|
|
59
|
+
- An API key for the selected provider, with access to the selected speech resource.
|
|
60
|
+
- Doubao continuous text input requires a DSH Web Host supporting WebSocket upgrade registration; reverse proxies must forward WebSocket Upgrade.
|
|
56
61
|
- [Official TTS API documentation](https://mimo.mi.com/models/zh-CN/mimo-v2.5-tts)
|
|
57
62
|
|
|
58
63
|
## 🚀 Installation
|
|
@@ -84,19 +89,34 @@ New installations start with:
|
|
|
84
89
|
- the manual Read aloud action available;
|
|
85
90
|
- **automatic playback disabled**;
|
|
86
91
|
- **UI sound effects disabled**;
|
|
87
|
-
- browser-local fallback available under the default
|
|
92
|
+
- browser-local fallback available under the default cloud-first strategy, even before a provider key is saved.
|
|
88
93
|
|
|
89
94
|
Recommended setup order:
|
|
90
95
|
|
|
91
|
-
1.
|
|
92
|
-
2.
|
|
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
|
|
96
|
+
1. Select Xiaomi MiMo or Doubao Voice in the API key module.
|
|
97
|
+
2. [Create a Xiaomi key](https://platform.xiaomimimo.com/console/api-keys) or [a Doubao key](https://console.volcengine.com/speech/new/setting/apikeys?projectName=default), enter it, and click **Save**.
|
|
98
|
+
3. Open Mixing Console and choose a model and voice for that provider.
|
|
99
|
+
4. Test it in Broadcast Studio. Key drafts must be saved first; model and voice drafts can be previewed with the saved key.
|
|
100
|
+
5. Enable automatic playback and UI sounds if wanted, then save again.
|
|
96
101
|
|
|
97
102
|
## ⚙️ Configuration
|
|
98
103
|
|
|
99
|
-
###
|
|
104
|
+
### Providers and Doubao Voice
|
|
105
|
+
|
|
106
|
+
Select Xiaomi MiMo or Doubao in the API key module, then save. Each provider retains its own key, model, and voice settings. Existing configurations default to Xiaomi.
|
|
107
|
+
|
|
108
|
+
| Doubao model | Voice setup |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| Standard TTS (`seed-tts-2.0`) | Choose a built-in voice or enter a standard voice ID. |
|
|
111
|
+
| Voice cloning (`seed-icl-2.0`) | [Create a voice](https://console.volcengine.com/speech/new/experience/clone?projectName=default), then paste its ID into the plugin. |
|
|
112
|
+
|
|
113
|
+
Enable the corresponding Doubao model service and use an API key from the new console. Save the key, then test in Broadcast Studio. A cloned voice ID is required for voice cloning.
|
|
114
|
+
|
|
115
|
+
Speed is applied during synthesis; changes take effect on the next request. Saved recordings retain their original synthesis speed.
|
|
116
|
+
|
|
117
|
+
For more voices, see the [official voice catalog](https://docs.volcengine.com/docs/DoubaoVoice/Tonelist-1?lang=zh).
|
|
118
|
+
|
|
119
|
+
### Xiaomi official built-in voices
|
|
100
120
|
|
|
101
121
|
`mimo-v2.5-tts` currently provides:
|
|
102
122
|
|
|
@@ -111,9 +131,9 @@ Recommended setup order:
|
|
|
111
131
|
|
|
112
132
|
### Browser-local speech
|
|
113
133
|
|
|
114
|
-
- **
|
|
115
|
-
- **Local first**: uses browser speech first, then tries
|
|
116
|
-
- **Disable local speech**: uses
|
|
134
|
+
- **Cloud first**: tries browser speech if the selected cloud provider fails before audio starts.
|
|
135
|
+
- **Local first**: uses browser speech first, then tries the selected cloud provider if local speech fails.
|
|
136
|
+
- **Disable local speech**: uses only the selected cloud provider.
|
|
117
137
|
|
|
118
138
|
Browser voices come from the Web Speech API. Offline availability, language coverage, and actual voice output depend on the browser, operating system, and their speech services.
|
|
119
139
|
|
|
@@ -123,7 +143,9 @@ Browser voices come from the Web Speech API. Offline availability, language cove
|
|
|
123
143
|
- **Full mode**: automatic and manual playback both read the full reply.
|
|
124
144
|
- **First-segment mode**: automatic and manual playback both read only the opening segment.
|
|
125
145
|
|
|
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.
|
|
146
|
+
Xiaomi PCM requests and semantic segments accumulate complete sentences toward 160 spoken characters, with a preferred maximum of 240. An individual long sentence may exceed that maximum, and the final shorter tail is also played. PCM streaming can begin when unfinished prose reaches the target size, without repeating already queued text. History saves one WAV per synthesis slice, combining all PCM data chunks received by that request.
|
|
147
|
+
|
|
148
|
+
Doubao plays audio as the reply is generated and saves one recording per message. Errors after playback starts do not replay the message or switch to another cloud provider.
|
|
127
149
|
|
|
128
150
|
The settings panel supports keyboard navigation: use `Tab` to move focus, arrow keys to adjust sliders and options, and `Space` to activate buttons and switches.
|
|
129
151
|
|
|
@@ -131,7 +153,7 @@ The settings panel supports keyboard navigation: use `Tab` to move focus, arrow
|
|
|
131
153
|
|
|
132
154
|

|
|
133
155
|
|
|
134
|
-
The plugin exposes
|
|
156
|
+
The plugin exposes the selected provider through its existing optional PCM streaming service name:
|
|
135
157
|
|
|
136
158
|
```ts
|
|
137
159
|
ctx.get('xiaomiMimoTts')?.play('Welcome back')
|
|
@@ -158,16 +180,17 @@ The preset keeps file access, web lookup, interactive questions, and conversatio
|
|
|
158
180
|
|
|
159
181
|
## 🔒 Privacy and network access
|
|
160
182
|
|
|
161
|
-
- The DSH Host stores the API key. The browser reads only whether a key is configured and whether its
|
|
183
|
+
- The DSH Host stores the API key. The browser reads only whether a key is configured and whether its format is supported for that provider, not the secret itself.
|
|
184
|
+
- Doubao connections are proxied by the Host. Text and voice IDs go only to the selected provider; the browser never receives the upstream key.
|
|
162
185
|
- Browser-local speech uses the Web Speech API. Voices marked online may send text to browser, operating-system, or network speech services.
|
|
163
|
-
- Generated
|
|
164
|
-
- Streaming PCM is saved as 24 kHz mono WAV.
|
|
186
|
+
- Generated cloud audio is saved in this browser's IndexedDB. Settings → Audio history supports replay, download, deletion, and clearing, including after a page refresh. The latest 100 entries / 100 MB are retained, with oldest entries removed when full. Records include audio and up to 500 characters of text, never API keys.
|
|
187
|
+
- Streaming PCM is saved as 24 kHz mono WAV. Xiaomi batches and generated segments appear separately; Doubao saves one recording per message; only successfully completed generation requests are saved, so cancelled or failed streams are not presented as complete audio. Web Speech API speech has no exportable audio file. Replay and download do not call the speech provider again. History belongs to this browser and site address, does not sync across devices, and is removed when site data is cleared. If browser storage is unavailable or full, the list warns that it lasts only for the current visit.
|
|
165
188
|
- The sound core is migrated from [uisfx 0.4.0](https://github.com/romainsimon/uisfx) under the MIT License; see `NOTICE`.
|
|
166
189
|
|
|
167
190
|
## 🏗️ Architecture
|
|
168
191
|
|
|
169
192
|
- **Shared layer**: defaults, text processing, segmentation, SSE, and playback contracts.
|
|
170
|
-
- **Host plugin**: settings and static assets, plus complete-audio and
|
|
193
|
+
- **Host plugin**: settings and static assets, plus complete-audio, PCM SSE, and duplex WebSocket proxies for Xiaomi and Doubao.
|
|
171
194
|
- **Web Client**: settings, message actions, browser-speech fallback, previews, and the optional third-party playback service.
|
|
172
195
|
|
|
173
196
|
```mermaid
|
|
@@ -176,6 +199,7 @@ flowchart LR
|
|
|
176
199
|
THIRD["Third-party Web plugin"] -. "ctx.get('xiaomiMimoTts')" .-> CLIENT
|
|
177
200
|
CLIENT -->|"Complete audio / PCM stream"| HOST["Host plugin<br/>Settings and API proxy"]
|
|
178
201
|
HOST --> MIMO["Xiaomi MiMo API"]
|
|
202
|
+
HOST -->|"WebSocket bidirectional"| DOUBAO["Doubao Voice API"]
|
|
179
203
|
CLIENT -->|"Web Speech API"| SPEECH["Browser / system speech service"]
|
|
180
204
|
SHARED["Shared layer<br/>Configuration, text, SSE"] -.-> CLIENT
|
|
181
205
|
SHARED -.-> HOST
|
|
@@ -207,7 +231,7 @@ pnpm pack:check
|
|
|
207
231
|
On Windows, stop DSH Web before replacing a local development link with the npm package so the running Node process does not hold the Junction:
|
|
208
232
|
|
|
209
233
|
```powershell
|
|
210
|
-
.\start\dsh-plugin-reinstall.bat
|
|
234
|
+
.\start\dsh-plugin-reinstall.bat 4.0.0
|
|
211
235
|
```
|
|
212
236
|
|
|
213
237
|
For a DSH Desktop profile, close Desktop and remove a stale local link with:
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
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
12
|
</p>
|
|
13
13
|
|
|
14
|
-
<p align="center">为 DSH 添加 Xiaomi MiMo
|
|
14
|
+
<p align="center">为 DSH 添加 Xiaomi MiMo 与豆包语音朗读、浏览器本地语音兜底和可选 UI 音效。</p>
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
17
|
<a href="README.md"><img src="https://img.shields.io/badge/简体中文-4D6BFE?style=for-the-badge" alt="简体中文(当前语言)"></a>
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
> MiMo TTS 当前可能处于限时免费或调整计费阶段,请以 Xiaomi MiMo 官方平台的最新政策为准。
|
|
22
22
|
|
|
23
|
+
> `4.0.0` 使用 npm `next` 渠道,安装命令:`dsh plugin --profile web add dsh-xiaomi-tts@next`。稳定版仍使用 `@latest`。
|
|
24
|
+
|
|
23
25
|
## 🎨 预览
|
|
24
26
|
|
|
25
27
|
<p align="center">
|
|
@@ -40,7 +42,9 @@
|
|
|
40
42
|
- 一键朗读:在助手消息操作栏中提供“朗读”按钮。
|
|
41
43
|
- 低延迟播放:`mimo-v2.5-tts` 支持 PCM 流式播放,并在必要时回退到完整音频或浏览器语音。
|
|
42
44
|
- 内置与自定义音色:支持官方内置音色,以及 `mimo-v2.5-tts-voicedesign` 音色描述。
|
|
43
|
-
-
|
|
45
|
+
- 双服务商:API Key 模块可切换小米 MiMo / 豆包,两家分别保留凭证、模型与音色。
|
|
46
|
+
- 豆包双向流式:标准合成 2.0 / 已有复刻音色 2.0,同一条回复持续追加文本、流式输出音频。
|
|
47
|
+
- 浏览器本地语音:可选择云端优先、本地优先或关闭本地语音。
|
|
44
48
|
- 播放控制:支持 0.5×–2.0× 语速、语音音量、暂停、继续和停止。
|
|
45
49
|
- 文本清洗:朗读前移除网址、路径、代码块、表情符号和控制字符等不适合播报的内容。
|
|
46
50
|
- 可选音效:提供任务状态和语义化点击音效,默认关闭。
|
|
@@ -49,9 +53,10 @@
|
|
|
49
53
|
|
|
50
54
|
## 📋 环境要求
|
|
51
55
|
|
|
52
|
-
- `@deepseek-ai/dsh` `0.2.1-rc.
|
|
56
|
+
- `@deepseek-ai/dsh` `0.2.1-rc.2`(当前目标版本;兼容 `0.1.7-x` 至 `0.2.x` 版本)
|
|
53
57
|
- Node.js 22+
|
|
54
|
-
-
|
|
58
|
+
- 使用云端语音需要对应服务商的 API Key;豆包需要开通所选语音资源。
|
|
59
|
+
- 豆包持续文本输入需要支持 WebSocket upgrade 注册的 DSH Web Host;反向代理需转发 WebSocket Upgrade。
|
|
55
60
|
- [官方 TTS API 文档](https://mimo.mi.com/models/zh-CN/mimo-v2.5-tts)
|
|
56
61
|
|
|
57
62
|
## 🚀 安装
|
|
@@ -86,16 +91,30 @@ dsh plugin --profile web remove dsh-xiaomi-tts
|
|
|
86
91
|
|
|
87
92
|
推荐配置顺序:
|
|
88
93
|
|
|
89
|
-
1.
|
|
90
|
-
2.
|
|
91
|
-
3.
|
|
92
|
-
4. 在“演播厅”试听。
|
|
93
|
-
5. 按需开启自动播报和 UI
|
|
94
|
-
6. 点击底部 **保存**
|
|
94
|
+
1. 在 API Key 模块选择“小米 MiMo”或“豆包语音”。
|
|
95
|
+
2. [获取小米 Key](https://platform.xiaomimimo.com/console/api-keys) 或 [获取豆包 Key](https://console.volcengine.com/speech/new/setting/apikeys?projectName=default),填写后点击 **保存**。
|
|
96
|
+
3. 打开“调音台”,选择当前服务商的模型和音色。
|
|
97
|
+
4. 在“演播厅”试听。Key 草稿需先保存;模型和音色可以在保存前试听。
|
|
98
|
+
5. 按需开启自动播报和 UI 音效,再保存。
|
|
95
99
|
|
|
96
100
|
## ⚙️ 配置说明
|
|
97
101
|
|
|
98
|
-
###
|
|
102
|
+
### 服务商与豆包语音
|
|
103
|
+
|
|
104
|
+
在 API Key 模块切换小米 MiMo / 豆包语音,保存后生效。两家的密钥、模型和音色分别保留;旧配置默认使用小米。
|
|
105
|
+
|
|
106
|
+
| 豆包模型 | 音色配置 |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| 标准合成(`seed-tts-2.0`) | 选择内置音色,或填写标准音色 ID。 |
|
|
109
|
+
| 声音复刻(`seed-icl-2.0`) | [创建一个音色](https://console.volcengine.com/speech/new/experience/clone?projectName=default),将音色 ID 填回插件。 |
|
|
110
|
+
|
|
111
|
+
豆包需开通对应模型服务,使用新版控制台的 API Key。保存密钥后在“演播厅”试听;复刻音色 ID 不能为空。
|
|
112
|
+
|
|
113
|
+
语速在合成时应用,调整后对下一次合成生效;历史录音保留生成时的语速。
|
|
114
|
+
|
|
115
|
+
更多音色参见[官方音色列表](https://docs.volcengine.com/docs/DoubaoVoice/Tonelist-1?lang=zh)。
|
|
116
|
+
|
|
117
|
+
### 小米官方内置音色
|
|
99
118
|
|
|
100
119
|
`mimo-v2.5-tts` 当前提供:
|
|
101
120
|
|
|
@@ -110,9 +129,9 @@ dsh plugin --profile web remove dsh-xiaomi-tts
|
|
|
110
129
|
|
|
111
130
|
### 浏览器本地语音
|
|
112
131
|
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
132
|
+
- **云端优先**:所选云端服务在音频开始前失败时,尝试浏览器语音。
|
|
133
|
+
- **本地优先**:先使用浏览器语音,失败后尝试所选云端服务。
|
|
134
|
+
- **关闭本地语音**:只使用所选云端服务,不进行本地兜底。
|
|
116
135
|
|
|
117
136
|
浏览器音色来自 Web Speech API。是否离线、可用语言和实际声音取决于浏览器、操作系统及其语音服务。
|
|
118
137
|
|
|
@@ -122,13 +141,15 @@ dsh plugin --profile web remove dsh-xiaomi-tts
|
|
|
122
141
|
- **全文模式**:自动播报和手动朗读都播放全文。
|
|
123
142
|
- **首段模式**:自动播报和手动朗读都只播放首个语义段。
|
|
124
143
|
|
|
125
|
-
PCM
|
|
144
|
+
小米 PCM 流式合成与语义分段按约 160 个文字字符累计完整句子,建议上限为 240 字;单个长句可以超过上限,结束时不足一段的尾部也会播放。生成中的未完句积累到目标字数后可以先开始 PCM 播放,已排队的文字不会重复合成。历史音频按合成切片保存,同一请求收到的多个 PCM 数据块会合并为一条 WAV。
|
|
145
|
+
|
|
146
|
+
豆包支持边生成边播放,音频历史按消息保存。已经开始播放后发生错误,不会从头重播或自动切换云端服务。
|
|
126
147
|
|
|
127
148
|
## 🔌 三方插件联动
|
|
128
149
|
|
|
129
150
|

|
|
130
151
|
|
|
131
|
-
本插件向其他
|
|
152
|
+
本插件向其他 DSH 插件提供所选服务商的可选 PCM 流式播放能力,既有服务名称保持兼容:
|
|
132
153
|
|
|
133
154
|
```ts
|
|
134
155
|
ctx.get('xiaomiMimoTts')?.play('欢迎回来')
|
|
@@ -156,8 +177,9 @@ tts?.play('欢迎回来')
|
|
|
156
177
|
## 🔒 隐私与网络访问
|
|
157
178
|
|
|
158
179
|
- API Key 由 DSH Host 保存,浏览器只读取“是否已配置/格式是否识别”的状态,不读取密钥正文。
|
|
180
|
+
- 豆包连接由 Host 代理,文本和音色 ID 只提交给所选服务商,浏览器不会直连豆包或获得上游 Key。
|
|
159
181
|
- 浏览器本地语音由 Web Speech API 提供;标记为在线的音色可能把文本交给浏览器、操作系统或其网络语音服务。
|
|
160
|
-
-
|
|
182
|
+
- 云端生成的音频自动保存在浏览器的 IndexedDB 中。点击设置底部「音频历史」可查看音频历史;最多保留最近 100 条 / 100 MB,支持试听、下载;
|
|
161
183
|
- 流式 PCM 保存为 24 kHz 单声道 WAV;仅保留成功完成的生成请求。Web Speech API 本地语音没有可导出的音频文件。
|
|
162
184
|
- 音效核心移植自 [uisfx 0.4.0](https://github.com/romainsimon/uisfx),遵循 MIT License,详见 `NOTICE`。
|
|
163
185
|
|
|
@@ -186,7 +208,7 @@ pnpm pack:check
|
|
|
186
208
|
Windows 从本地开发链接切换到 npm 包前,请先停止 DSH Web,避免运行中的 Node 进程占用 Junction:
|
|
187
209
|
|
|
188
210
|
```powershell
|
|
189
|
-
.\start\dsh-plugin-reinstall.bat
|
|
211
|
+
.\start\dsh-plugin-reinstall.bat 4.0.0
|
|
190
212
|
```
|
|
191
213
|
|
|
192
214
|
如果是 DSH Desktop profile,只需要卸载残留的本地链接,可在退出 Desktop 后运行:
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TtsProvider } from '../../types/providers.js';
|
|
2
|
+
export declare function onTtsCredentialsSaved(listener: () => void): () => void;
|
|
3
|
+
export declare function invalidateApiKeyStatus(): void;
|
|
4
|
+
export declare function useApiKeySupported(active: boolean, provider?: TtsProvider, revision?: unknown): boolean | null;
|
|
2
5
|
//# sourceMappingURL=api-key-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-status.d.ts","sourceRoot":"","sources":["../../../src/client/conversation/api-key-status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-key-status.d.ts","sourceRoot":"","sources":["../../../src/client/conversation/api-key-status.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAM3D,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAGtE;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAE,WAAsB,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAsBxH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-aloud.d.ts","sourceRoot":"","sources":["../../../src/client/conversation/read-aloud.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAQzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAA;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAA;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"read-aloud.d.ts","sourceRoot":"","sources":["../../../src/client/conversation/read-aloud.tsx"],"names":[],"mappings":"AAAA,OAAO,KA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AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAM3G,UAAU,4BAA4B;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,CAAC,KAAK,CAAC,CAAA;IAChE,OAAO,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,CAAC,KAAK,CAAC,CAAA;IAC1D,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,oBAAoB,CAAA;IAC1B,KAAK,EAAE,qBAAqB,CAAA;IAC5B,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;CAClC;AAED,kGAAkG;AAClG,wBAAgB,uBAAuB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,4BAA4B,GAAG,IAAI,CA0G/I"}
|
|
@@ -8,6 +8,8 @@ export interface AudioHistoryEntry {
|
|
|
8
8
|
format: 'mp3' | 'wav';
|
|
9
9
|
sessionId?: string;
|
|
10
10
|
messageId?: string;
|
|
11
|
+
/** The saved audio already includes the requested synthesis speed. */
|
|
12
|
+
voiceRateApplied?: boolean;
|
|
11
13
|
blob: Blob;
|
|
12
14
|
}
|
|
13
15
|
export type AudioHistoryInput = Omit<AudioHistoryEntry, 'id' | 'createdAt'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-history.d.ts","sourceRoot":"","sources":["../../../src/client/history/audio-history.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAC5C,eAAO,MAAM,uBAAuB,QAAoB,CAAA;AAExD,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAA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AS,CAAI;IACrB,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,UAAU,CAA4B;gBAEjB,OAAO,EAAE,YAAY,EAAU,cAAc,EAAE,MAAM,IAAI;IAEtF,+EAA+E;IAC/E,QAAQ,IAAI,IAAI;IAShB,WAAW,QAAO,iBAAiB,CAAa;IAChD,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAG/C;IAED,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,IAAI,GAAG,IAAI;IAUxE,IAAI,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2DnD,KAAK,IAAI,IAAI;IAOb,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAO3B,IAAI,IAAI,IAAI;IAKZ,OAAO,IAAI,IAAI;IAUf,OAAO,CAAC,OAAO;IAgBf,OAAO,CAAC,OAAO;CAIhB"}
|
|
@@ -7,6 +7,7 @@ export declare class PcmRecording {
|
|
|
7
7
|
private readonly maxBytes;
|
|
8
8
|
constructor(maxBytes?: number);
|
|
9
9
|
append(base64: string): void;
|
|
10
|
+
appendBytes(bytes: Uint8Array): void;
|
|
10
11
|
toWav(): Blob | null;
|
|
11
12
|
save(history: AudioHistory | undefined, input: Omit<AudioHistoryInput, 'blob' | 'format'>): void;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pcm-recording.d.ts","sourceRoot":"","sources":["../../../src/client/history/pcm-recording.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEzE,kGAAkG;AAClG,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAErB,QAAQ,SAAyB;IAE7C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"pcm-recording.d.ts","sourceRoot":"","sources":["../../../src/client/history/pcm-recording.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEzE,kGAAkG;AAClG,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,KAAK,CAAI;IACjB,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;gBAErB,QAAQ,SAAyB;IAE7C,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAK5B,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAWpC,KAAK,IAAI,IAAI,GAAG,IAAI;IAuBpB,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG,IAAI;CAOjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAuBlD,+CAA+C;AAC/C,eAAO,MAAM,MAAM,UAMlB,CAAA;AA4BD,+EAA+E;AAC/E,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CA6GxC"}
|
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
export declare const NS = "xiaomi-mimo-tts";
|
|
2
2
|
export declare const zh: {
|
|
3
|
+
readonly "settings.provider": "语音服务商";
|
|
4
|
+
readonly "settings.providerXiaomi": "小米 MiMo";
|
|
5
|
+
readonly "settings.providerDoubao": "豆包语音";
|
|
6
|
+
readonly "settings.switchProvider": "切换供应商";
|
|
7
|
+
readonly "settings.doubaoStandardModel": "标准合成(seed-tts-2.0)";
|
|
8
|
+
readonly "settings.doubaoCloneModel": "声音复刻(seed-icl-2.0)";
|
|
9
|
+
readonly 'settings.doubaoInstruction': "语音指令";
|
|
10
|
+
readonly 'settings.doubaoInstructionPresets': "语音指令预设";
|
|
11
|
+
readonly 'settings.doubaoInstructionPlaceholder': "例如:语气带一点害羞,又藏着温柔的期待。";
|
|
12
|
+
readonly 'settings.doubaoInstructionHint': "可描述情绪、语气或表达风格;留空使用默认表达。实际效果随音色而异。";
|
|
13
|
+
readonly 'settings.doubaoInstructionNatural': "自然表达";
|
|
14
|
+
readonly 'settings.doubaoInstructionGentle': "温柔";
|
|
15
|
+
readonly 'settings.doubaoInstructionGentlePrompt': "用温柔、亲切自然的语气说话。";
|
|
16
|
+
readonly 'settings.doubaoInstructionCheerful': "欢快";
|
|
17
|
+
readonly 'settings.doubaoInstructionCheerfulPrompt': "用轻快、愉悦、有活力的语气说话。";
|
|
18
|
+
readonly 'settings.doubaoInstructionCalm': "沉稳";
|
|
19
|
+
readonly 'settings.doubaoInstructionCalmPrompt': "用沉稳、从容、克制的语气说话。";
|
|
20
|
+
readonly 'settings.doubaoInstructionStory': "讲故事";
|
|
21
|
+
readonly 'settings.doubaoInstructionStoryPrompt': "像讲故事一样娓娓道来,情绪随内容自然变化。";
|
|
22
|
+
readonly 'settings.doubaoInstructionArgument': "争执互怼";
|
|
23
|
+
readonly 'settings.doubaoInstructionArgumentPrompt': "像正在和对方争辩一样说话,带着不服气和针锋相对的情绪。";
|
|
24
|
+
readonly 'settings.doubaoInstructionWhisper': "悄悄话";
|
|
25
|
+
readonly 'settings.doubaoInstructionWhisperPrompt': "像贴近耳边分享秘密一样轻声细语,带一点亲昵的 ASMR 气息。";
|
|
26
|
+
readonly 'settings.doubaoInstructionShy': "害羞期待";
|
|
27
|
+
readonly 'settings.doubaoInstructionShyPrompt': "说话有些羞涩和欲言又止,同时流露出想靠近对方的期待与温柔。";
|
|
28
|
+
readonly 'settings.doubaoInstructionWeary': "沧桑低沉";
|
|
29
|
+
readonly 'settings.doubaoInstructionWearyPrompt': "声线低沉、略带沙哑,像历经风霜的人倾诉心事,情绪疲惫而落寞。";
|
|
30
|
+
readonly 'settings.doubaoInstructionTearful': "心碎哭腔";
|
|
31
|
+
readonly 'settings.doubaoInstructionTearfulPrompt': "用快要落泪的颤音说话,声音有些哽咽,带着难以释怀的伤心与委屈。";
|
|
32
|
+
readonly 'settings.doubaoInstructionCoy': "撒娇";
|
|
33
|
+
readonly 'settings.doubaoInstructionCoyPrompt': "用软软的、带点依赖感的撒娇语气说话,亲近又俏皮。";
|
|
34
|
+
readonly 'settings.doubaoInstructionCute': "夹子音";
|
|
35
|
+
readonly 'settings.doubaoInstructionCutePrompt': "用偏高、轻盈甜美的声线说话,语气可爱,带一点俏皮感。";
|
|
36
|
+
readonly 'settings.doubaoInstructionSichuan': "四川话";
|
|
37
|
+
readonly 'settings.doubaoInstructionCantonese': "粤语";
|
|
38
|
+
readonly 'settings.doubaoInstructionCantonesePrompt': "用自然、地道的粤语朗读这段话,保持日常聊天的感觉。";
|
|
39
|
+
readonly 'settings.doubaoInstructionShanghai': "上海话";
|
|
40
|
+
readonly 'settings.doubaoInstructionShanghaiPrompt': "用自然的上海话说这段话,保持日常聊天的感觉。";
|
|
41
|
+
readonly 'settings.doubaoInstructionHenan': "河南话";
|
|
42
|
+
readonly 'settings.doubaoInstructionHenanPrompt': "用自然的河南话说这段话,保持日常聊天的感觉。";
|
|
43
|
+
readonly 'settings.doubaoInstructionTianjin': "天津话";
|
|
44
|
+
readonly 'settings.doubaoInstructionTianjinPrompt': "用自然的天津话说这段话,保持日常聊天的感觉。";
|
|
45
|
+
readonly 'settings.doubaoInstructionShaanxi': "陕西话";
|
|
46
|
+
readonly 'settings.doubaoInstructionShaanxiPrompt': "用自然的陕西话说这段话,保持日常聊天的感觉。";
|
|
47
|
+
readonly 'settings.doubaoInstructionDongbei': "东北话";
|
|
48
|
+
readonly 'settings.doubaoInstructionDongbeiPrompt': "用自然的东北话说这段话,语气亲切、口语化。";
|
|
49
|
+
readonly 'settings.doubaoInstructionSichuanPrompt': "用自然的四川话口音说这段话,保持日常聊天的感觉。";
|
|
50
|
+
readonly 'settings.doubaoInstructionBeijing': "北京话";
|
|
51
|
+
readonly 'settings.doubaoInstructionBeijingPrompt': "用自然的北京话口音说这段话,带一点儿化音,像日常闲聊。";
|
|
52
|
+
readonly "settings.doubaoKeyConfigured": "豆包 API Key 已配置;试听可确认权限与音色是否可用。";
|
|
53
|
+
readonly "settings.doubaoCustomVoice": "自定义音色 ID";
|
|
54
|
+
readonly "settings.doubaoCustomVoiceHint": "填写其他标准音色的 ID";
|
|
55
|
+
readonly "settings.doubaoVoiceSceneGeneral": "日常陪伴";
|
|
56
|
+
readonly "settings.doubaoVoiceSceneRole": "个性角色";
|
|
57
|
+
readonly "settings.doubaoVoiceSceneDubbing": "特色配音";
|
|
58
|
+
readonly "settings.doubaoVoiceSceneReading": "故事演绎";
|
|
59
|
+
readonly "settings.doubaoVoiceChinese": "中文";
|
|
60
|
+
readonly "settings.doubaoVoiceId": "音色 ID";
|
|
61
|
+
readonly "settings.doubaoClonedVoice": "复刻音色 ID";
|
|
62
|
+
readonly "settings.doubaoClonedVoiceLabel": "复刻音色";
|
|
63
|
+
readonly "settings.doubaoClonedVoiceHistory": "最近填写";
|
|
64
|
+
readonly "settings.doubaoCloneHint": "填写豆包控制台中已创建的复刻音色 ID。";
|
|
65
|
+
readonly "settings.doubaoVoiceLibrary": "创建一个音色";
|
|
66
|
+
readonly "settings.doubaoVoiceRequired": "请填写所选豆包模型的音色 ID。";
|
|
67
|
+
readonly "settings.doubaoStreamingHint": "同一条回复持续追加文本,边生成边播放。";
|
|
68
|
+
readonly "settings.previewLoadingDoubao": "正在连接豆包语音…";
|
|
69
|
+
readonly "settings.previewPlayingDoubao": "豆包语音播放中,再点停止";
|
|
70
|
+
readonly "settings.previewCompletedDoubao": "豆包试听完成。";
|
|
71
|
+
readonly "settings.previewSaveKeyFirst": "请先保存 API Key,再试听。";
|
|
72
|
+
readonly "settings.previewErrorVoiceUnavailable": "音色不可用,请检查音色 ID、模型及音色授权。";
|
|
73
|
+
readonly "settings.previewErrorResourceUnavailable": "当前 Key 未开通所选豆包模型资源。";
|
|
74
|
+
readonly "settings.previewErrorBufferLimit": "音频缓存已达上限,播放已停止。";
|
|
75
|
+
readonly "error.voiceUnavailable": "音色不可用,请检查模型、音色 ID 及权限。";
|
|
76
|
+
readonly "error.resourceUnavailable": "当前 Key 未开通所选模型资源。";
|
|
77
|
+
readonly "error.apiKeyRejected": "语音 API Key 鉴权失败,请检查设置。";
|
|
78
|
+
readonly "error.rateLimited": "语音服务限流,请稍后重试。";
|
|
79
|
+
readonly "error.timeout": "语音合成超时,请重试。";
|
|
80
|
+
readonly "error.bufferLimit": "音频缓存已达上限,播放已停止。";
|
|
3
81
|
readonly 'history.title': "音频历史";
|
|
4
82
|
readonly 'history.back': "返回";
|
|
5
83
|
readonly 'history.search': "搜索音频摘要";
|
|
@@ -32,7 +110,7 @@ export declare const zh: {
|
|
|
32
110
|
readonly 'history.error.decode': "浏览器无法解码这条音频,可重试或下载文件。";
|
|
33
111
|
readonly 'history.error.failed': "音频播放失败,请重试或下载文件。";
|
|
34
112
|
readonly 'history.hint': "保留最近 100 条 / 100 MB,超出后自动清理。按生成批次列出;";
|
|
35
|
-
readonly 'history.empty': "
|
|
113
|
+
readonly 'history.empty': "还没有生成的音频。朗读或试听后会自动保存在这里。";
|
|
36
114
|
readonly 'history.loading': "正在读取音频历史…";
|
|
37
115
|
readonly 'history.memory': "浏览器存储不可用或已满;当前列表仅在本次打开期间保留,建议及时下载。";
|
|
38
116
|
readonly 'history.skipped': "有音频超过 100 MB,未保留到历史列表。";
|
|
@@ -70,15 +148,15 @@ export declare const zh: {
|
|
|
70
148
|
readonly "settings.enabledOnLabel": "开麦啦";
|
|
71
149
|
readonly "settings.enabledOffLabel": "休息一会儿";
|
|
72
150
|
readonly "settings.enabledHint": "关闭后会隐藏语音设置并停止自动播报。";
|
|
73
|
-
readonly "settings.apiKey": "
|
|
151
|
+
readonly "settings.apiKey": "API Key";
|
|
74
152
|
readonly "settings.apiKeyStatus": "只有输入新值并保存时才会替换现有密钥。";
|
|
75
153
|
readonly "settings.apiKeyLoading": "正在读取 Host 中的密钥…";
|
|
76
|
-
readonly "settings.apiKeyMissing": "
|
|
154
|
+
readonly "settings.apiKeyMissing": "尚未保存当前服务商的 API Key。请先填写并保存,再进行试听。";
|
|
77
155
|
readonly "settings.apiKeyRecognized": "已保存 MiMo API Key,格式已识别;可通过演播厅确认实际连接。";
|
|
78
156
|
readonly "settings.apiKeyUnsupported": "密钥格式未识别,请检查是否以 sk- 或 tp- 开头。";
|
|
79
157
|
readonly "settings.apiKeyUnsupportedSaved": "已保存密钥的格式未识别;请填写新密钥或清除已保存的密钥。";
|
|
80
158
|
readonly "settings.apiKeyUnavailable": "暂时无法读取 Host 密钥状态,请检查连接后重试。";
|
|
81
|
-
readonly "settings.apiKeyPendingSave": "
|
|
159
|
+
readonly "settings.apiKeyPendingSave": "新密钥待保存;保存后才会用于试听。";
|
|
82
160
|
readonly "settings.apiKeyPendingClear": "保存后将清除已保存的密钥;如有基础配置,将恢复继承。";
|
|
83
161
|
readonly "settings.apiKeyClear": "清除";
|
|
84
162
|
readonly "settings.getApiKey": "获取 API Key";
|
|
@@ -97,7 +175,8 @@ export declare const zh: {
|
|
|
97
175
|
readonly "settings.detailedVoiceConfig": "调音台";
|
|
98
176
|
readonly "settings.voiceVolume": "语音音量";
|
|
99
177
|
readonly "settings.voiceRate": "播放语速";
|
|
100
|
-
readonly "settings.voiceRatePcmHint": "
|
|
178
|
+
readonly "settings.voiceRatePcmHint": "豆包在合成时应用语速,下次合成生效;其他语音由播放器调速,小米流式 PCM 倍速会同时改变音调。";
|
|
179
|
+
readonly 'settings.voiceRateInfo': "播放语速说明";
|
|
101
180
|
readonly "settings.readScope": "朗读范围";
|
|
102
181
|
readonly "settings.readScopeSmart": "智能模式";
|
|
103
182
|
readonly "settings.readScopeFull": "全文模式";
|
|
@@ -109,7 +188,7 @@ export declare const zh: {
|
|
|
109
188
|
readonly "settings.summaryVoiceDesignModel": "自定义音色";
|
|
110
189
|
readonly "settings.mixerPresetCopy": "今天想用谁的声音?";
|
|
111
190
|
readonly "settings.mixerVoiceDesignCopy": "一起设计专属音色吧!";
|
|
112
|
-
readonly "settings.localSpeechAutoSummary": "
|
|
191
|
+
readonly "settings.localSpeechAutoSummary": "云端优先";
|
|
113
192
|
readonly "settings.stateOn": "已开启";
|
|
114
193
|
readonly "settings.stateOff": "已关闭";
|
|
115
194
|
readonly "settings.model": "模型选择";
|
|
@@ -118,13 +197,13 @@ export declare const zh: {
|
|
|
118
197
|
readonly "settings.presetModelShort": "预置音色(MiMo-TTS)";
|
|
119
198
|
readonly "settings.voiceDesignModelShort": "音色设计(MiMo-VoiceDesign)";
|
|
120
199
|
readonly "settings.localSpeechMode": "语音策略";
|
|
121
|
-
readonly "settings.localSpeechAuto": "
|
|
200
|
+
readonly "settings.localSpeechAuto": "云端优先";
|
|
122
201
|
readonly "settings.localSpeechFirst": "本地优先";
|
|
123
202
|
readonly "settings.localSpeechDisabled": "关闭本地语音";
|
|
124
|
-
readonly "settings.localSpeechAutoHint": "
|
|
125
|
-
readonly "settings.localSpeechFirstHint": "
|
|
126
|
-
readonly "settings.localSpeechDisabledHint": "
|
|
127
|
-
readonly "settings.localSpeechUnavailableHint": "
|
|
203
|
+
readonly "settings.localSpeechAutoHint": "优先使用所选云端音色,失败时使用本地语音。";
|
|
204
|
+
readonly "settings.localSpeechFirstHint": "优先使用浏览器本地语音朗读,失败时尝试所选云端音色。";
|
|
205
|
+
readonly "settings.localSpeechDisabledHint": "仅使用所选云端音色,失败时不会切换到本地语音。";
|
|
206
|
+
readonly "settings.localSpeechUnavailableHint": "当前浏览器没有可用的本地音色,仅可使用云端优先。";
|
|
128
207
|
readonly "settings.localVoice": "本地音色";
|
|
129
208
|
readonly "settings.localVoiceLoading": "正在读取浏览器音色…";
|
|
130
209
|
readonly "settings.localVoiceUnavailable": "没有可用的浏览器音色";
|
|
@@ -163,7 +242,7 @@ export declare const zh: {
|
|
|
163
242
|
readonly "settings.previewPlayShort": "试听";
|
|
164
243
|
readonly "settings.previewStopShort": "停止";
|
|
165
244
|
readonly "settings.previewStop": "停止试听";
|
|
166
|
-
readonly "settings.previewHint": "
|
|
245
|
+
readonly "settings.previewHint": "保存所选服务商的密钥后即可试听";
|
|
167
246
|
readonly "settings.previewLoading": "准备中…";
|
|
168
247
|
readonly "settings.previewPlaying": "播放中,再点停止";
|
|
169
248
|
readonly "settings.previewLoadingMimo": "正在连接 MiMo…";
|
|
@@ -172,10 +251,10 @@ export declare const zh: {
|
|
|
172
251
|
readonly "settings.previewPlayingLocal": "浏览器本地语音播放中,再点停止";
|
|
173
252
|
readonly "settings.previewCompletedMimo": "MiMo 试听完成";
|
|
174
253
|
readonly "settings.previewCompletedLocal": "本地语音试听完成";
|
|
175
|
-
readonly "settings.previewErrorApiKeyMissing": "
|
|
176
|
-
readonly "settings.previewErrorApiKeyRejected": "
|
|
177
|
-
readonly "settings.previewErrorRateLimited": "
|
|
178
|
-
readonly "settings.previewErrorTimeout": "
|
|
254
|
+
readonly "settings.previewErrorApiKeyMissing": "尚未保存当前服务商的 API Key;请先保存,或启用本地语音。";
|
|
255
|
+
readonly "settings.previewErrorApiKeyRejected": "语音服务拒绝了当前密钥,请检查或更换 API Key。";
|
|
256
|
+
readonly "settings.previewErrorRateLimited": "语音请求过于频繁,请稍后再试。";
|
|
257
|
+
readonly "settings.previewErrorTimeout": "语音服务响应超时,请检查网络后重试。";
|
|
179
258
|
readonly "settings.previewErrorLocalUnavailable": "当前浏览器没有可用的本地音色。";
|
|
180
259
|
readonly "settings.previewErrorAutoplay": "浏览器阻止了播放,请再次点击试听。";
|
|
181
260
|
readonly "settings.previewFailed": "试听失败,请检查设置和网络。";
|
|
@@ -190,7 +269,7 @@ export declare const zh: {
|
|
|
190
269
|
readonly "settings.source": "🍬赏个Star";
|
|
191
270
|
readonly "settings.updateAvailable": "🎉新版已发布";
|
|
192
271
|
readonly "settings.readOnly": "当前 DSH 设置为只读。";
|
|
193
|
-
readonly "settings.secretPlaceholder": "
|
|
272
|
+
readonly "settings.secretPlaceholder": "输入当前服务商的新 API Key";
|
|
194
273
|
readonly "settings.expand": "展开设置";
|
|
195
274
|
readonly "settings.collapse": "收起设置";
|
|
196
275
|
readonly "settings.soundEffectsTitle": "音效库";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/client/localization.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE,oBAAoB,CAAA;AAEnC,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/client/localization.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE,oBAAoB,CAAA;AAEnC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2TL,CAAC;AAEX,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CA4U9C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAA;AAEvC,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK,MAAM,CAAA;AAElD,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,iBAAiB,EAAE,SAAS,CAAA;KAC7B;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { TtsSelection } from '../../types/providers.js';
|
|
2
|
+
export declare class DuplexPcmError extends Error {
|
|
3
|
+
readonly code: string;
|
|
4
|
+
constructor(code: string, message?: string);
|
|
5
|
+
}
|
|
6
|
+
/** One message's appendable PCM stream. Sending text never waits for audio completion. */
|
|
7
|
+
export declare class DuplexPcmStream {
|
|
8
|
+
private readonly signal;
|
|
9
|
+
private readonly consume;
|
|
10
|
+
private readonly limit;
|
|
11
|
+
private readonly timeoutMs;
|
|
12
|
+
private readonly maxTextLength;
|
|
13
|
+
readonly done: Promise<void>;
|
|
14
|
+
private resolve;
|
|
15
|
+
private reject;
|
|
16
|
+
private readonly socket;
|
|
17
|
+
private ready;
|
|
18
|
+
private ended;
|
|
19
|
+
private terminal;
|
|
20
|
+
private finishing;
|
|
21
|
+
private readonly pending;
|
|
22
|
+
private pendingBytes;
|
|
23
|
+
private textLength;
|
|
24
|
+
private chain;
|
|
25
|
+
private tail;
|
|
26
|
+
private received;
|
|
27
|
+
private timer;
|
|
28
|
+
constructor(selection: TtsSelection, signal: AbortSignal, consume: (bytes: Uint8Array) => void | Promise<void>, limit?: number, timeoutMs?: number, maxTextLength?: number);
|
|
29
|
+
append(text: string): void;
|
|
30
|
+
finish(): Promise<void>;
|
|
31
|
+
private sendText;
|
|
32
|
+
private onAbort;
|
|
33
|
+
private arm;
|
|
34
|
+
private cleanup;
|
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