dsh-xiaomi-tts 2.3.0 → 2.3.2
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 +5 -3
- package/README.md +80 -13
- package/assets/image.png +0 -0
- package/lib/client/conversation.d.ts +26 -0
- package/lib/client/conversation.d.ts.map +1 -0
- package/lib/client/index.d.ts +0 -51
- package/lib/client/index.d.ts.map +1 -1
- package/lib/client/live-speech-controller.d.ts +44 -0
- package/lib/client/live-speech-controller.d.ts.map +1 -0
- package/lib/client/localization.d.ts +66 -0
- package/lib/client/localization.d.ts.map +1 -0
- package/lib/client/pcm-audio-queue.d.ts +21 -0
- package/lib/client/pcm-audio-queue.d.ts.map +1 -0
- package/lib/client/playback-controller.d.ts +29 -0
- package/lib/client/playback-controller.d.ts.map +1 -0
- package/lib/client/playback-types.d.ts +17 -0
- package/lib/client/playback-types.d.ts.map +1 -0
- package/lib/client/playback.d.ts +4 -0
- package/lib/client/playback.d.ts.map +1 -0
- package/lib/client/settings-card.d.ts +11 -0
- package/lib/client/settings-card.d.ts.map +1 -0
- package/lib/client/settings-scope.d.ts +6 -0
- package/lib/client/settings-scope.d.ts.map +1 -0
- package/lib/client/styles.d.ts +2 -0
- package/lib/client/styles.d.ts.map +1 -0
- package/lib/client/voice-design-picker.d.ts +14 -0
- package/lib/client/voice-design-picker.d.ts.map +1 -0
- package/lib/client.js +675 -384
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +281 -4
- package/lib/{shared-DQA9zfpt.js → shared-9qFFYsWe.js} +73 -8
- package/lib/shared.d.ts +24 -1
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js +2 -2
- package/package.json +3 -1
package/README.en.md
CHANGED
|
@@ -52,12 +52,12 @@ Install from GitHub:
|
|
|
52
52
|
dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
After installation, restart `dsh web`, then open **Settings → Plugins → Plugin configuration → Xiaomi MiMo Read Aloud**, enter the API key, and save.
|
|
55
|
+
After installation, restart `dsh web`, then open **Settings → Plugins → Plugin configuration → Xiaomi MiMo Read Aloud**, enter the API key, and save. The plugin automatically selects the endpoint from the API key prefix: `sk-` uses the standard endpoint and `tp-` uses the Token Plan-compatible endpoint.
|
|
56
56
|
|
|
57
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:
|
|
58
58
|
|
|
59
59
|
```powershell
|
|
60
|
-
.\start\dsh-plugin-reinstall.bat 2.3.
|
|
60
|
+
.\start\dsh-plugin-reinstall.bat 2.3.2
|
|
61
61
|
```
|
|
62
62
|
|
|
63
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:
|
|
@@ -65,7 +65,7 @@ The script stops DSH Web, removes the current plugin from the profile, installs
|
|
|
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.3.
|
|
68
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.2
|
|
69
69
|
.\start\dsh-web-start.bat
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -113,6 +113,8 @@ pnpm test
|
|
|
113
113
|
pnpm pack:check
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
`lib/` is generated output and is not committed during day-to-day development. Feature commits update source and tests only; when a version is packaged or published, `prepack` regenerates the release output. GitHub installs build it during installation through `prepare`.
|
|
117
|
+
|
|
116
118
|
## License
|
|
117
119
|
|
|
118
120
|
MIT
|
package/README.md
CHANGED
|
@@ -16,13 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
## 功能
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- 使用 `mimo-v2.5-tts-voicedesign`
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- 发送给 TTS 前会积极清理朗读文本:移除网址、文件路径、代码块、表情符号、图标和控制字符,并将常规中文标点转换为英文标点。
|
|
19
|
+
- 在对话操作栏中显示“朗读”按钮(默认开启)。
|
|
20
|
+
- 使用 `mimo-v2.5-tts` 输出流畅、清晰的音频;支持 PCM16 流式播放,手动点击朗读使用 MP3 或 WAV。
|
|
21
|
+
- 使用 `mimo-v2.5-tts-voicedesign` 通过文字描述创造你想要的声音。
|
|
22
|
+
- 支持切换预置音色/自定义音色模型,配置 API Key、自动播报、音色、音色描述和格式。
|
|
23
|
+
- 丰富的预置音色,自由切换和修复。
|
|
24
|
+
- 自动清洗需要朗读的文本:移除网址、文件路径、代码块、表情符号、图标和控制字符等。
|
|
26
25
|
|
|
27
26
|
## 环境要求
|
|
28
27
|
|
|
@@ -34,7 +33,7 @@
|
|
|
34
33
|
|
|
35
34
|
## 安装
|
|
36
35
|
|
|
37
|
-
从 npm
|
|
36
|
+
从 npm 安装 **(推荐)**:
|
|
38
37
|
|
|
39
38
|
```bash
|
|
40
39
|
dsh plugin --profile web add dsh-xiaomi-tts
|
|
@@ -52,12 +51,12 @@ dsh plugin --profile web add ./dsh-plugin-xiaomi-mimo-tts
|
|
|
52
51
|
dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
53
52
|
```
|
|
54
53
|
|
|
55
|
-
安装后重启 `dsh web`,打开 **设置 → 插件 → 插件配置 → Xiaomi MiMo
|
|
54
|
+
安装后重启 `dsh web`,打开 **设置 → 插件 → 插件配置 → 语音朗读(Xiaomi MiMo)**,填写 API Key 并保存。插件会根据 API Key 前缀自动选择服务端点:`sk-` 使用标准端点,`tp-` 使用 Token Plan 兼容端点,无需额外配置。
|
|
56
55
|
|
|
57
56
|
更新或从本地开发版切换到 npm 版时,必须先停止 DSH Web,避免 Windows Junction 被运行中的 Node 进程占用:
|
|
58
57
|
|
|
59
58
|
```powershell
|
|
60
|
-
.\start\dsh-plugin-reinstall.bat 2.3.
|
|
59
|
+
.\start\dsh-plugin-reinstall.bat 2.3.2
|
|
61
60
|
```
|
|
62
61
|
|
|
63
62
|
这个脚本会按顺序停止 DSH Web、卸载当前 profile 中的插件、从 npm 安装指定版本并重新启动 DSH Web。若手动操作,请保持相同顺序:
|
|
@@ -65,20 +64,20 @@ dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
|
65
64
|
```powershell
|
|
66
65
|
.\start\dsh-web-stop.bat
|
|
67
66
|
dsh plugin --profile web remove dsh-xiaomi-tts
|
|
68
|
-
dsh plugin --profile web add dsh-xiaomi-tts@2.3.
|
|
67
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.2
|
|
69
68
|
.\start\dsh-web-start.bat
|
|
70
69
|
```
|
|
71
70
|
|
|
72
71
|
## 配置
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
**内置音色(`mimo-v2.5-tts`)**:
|
|
75
74
|
|
|
76
75
|
- 中文女声:`冰糖`、`茉莉`
|
|
77
76
|
- 中文男声:`苏打`、`白桦`
|
|
78
77
|
- 英文女声:`Mia`、`Chloe`
|
|
79
78
|
- 英文男声:`Milo`、`Dean`
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
**自定义音色(`mimo-v2.5-tts-voicedesign`)**
|
|
82
81
|
|
|
83
82
|
为你提供了常用音色描述模板;下拉框默认选择“自定义”,用户可以直接修改并保存描述。切换到其他模板后再切回“自定义”时,会恢复之前保存的自定义内容。
|
|
84
83
|
|
|
@@ -104,6 +103,72 @@ dsh plugin --profile web add dsh-xiaomi-tts@2.3.0
|
|
|
104
103
|
|
|
105
104
|
欢迎通过 [GitHub Issues](https://github.com/ppy-web/dsh-plugin-xiaomi-mimo-tts/issues) 提交问题反馈、功能建议或使用体验。
|
|
106
105
|
|
|
106
|
+
## 架构
|
|
107
|
+
|
|
108
|
+
- `src/index.ts`:Host 入口,注册 Schemastery 设置、Voice Design 静态资源,以及完整音频和 PCM/SSE 流式合成路由。
|
|
109
|
+
- `src/shared.ts`:Host 与 Client 共用的领域契约,包括配置类型、默认值、文本清洗、分句、流式批处理和 SSE 解析。
|
|
110
|
+
- `src/client/index.tsx`:Web Client 组合入口,只负责绑定 DSH 服务、注册 Slot、注入样式和托管控制器生命周期。
|
|
111
|
+
- `src/client/conversation.tsx`:React 会话适配层,订阅 DSH 会话快照并渲染朗读操作。
|
|
112
|
+
- `src/client/settings-card.tsx` 与 `voice-design-picker.tsx`:插件设置表单和 Voice Design 音色选择 UI。
|
|
113
|
+
- `src/client/live-speech-controller.ts`、`pcm-audio-queue.ts` 与 `playback-controller.ts`:分别管理实时朗读状态机、Web Audio PCM 调度和完整音频播放。
|
|
114
|
+
- `src/client/settings-scope.ts`:使用 `useSyncExternalStore` 将 DSH Settings Scope 安全接入 React。
|
|
115
|
+
|
|
116
|
+
```mermaid
|
|
117
|
+
flowchart TD
|
|
118
|
+
DSH["DeepSeek Harness"]
|
|
119
|
+
|
|
120
|
+
subgraph Host["Host 插件"]
|
|
121
|
+
HI["src/index.ts<br/>设置与路由注册"]
|
|
122
|
+
SETTINGS["DSH Settings"]
|
|
123
|
+
ROUTES["完整音频 / PCM SSE 路由"]
|
|
124
|
+
ASSETS["Voice Design 静态资源"]
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
subgraph Shared["共享领域层"]
|
|
128
|
+
SH["src/shared.ts<br/>配置、文本处理、分句与 SSE"]
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
subgraph Client["Web Client"]
|
|
132
|
+
ENTRY["client/index.tsx<br/>组合入口"]
|
|
133
|
+
LOCALE["localization.ts"]
|
|
134
|
+
STYLE["styles.ts"]
|
|
135
|
+
SCOPE["settings-scope.ts<br/>useSyncExternalStore"]
|
|
136
|
+
FORM["settings-card.tsx"]
|
|
137
|
+
PICKER["voice-design-picker.tsx"]
|
|
138
|
+
CONV["conversation.tsx<br/>会话观察与朗读按钮"]
|
|
139
|
+
|
|
140
|
+
subgraph Audio["音频运行时"]
|
|
141
|
+
LIVE["live-speech-controller.ts<br/>流式语音状态机"]
|
|
142
|
+
PCM["pcm-audio-queue.ts<br/>Web Audio PCM 调度"]
|
|
143
|
+
COMPLETE["playback-controller.ts<br/>完整音频播放"]
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
API["Xiaomi MiMo API"]
|
|
148
|
+
|
|
149
|
+
DSH --> HI
|
|
150
|
+
DSH --> ENTRY
|
|
151
|
+
SH --> HI
|
|
152
|
+
SH --> SCOPE
|
|
153
|
+
SH --> CONV
|
|
154
|
+
SH --> LIVE
|
|
155
|
+
HI --> SETTINGS
|
|
156
|
+
HI --> ROUTES
|
|
157
|
+
HI --> ASSETS
|
|
158
|
+
ROUTES --> API
|
|
159
|
+
ENTRY --> LOCALE
|
|
160
|
+
ENTRY --> STYLE
|
|
161
|
+
ENTRY --> SCOPE
|
|
162
|
+
ENTRY --> FORM
|
|
163
|
+
ENTRY --> CONV
|
|
164
|
+
FORM --> PICKER
|
|
165
|
+
CONV --> LIVE
|
|
166
|
+
CONV --> COMPLETE
|
|
167
|
+
LIVE --> PCM
|
|
168
|
+
LIVE --> ROUTES
|
|
169
|
+
COMPLETE --> ROUTES
|
|
170
|
+
```
|
|
171
|
+
|
|
107
172
|
## 开发
|
|
108
173
|
|
|
109
174
|
```bash
|
|
@@ -113,6 +178,8 @@ pnpm test
|
|
|
113
178
|
pnpm pack:check
|
|
114
179
|
```
|
|
115
180
|
|
|
181
|
+
`lib/` 是构建产物,不纳入日常代码提交。提交功能时只更新源码和测试;升级版本并执行 `pnpm pack` 或 `pnpm publish` 时,`prepack` 会自动重新生成发布包。直接从 GitHub 安装时,`prepare` 会在安装阶段构建该产物。
|
|
182
|
+
|
|
116
183
|
## 许可证
|
|
117
184
|
|
|
118
185
|
MIT
|
package/assets/image.png
CHANGED
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ConversationSnapshot, SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
|
|
3
|
+
import type { TtsSettings } from '../shared.js';
|
|
4
|
+
import type { Translate } from './localization.js';
|
|
5
|
+
import { LiveSpeechController, PlaybackController } from './playback.js';
|
|
6
|
+
interface SessionPlaybackObserverProps {
|
|
7
|
+
sessionId: string;
|
|
8
|
+
session: ConversationSnapshot;
|
|
9
|
+
playback: PlaybackController;
|
|
10
|
+
live: LiveSpeechController;
|
|
11
|
+
settings: SettingsScope<TtsSettings>;
|
|
12
|
+
}
|
|
13
|
+
/** Own the active-session boundary and feed its partial assistant output into realtime speech. */
|
|
14
|
+
export declare function SessionPlaybackObserver({ sessionId, session, playback, live, settings }: SessionPlaybackObserverProps): null;
|
|
15
|
+
interface ReadAloudActionProps {
|
|
16
|
+
sessionId: string;
|
|
17
|
+
messageId: string;
|
|
18
|
+
useSession: <T>(selector: (snapshot: ConversationSnapshot) => T) => T;
|
|
19
|
+
playback: PlaybackController;
|
|
20
|
+
live: LiveSpeechController;
|
|
21
|
+
settings: SettingsScope<TtsSettings>;
|
|
22
|
+
t: Translate;
|
|
23
|
+
}
|
|
24
|
+
export declare function ReadAloudAction({ sessionId, messageId, useSession, playback, live, settings, t }: ReadAloudActionProps): ReactElement | null;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/client/conversation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AASzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAEjG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AA8DxE,UAAU,4BAA4B;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,oBAAoB,CAAA;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,oBAAoB,CAAA;IAC1B,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CACrC;AAED,kGAAkG;AAClG,wBAAgB,uBAAuB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,4BAA4B,GAAG,IAAI,CA4D5H;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,CAAC,KAAK,CAAC,CAAA;IACrE,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,oBAAoB,CAAA;IAC1B,QAAQ,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACpC,CAAC,EAAE,SAAS,CAAA;CACb;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,oBAAoB,GAAG,YAAY,GAAG,IAAI,CAyE5I"}
|
package/lib/client/index.d.ts
CHANGED
|
@@ -1,57 +1,6 @@
|
|
|
1
1
|
import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
2
|
/** Client services required by this plugin. */
|
|
3
3
|
export declare const inject: string[];
|
|
4
|
-
declare const zh: {
|
|
5
|
-
readonly 'action.play': "朗读回复";
|
|
6
|
-
readonly 'action.pause': "暂停朗读";
|
|
7
|
-
readonly 'action.resume': "继续朗读";
|
|
8
|
-
readonly 'action.loading': "正在生成语音";
|
|
9
|
-
readonly 'action.retry': "重新生成语音";
|
|
10
|
-
readonly 'error.noText': "这条回复没有可朗读的正文。";
|
|
11
|
-
readonly 'error.request': "语音生成失败。";
|
|
12
|
-
readonly 'error.play': "浏览器阻止了自动播放,请点击朗读按钮。";
|
|
13
|
-
readonly 'settings.title': "语音朗读 (Xiaomi MiMo)";
|
|
14
|
-
readonly 'settings.description': "在助手回复操作栏中使用 Xiaomi MiMo TTS 生成并播放语音。";
|
|
15
|
-
readonly 'settings.enabled': "显示朗读按钮";
|
|
16
|
-
readonly 'settings.enabledHint': "关闭后不会在助手回复操作栏显示朗读按钮,也不会自动播报。";
|
|
17
|
-
readonly 'settings.apiKey': "API Key";
|
|
18
|
-
readonly 'settings.apiKeyHint': "密钥保存在 DSH 设置文件中,传到浏览器前会被脱敏。";
|
|
19
|
-
readonly 'settings.apiKeyStatus': "只有输入新值并保存时才会替换现有密钥。";
|
|
20
|
-
readonly 'settings.apiKeyConfigured': "已配置";
|
|
21
|
-
readonly 'settings.getApiKey': "获取 API Key";
|
|
22
|
-
readonly 'settings.autoPlay': "开启自动播报";
|
|
23
|
-
readonly 'settings.autoPlayHint': "开启时会同步显示朗读按钮;浏览器也可能拒绝自动播放。";
|
|
24
|
-
readonly 'settings.model': "TTS 模型";
|
|
25
|
-
readonly 'settings.presetModel': "预置音色模型 (mimo-v2.5-tts)";
|
|
26
|
-
readonly 'settings.voiceDesignModel': "自定义音色模型 (mimo-v2.5-tts-voicedesign)";
|
|
27
|
-
readonly 'settings.modelAutoPlayHintPreset': "预置音色模型支持实时流式播放。";
|
|
28
|
-
readonly 'settings.modelAutoPlayHintVoiceDesign': "自定义音色仅支持在回复完成后自动播放。";
|
|
29
|
-
readonly 'settings.voice': "内置音色";
|
|
30
|
-
readonly 'settings.voiceDesignPrompt': "自定义音色描述";
|
|
31
|
-
readonly 'settings.customVoiceOption': "自定义";
|
|
32
|
-
readonly 'settings.customVoiceSummary': "手动编写音色描述";
|
|
33
|
-
readonly 'settings.voiceDesignPromptHint': "按“年龄段 + 性别、声音质感、语速节奏、情绪底色”描述声音本身;不写场景或动作。";
|
|
34
|
-
readonly 'settings.format': "音频格式";
|
|
35
|
-
readonly 'settings.save': "保存";
|
|
36
|
-
readonly 'settings.saving': "保存中…";
|
|
37
|
-
readonly 'settings.saved': "已保存";
|
|
38
|
-
readonly 'settings.unsaved': "未保存";
|
|
39
|
-
readonly 'settings.overridden': "已覆盖";
|
|
40
|
-
readonly 'settings.reset': "恢复默认";
|
|
41
|
-
readonly 'settings.discard': "放弃修改";
|
|
42
|
-
readonly 'settings.failed': "保存失败,请重试。";
|
|
43
|
-
readonly 'settings.readOnly': "当前 DSH 设置为只读。";
|
|
44
|
-
readonly 'settings.secretPlaceholder': "输入新的 Xiaomi MiMo API Key";
|
|
45
|
-
readonly 'settings.expand': "展开设置";
|
|
46
|
-
readonly 'settings.collapse': "收起设置";
|
|
47
|
-
};
|
|
48
|
-
type LocaleKey = keyof typeof zh;
|
|
49
|
-
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
50
|
-
interface LocaleNamespaceMap {
|
|
51
|
-
'xiaomi-mimo-tts': LocaleKey;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
4
|
/** Register the Web action, settings card, locale dictionaries, and styles. */
|
|
55
5
|
export declare function apply(ctx: ClientContext): void;
|
|
56
|
-
export {};
|
|
57
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAe3E,+CAA+C;AAC/C,eAAO,MAAM,MAAM,UAMlB,CAAA;AA4BD,+EAA+E;AAC/E,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgD9C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { LiveMessageIdentity, PlaybackStatus } from './playback-types.js';
|
|
2
|
+
export declare class LiveSpeechController {
|
|
3
|
+
private readonly audio;
|
|
4
|
+
private streamGeneration;
|
|
5
|
+
private queue;
|
|
6
|
+
private active;
|
|
7
|
+
private observed;
|
|
8
|
+
private consumed;
|
|
9
|
+
private pendingText;
|
|
10
|
+
private handled;
|
|
11
|
+
private messageId;
|
|
12
|
+
private status;
|
|
13
|
+
private sessionId;
|
|
14
|
+
private requestBusy;
|
|
15
|
+
private audioBusy;
|
|
16
|
+
private blockedTurn;
|
|
17
|
+
private onStateChange;
|
|
18
|
+
setStateChangeListener(listener: (sessionId: string, messageId: string, status: PlaybackStatus) => void): void;
|
|
19
|
+
activateSession(sessionId: string): void;
|
|
20
|
+
deactivateSession(sessionId: string): void;
|
|
21
|
+
observe(sessionId: string, turn: number, step: number, text: string): void;
|
|
22
|
+
finish(sessionId: string, final: LiveMessageIdentity): void;
|
|
23
|
+
stop(sessionId: string): boolean;
|
|
24
|
+
hasHandled(sessionId: string, identity: Pick<LiveMessageIdentity, 'turn' | 'step'> | null): boolean;
|
|
25
|
+
cancelSession(sessionId: string): void;
|
|
26
|
+
cancel(): void;
|
|
27
|
+
dispose(): Promise<void>;
|
|
28
|
+
private reset;
|
|
29
|
+
private advanceSegment;
|
|
30
|
+
private beginSegment;
|
|
31
|
+
private resetState;
|
|
32
|
+
private cursorKey;
|
|
33
|
+
private drain;
|
|
34
|
+
private stageSentence;
|
|
35
|
+
private createQueue;
|
|
36
|
+
private replaceQueue;
|
|
37
|
+
private isCurrentStream;
|
|
38
|
+
private stream;
|
|
39
|
+
private handleStreamError;
|
|
40
|
+
private maybeFinishPlayback;
|
|
41
|
+
private setStatus;
|
|
42
|
+
private reportStatus;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=live-speech-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-speech-controller.d.ts","sourceRoot":"","sources":["../../src/client/live-speech-controller.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAa9E,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAMpB;IACF,OAAO,CAAC,gBAAgB,CAAI;IAC5B,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,QAAQ,CAAI;IACpB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,aAAa,CAAwF;IAE7G,sBAAsB,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;IAI9G,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAMxC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAM1C,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAa1E,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAkB3D,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAOhC,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,GAAG,OAAO;IAKnG,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAItC,MAAM,IAAI,IAAI;IAKR,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAM9B,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,WAAW;IAkBnB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,eAAe;YAIT,MAAM;IAwCpB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,YAAY;CAGrB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const NS = "xiaomi-mimo-tts";
|
|
2
|
+
export declare const zh: {
|
|
3
|
+
readonly 'action.play': "朗读回复";
|
|
4
|
+
readonly 'action.pause': "暂停朗读";
|
|
5
|
+
readonly 'action.resume': "继续朗读";
|
|
6
|
+
readonly 'action.loading': "正在生成语音";
|
|
7
|
+
readonly 'action.cancel': "取消语音生成";
|
|
8
|
+
readonly 'action.stop': "停止朗读";
|
|
9
|
+
readonly 'action.retry': "重新生成语音";
|
|
10
|
+
readonly 'error.noText': "这条回复没有可朗读的正文。";
|
|
11
|
+
readonly 'error.request': "语音生成失败。";
|
|
12
|
+
readonly 'error.play': "浏览器阻止了自动播放,请点击朗读按钮。";
|
|
13
|
+
readonly 'settings.title': "语音朗读 (Xiaomi MiMo)";
|
|
14
|
+
readonly 'settings.description': "在助手回复操作栏中使用 Xiaomi MiMo TTS 生成并播放语音。";
|
|
15
|
+
readonly 'settings.enabled': "显示朗读按钮";
|
|
16
|
+
readonly 'settings.enabledHint': "关闭后不会在助手回复操作栏显示朗读按钮,也不会自动播报。";
|
|
17
|
+
readonly 'settings.apiKey': "API Key";
|
|
18
|
+
readonly 'settings.apiKeyStatus': "只有输入新值并保存时才会替换现有密钥。";
|
|
19
|
+
readonly 'settings.apiKeyConfigured': "已配置";
|
|
20
|
+
readonly 'settings.apiKeyMissing': "尚未配置 API Key,请先获取并设置密钥。";
|
|
21
|
+
readonly 'settings.apiKeyUnsupported': "这个 API Key 似乎是错的,请检查并重新设置(sk-/tp- 开头)。";
|
|
22
|
+
readonly 'settings.getApiKey': "获取 API Key";
|
|
23
|
+
readonly 'settings.autoPlay': "开启自动播报";
|
|
24
|
+
readonly 'settings.autoPlayHint': "开启时会同步显示朗读按钮;浏览器也可能拒绝自动播放。";
|
|
25
|
+
readonly 'settings.model': "TTS 模型";
|
|
26
|
+
readonly 'settings.presetModel': "预置音色模型 (mimo-v2.5-tts)";
|
|
27
|
+
readonly 'settings.voiceDesignModel': "自定义音色模型 (mimo-v2.5-tts-voicedesign)";
|
|
28
|
+
readonly 'settings.modelAutoPlayHintPreset': "预置音色模型支持实时流式播放。";
|
|
29
|
+
readonly 'settings.modelAutoPlayHintVoiceDesign': "自定义音色仅支持在回复完成后自动播放。";
|
|
30
|
+
readonly 'settings.voice': "内置音色";
|
|
31
|
+
readonly 'settings.voiceDesignPrompt': "自定义音色描述";
|
|
32
|
+
readonly 'settings.customVoiceOption': "自定义";
|
|
33
|
+
readonly 'settings.customVoiceSummary': "手动编写音色描述";
|
|
34
|
+
readonly 'settings.voiceDesignPromptHint': "按“年龄段 + 性别、声音质感、语速节奏、情绪底色”描述声音本身;不写场景或动作。";
|
|
35
|
+
readonly 'settings.format': "音频格式";
|
|
36
|
+
readonly 'settings.save': "保存";
|
|
37
|
+
readonly 'settings.saving': "保存中…";
|
|
38
|
+
readonly 'settings.saved': "已保存";
|
|
39
|
+
readonly 'settings.unsaved': "未保存";
|
|
40
|
+
readonly 'settings.overridden': "已覆盖";
|
|
41
|
+
readonly 'settings.reset': "恢复默认";
|
|
42
|
+
readonly 'settings.discard': "放弃修改";
|
|
43
|
+
readonly 'settings.failed': "保存失败,请重试。";
|
|
44
|
+
readonly 'settings.source': "✨查看源码";
|
|
45
|
+
readonly 'settings.uninstall': "卸载";
|
|
46
|
+
readonly 'settings.uninstalling': "卸载中…";
|
|
47
|
+
readonly 'settings.uninstallQuestion': "确认卸载?";
|
|
48
|
+
readonly 'settings.uninstallConfirm': "确认";
|
|
49
|
+
readonly 'settings.uninstallCancel': "取消";
|
|
50
|
+
readonly 'settings.uninstalled': "已卸载;重启DSH不再加载此插件。";
|
|
51
|
+
readonly 'settings.uninstallFailed': "卸载失败,请重试或使用 DSH 命令行卸载。";
|
|
52
|
+
readonly 'settings.updateAvailable': "🎉新版已发布";
|
|
53
|
+
readonly 'settings.readOnly': "当前 DSH 设置为只读。";
|
|
54
|
+
readonly 'settings.secretPlaceholder': "输入新的 Xiaomi MiMo API Key";
|
|
55
|
+
readonly 'settings.expand': "展开设置";
|
|
56
|
+
readonly 'settings.collapse': "收起设置";
|
|
57
|
+
};
|
|
58
|
+
export declare const en: Record<keyof typeof zh, string>;
|
|
59
|
+
export type LocaleKey = keyof typeof zh;
|
|
60
|
+
export type Translate = (key: LocaleKey) => string;
|
|
61
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
62
|
+
interface LocaleNamespaceMap {
|
|
63
|
+
'xiaomi-mimo-tts': LocaleKey;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=localization.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAuD9C,CAAA;AAED,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,21 @@
|
|
|
1
|
+
export interface PcmAudioQueueCallbacks {
|
|
2
|
+
onBusyChange: (busy: boolean) => void;
|
|
3
|
+
onPlaybackStart: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare class PcmAudioQueue {
|
|
6
|
+
private readonly callbacks;
|
|
7
|
+
private context;
|
|
8
|
+
private scheduledAt;
|
|
9
|
+
private readonly sources;
|
|
10
|
+
private revision;
|
|
11
|
+
private chain;
|
|
12
|
+
private busy;
|
|
13
|
+
constructor(callbacks: PcmAudioQueueCallbacks);
|
|
14
|
+
enqueue(base64: string): Promise<void>;
|
|
15
|
+
stop(): void;
|
|
16
|
+
dispose(): Promise<void>;
|
|
17
|
+
private schedule;
|
|
18
|
+
private setBusy;
|
|
19
|
+
private getContext;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=pcm-audio-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pcm-audio-queue.d.ts","sourceRoot":"","sources":["../../src/client/pcm-audio-queue.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,eAAe,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,qBAAa,aAAa;IAQZ,OAAO,CAAC,QAAQ,CAAC,SAAS;IAPtC,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,WAAW,CAAI;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmC;IAC3D,OAAO,CAAC,QAAQ,CAAI;IACpB,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,IAAI,CAAQ;gBAES,SAAS,EAAE,sBAAsB;IAE9D,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOtC,IAAI,IAAI,IAAI;IAeN,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAOhB,QAAQ;IAmCtB,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,UAAU;CAInB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PlaybackStatus, PlaybackView } from './playback-types.js';
|
|
2
|
+
export declare class PlaybackController {
|
|
3
|
+
readonly autoPlayArmedAt: number;
|
|
4
|
+
private view;
|
|
5
|
+
private readonly listeners;
|
|
6
|
+
private readonly automaticallyPlayed;
|
|
7
|
+
private readonly liveSessions;
|
|
8
|
+
private readonly completedSessions;
|
|
9
|
+
private readonly completedMessages;
|
|
10
|
+
private current;
|
|
11
|
+
private request;
|
|
12
|
+
private generation;
|
|
13
|
+
private activeSessionId;
|
|
14
|
+
getSnapshot: () => PlaybackView;
|
|
15
|
+
subscribe: (listener: () => void) => (() => void);
|
|
16
|
+
activateSession(sessionId: string): void;
|
|
17
|
+
cancelPlayback(sessionId: string): void;
|
|
18
|
+
deactivateSession(sessionId: string): void;
|
|
19
|
+
observeSession(sessionId: string, running: boolean, latestMessageId: string | null): void;
|
|
20
|
+
claimAutomaticPlayback(sessionId: string, messageId: string): boolean;
|
|
21
|
+
updateLivePlayback(sessionId: string, messageId: string, status: PlaybackStatus): void;
|
|
22
|
+
toggle(sessionId: string, messageId: string, text: string, automatic: boolean): Promise<void>;
|
|
23
|
+
dispose(): void;
|
|
24
|
+
private stopCurrent;
|
|
25
|
+
private releaseCurrentAudio;
|
|
26
|
+
private emptyView;
|
|
27
|
+
private publish;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=playback-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback-controller.d.ts","sourceRoot":"","sources":["../../src/client/playback-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AASvE,qBAAa,kBAAkB;IAC7B,QAAQ,CAAC,eAAe,SAAa;IACrC,OAAO,CAAC,IAAI,CAAgG;IAC5G,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAoB;IACxD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,OAAO,CAA+B;IAC9C,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,eAAe,CAAsB;IAE7C,WAAW,QAAO,YAAY,CAAa;IAE3C,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAG/C;IAED,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAWxC,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAOvC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAW1C,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAiBzF,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAWrE,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI;IAShF,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA+FnG,OAAO,IAAI,IAAI;IAUf,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,OAAO;CAShB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type PlaybackStatus = 'idle' | 'loading' | 'playing' | 'paused' | 'error';
|
|
2
|
+
export type PlaybackSource = 'live' | 'complete' | null;
|
|
3
|
+
export interface PlaybackView {
|
|
4
|
+
sessionId: string | null;
|
|
5
|
+
messageId: string | null;
|
|
6
|
+
source: PlaybackSource;
|
|
7
|
+
status: PlaybackStatus;
|
|
8
|
+
error: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface LiveMessageIdentity {
|
|
11
|
+
messageId: string;
|
|
12
|
+
turn: number;
|
|
13
|
+
step: number;
|
|
14
|
+
text: string;
|
|
15
|
+
interrupted: boolean;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=playback-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback-types.d.ts","sourceRoot":"","sources":["../../src/client/playback-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAChF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,CAAA;AAEvD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,EAAE,cAAc,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAGD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;CACrB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { LiveSpeechController } from './live-speech-controller.js';
|
|
2
|
+
export { PlaybackController } from './playback-controller.js';
|
|
3
|
+
export type { LiveMessageIdentity, PlaybackSource, PlaybackStatus, PlaybackView } from './playback-types.js';
|
|
4
|
+
//# sourceMappingURL=playback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback.d.ts","sourceRoot":"","sources":["../../src/client/playback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
|
|
3
|
+
import type { TtsSettings } from '../shared.js';
|
|
4
|
+
import type { Translate } from './localization.js';
|
|
5
|
+
interface SettingsCardProps {
|
|
6
|
+
scope: SettingsScope<TtsSettings>;
|
|
7
|
+
t: Translate;
|
|
8
|
+
}
|
|
9
|
+
export declare function SettingsCard({ scope, t }: SettingsCardProps): ReactElement | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=settings-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-card.d.ts","sourceRoot":"","sources":["../../src/client/settings-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAW3E,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAQlD,UAAU,iBAAiB;IACzB,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACjC,CAAC,EAAE,SAAS,CAAA;CACb;AAoDD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,iBAAiB,GAAG,YAAY,GAAG,IAAI,CA6WjF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SettingsScope } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
|
+
import type { TtsSettings } from '../shared.js';
|
|
3
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
4
|
+
export declare function decodeSettings(value: unknown): TtsSettings | undefined;
|
|
5
|
+
export declare function useSettingsSnapshot<T>(scope: SettingsScope<T>): import("@deepseek-ai/dsh-client-runtime/client").SettingsScopeSnapshot<T>;
|
|
6
|
+
//# sourceMappingURL=settings-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-scope.d.ts","sourceRoot":"","sources":["../../src/client/settings-scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAetE;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,6EAQ7D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const CLIENT_STYLES = "\n .xmimo-tts-action{width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:transparent;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;display:inline-flex}.xmimo-tts-action:hover{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action[aria-pressed=true]{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6);color:var(--dsw-alias-label-secondary,#5f6875)}.xmimo-tts-action:disabled{cursor:default;opacity:.45}.xmimo-tts-spin{animation:xmimo-spin 1s linear infinite}@keyframes xmimo-spin{to{transform:rotate(360deg)}}\n .xmimo-tts-inline-error{max-width:220px;color:var(--dsw-alias-state-error-primary,#dc2626);font-size:12px}\n .xmimo-tts-api-key-warning{color:var(--dsw-alias-state-error-primary,#dc2626)!important}\n .xmimo-tts-card{list-style:none;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:12px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-3,#fff);overflow:hidden;transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-card:hover{border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-open{background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-card-header{appearance:none;display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:0;border-radius:12px;color:inherit;text-align:left;background:transparent;font:inherit;cursor:pointer}.xmimo-tts-card-header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:-2px}.xmimo-tts-card-head-text{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.xmimo-tts-card-title{font-size:15px;font-weight:600}.xmimo-tts-card-description{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:13px;line-height:18px}.xmimo-tts-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-chevron-open{transform:rotate(180deg)}.xmimo-tts-pending{flex:none;border-radius:999px;padding:1px 8px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;font-weight:500;line-height:17px}.xmimo-tts-card-body{border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);margin:0 16px;padding:0 0 16px}\n .xmimo-tts-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;align-items:start}.xmimo-tts-grid>*{box-sizing:border-box;padding:16px 0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-grid>:first-child{border-top:0}.xmimo-tts-grid label,.xmimo-tts-api-key,.xmimo-tts-model,.xmimo-tts-voice-design-prompt,.xmimo-tts-select-column>div{display:flex;min-width:0;flex-direction:column;gap:6px;font-size:13px}.xmimo-tts-grid input,.xmimo-tts-grid select,.xmimo-tts-grid textarea{box-sizing:border-box;width:100%;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:8px;padding:8px 10px;color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit}.xmimo-tts-grid select{color-scheme:light dark}.xmimo-tts-grid select option{color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-grid select:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-grid small{color:var(--dsw-alias-label-tertiary,#8b93a1);line-height:17px}.xmimo-tts-field-heading{display:flex;min-width:0;min-height:20px;flex-direction:row!important;align-items:center;justify-content:space-between;gap:8px}.xmimo-tts-field-label{display:inline-flex;min-width:0;align-items:center;gap:8px}.xmimo-tts-api-key-link{color:var(--dsw-alias-brand-primary,#4f6ef7);font-size:12px;text-decoration:none}.xmimo-tts-api-key-link:hover{text-decoration:underline}.xmimo-tts-field-badges{display:flex!important;flex:none;flex-direction:row!important;align-items:center;gap:8px}.xmimo-tts-overridden{border-radius:999px;padding:1px 7px;color:var(--dsw-alias-label-secondary,#5f6875);background:var(--dsw-alias-bg-module-platform,#eef0f3);font-size:11px;line-height:17px}.xmimo-tts-reset{padding:0;border:0;color:var(--dsw-alias-label-secondary,#5f6875);background:transparent;font:inherit;font-size:12px;cursor:pointer}.xmimo-tts-reset:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328)}.xmimo-tts-reset:disabled{cursor:not-allowed;opacity:.45}.xmimo-tts-api-key-hints{display:flex;min-width:0;gap:8px;align-items:center}.xmimo-tts-api-key-hints small{min-width:0;white-space:nowrap}.xmimo-tts-wide{grid-column:1/-1}.xmimo-tts-switch-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0}.xmimo-tts-switch-row>*:first-child{padding-right:14px}.xmimo-tts-switch-row>*+*{padding-left:14px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}.xmimo-tts-checkbox-row{position:relative;flex-direction:row!important;align-items:center!important;gap:10px!important;cursor:pointer}.xmimo-tts-switch-copy{display:flex;min-width:0;flex-direction:column;gap:4px}.xmimo-tts-checkbox-row>input{position:absolute;width:1px!important;height:1px;margin:0!important;padding:0!important;overflow:hidden;border:0!important;opacity:0;clip-path:inset(50%)}.xmimo-tts-switch-control{box-sizing:border-box;position:relative;display:inline-block!important;width:36px;height:20px;min-width:36px;flex:none;border:1px solid var(--dsw-alias-border-l2,#c8ccd4);border-radius:999px;background:var(--dsw-alias-bg-module-platform,#e5e7eb);transition:border-color 160ms ease,background 160ms ease}.xmimo-tts-switch-control:after{content:\"\";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 1px 3px rgba(15,23,42,.24);transition:transform 160ms ease}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control{border-color:var(--dsw-alias-brand-primary,#4f6ef7);background:var(--dsw-alias-brand-primary,#4f6ef7)}.xmimo-tts-checkbox-row>input:checked+.xmimo-tts-switch-control:after{transform:translateX(16px)}.xmimo-tts-checkbox-row>input:focus-visible+.xmimo-tts-switch-control{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:2px}.xmimo-tts-checkbox-row>input:disabled+.xmimo-tts-switch-control{cursor:not-allowed;opacity:.45}.xmimo-tts-select-column{display:flex;min-width:0;flex-direction:row;gap:0}.xmimo-tts-select-column>div{flex:1}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:16px}.xmimo-tts-select-column>div+div{padding-left:16px;border-left:1px solid var(--dsw-alias-border-l2,#e5e7eb)}\n .xmimo-tts-voice-picker{display:flex;min-width:0;flex-direction:column;gap:6px}.xmimo-tts-voice-picker-trigger,.xmimo-tts-voice-option{box-sizing:border-box;display:flex;width:100%;min-width:0;align-items:center;gap:10px;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-primary,#1f2328);background:var(--dsw-alias-bg-layer-2,#f3f4f6);font:inherit;text-align:left;cursor:pointer}.xmimo-tts-voice-picker-trigger{min-height:54px;border-radius:10px;padding:6px 10px}.xmimo-tts-voice-picker-trigger:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed,#c8ccd4);background:var(--dsw-alias-interactive-bg-hover,#eef0f3)}.xmimo-tts-voice-picker-trigger:focus-visible,.xmimo-tts-voice-option:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#4f6ef7);outline-offset:1px}.xmimo-tts-voice-picker-trigger:disabled{cursor:not-allowed;opacity:.55}.xmimo-tts-voice-avatar{box-sizing:border-box;display:block;width:40px;height:40px;flex:none;border:1px solid color-mix(in srgb,var(--dsw-alias-border-l2,#e5e7eb) 80%,transparent);border-radius:50%;object-fit:cover;background:var(--dsw-alias-bg-layer-1,#fff)}.xmimo-tts-custom-voice-avatar{display:grid;place-items:center;color:var(--dsw-alias-brand-primary,#4f6ef7);background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 12%,var(--dsw-alias-bg-layer-1,#fff))}.xmimo-tts-custom-voice-avatar svg{width:30px;height:30px;overflow:visible}.xmimo-tts-custom-voice-avatar circle{fill:currentColor}.xmimo-tts-custom-voice-avatar path{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.xmimo-tts-voice-option-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:1px}.xmimo-tts-voice-option-copy strong{overflow:hidden;font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-option-copy small{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.xmimo-tts-voice-picker-chevron{flex:none;color:var(--dsw-alias-label-tertiary,#8b93a1);transition:transform 160ms ease}.xmimo-tts-voice-picker-chevron-open{transform:rotate(180deg)}.xmimo-tts-voice-picker-menu{display:grid;max-height:310px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:10px;padding:5px;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:0 10px 28px rgba(15,23,42,.12)}.xmimo-tts-voice-option{min-height:50px;border:0;border-radius:7px;padding:5px 7px;background:transparent}.xmimo-tts-voice-option:hover,.xmimo-tts-voice-option:focus-visible{background:var(--dsw-alias-interactive-bg-hover,#f3f4f6)}.xmimo-tts-voice-option-selected{background:color-mix(in srgb,var(--dsw-alias-brand-primary,#4f6ef7) 10%,transparent)}\n .xmimo-tts-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);font-size:12px;color:var(--dsw-alias-label-tertiary,#8b93a1)}.xmimo-tts-card-actions button{border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-bg-layer-1,#fff);background:var(--dsw-alias-brand-primary,#4f6ef7);cursor:pointer;font:inherit}.xmimo-tts-card-actions button:hover:not(:disabled){filter:brightness(1.08)}.xmimo-tts-card-actions button:disabled{cursor:not-allowed;color:var(--dsw-alias-label-dimmed,#9ca3af);background:var(--dsw-alias-bg-layer-2,#f3f4f6);border-color:var(--dsw-alias-border-l2,#e5e7eb);opacity:1}.xmimo-tts-card-actions .xmimo-tts-update{display:inline-flex;align-items:center;border:1px solid var(--dsw-alias-brand-primary,#4f6ef7);border-radius:8px;padding:5px 14px;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;text-decoration:none}.xmimo-tts-card-actions .xmimo-tts-update:hover{filter:brightness(1.08)}.xmimo-tts-card-actions .xmimo-tts-star{border-color:transparent;color:var(--dsw-alias-brand-primary,#4f6ef7);background:transparent;font-weight:500}.xmimo-tts-card-actions .xmimo-tts-star:hover{text-decoration:underline}.xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:auto;border-color:#F56C6C;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall:hover:not(:disabled){background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-uninstall:disabled{border-color:#F56C6C;color:#F56C6C;background:transparent;opacity:.55}.xmimo-tts-uninstall-confirmation{display:flex;align-items:center;gap:8px;margin-right:auto;color:#F56C6C}.xmimo-tts-uninstall-choice{display:inline-flex;overflow:hidden;border:1px solid #F56C6C;border-radius:8px}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button{border:0;border-radius:0;padding:5px 12px;color:#F56C6C;background:transparent}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button+button{border-left:1px solid #F56C6C}.xmimo-tts-card-actions .xmimo-tts-uninstall-choice button:hover{filter:none;background:color-mix(in srgb,#F56C6C 10%,transparent)}.xmimo-tts-card-actions .xmimo-tts-discard{border-color:var(--dsw-alias-border-l2,#e5e7eb);color:var(--dsw-alias-label-secondary,#5f6875);background:transparent}.xmimo-tts-card-actions .xmimo-tts-discard:hover:not(:disabled){color:var(--dsw-alias-label-primary,#1f2328);border-color:var(--dsw-alias-label-dimmed,#c8ccd4)}.xmimo-tts-failed{color:var(--dsw-alias-state-error-primary,#dc2626)}.xmimo-tts-version{color:var(--dsw-alias-label-tertiary,#8b93a1);font-size:11px;font-weight:400}\n @media(max-width:720px){.xmimo-tts-grid{grid-template-columns:1fr}.xmimo-tts-wide{grid-column:auto}.xmimo-tts-switch-row{grid-template-columns:1fr}.xmimo-tts-switch-row>*:first-child{padding-right:0;padding-bottom:16px}.xmimo-tts-switch-row>*+*{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-select-column{grid-column:auto;flex-direction:column}.xmimo-tts-select-column>div:first-child:not(:only-child){padding-right:0;padding-bottom:16px}.xmimo-tts-select-column>div+div{padding-top:16px;padding-left:0;border-top:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-left:0}.xmimo-tts-api-key-hints{flex-wrap:wrap}.xmimo-tts-api-key-hints small{white-space:normal}}\n .xmimo-tts-card-actions .xmimo-tts-uninstall{margin-right:0}.xmimo-tts-card-actions .xmimo-tts-star{margin-right:auto}.xmimo-tts-uninstall-confirmation{margin-right:0}\n ";
|
|
2
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAI,eAAO,MAAM,aAAa,40ZAUzB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export declare const CUSTOM_VOICE_DESIGN_OPTION = "__custom__";
|
|
3
|
+
export declare function isPresetVoiceDesignPrompt(value: string): boolean;
|
|
4
|
+
interface VoiceDesignPresetPickerProps {
|
|
5
|
+
value: string;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
customLabel: string;
|
|
9
|
+
customSummary: string;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function VoiceDesignPresetPicker({ value, disabled, label, customLabel, customSummary, onChange }: VoiceDesignPresetPickerProps): ReactElement;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=voice-design-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice-design-picker.d.ts","sourceRoot":"","sources":["../../src/client/voice-design-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuC,YAAY,EAAE,MAAM,OAAO,CAAA;AAK9E,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhE;AA0BD,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAED,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,4BAA4B,GAAG,YAAY,CA8HpJ"}
|