dsh-xiaomi-tts 2.2.1 → 2.3.1
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 +60 -27
- package/README.md +81 -18
- package/assets/image.png +0 -0
- 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/conversation.d.ts +26 -0
- package/lib/client/conversation.d.ts.map +1 -0
- package/lib/client/index.d.ts +0 -49
- 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 +64 -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 +924 -426
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +171 -1
- package/lib/{shared-BW0MDw4T.js → shared-Ari92Zhu.js} +74 -40
- package/lib/shared.d.ts +56 -28
- package/lib/shared.d.ts.map +1 -1
- package/lib/shared.js +2 -2
- package/package.json +3 -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,105 @@ 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.1
|
|
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.1
|
|
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
|
+
|
|
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
|
+
|
|
85
118
|
## License
|
|
86
119
|
|
|
87
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
|
|
@@ -57,7 +56,7 @@ dsh plugin --profile web add github:ppy-web/dsh-plugin-xiaomi-mimo-tts
|
|
|
57
56
|
更新或从本地开发版切换到 npm 版时,必须先停止 DSH Web,避免 Windows Junction 被运行中的 Node 进程占用:
|
|
58
57
|
|
|
59
58
|
```powershell
|
|
60
|
-
.\start\dsh-plugin-reinstall.bat 2.
|
|
59
|
+
.\start\dsh-plugin-reinstall.bat 2.3.1
|
|
61
60
|
```
|
|
62
61
|
|
|
63
62
|
这个脚本会按顺序停止 DSH Web、卸载当前 profile 中的插件、从 npm 安装指定版本并重新启动 DSH Web。若手动操作,请保持相同顺序:
|
|
@@ -65,22 +64,22 @@ 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.
|
|
67
|
+
dsh plugin --profile web add dsh-xiaomi-tts@2.3.1
|
|
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
|
|
|
85
84
|
```text
|
|
86
85
|
青年女性,声线清亮、亲切自然,吐字清楚,语速适中,情绪温柔克制。
|
|
@@ -88,11 +87,7 @@ dsh plugin --profile web add dsh-xiaomi-tts@2.2.1
|
|
|
88
87
|
|
|
89
88
|
建议包含年龄段与性别、声音质感、语速节奏和情绪底色,不写场景或动作。预置音色模式仍使用原来的内置音色配置。
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
配置项包括 API Key、朗读按钮、自动播报、模型、内置音色、音色描述和音频格式。两个开关默认开启;关闭朗读按钮会同步关闭自动播报,开启自动播报会自动开启朗读按钮。
|
|
94
|
-
|
|
95
|
-
浏览器可能阻止自动播放;遇到这种情况,请点击回复下方的朗读按钮。
|
|
90
|
+
浏览器可能阻止自动播放;遇到这种情况,请先尝试点击朗读按钮。
|
|
96
91
|
|
|
97
92
|
### 朗读文本处理
|
|
98
93
|
|
|
@@ -108,6 +103,72 @@ dsh plugin --profile web add dsh-xiaomi-tts@2.2.1
|
|
|
108
103
|
|
|
109
104
|
欢迎通过 [GitHub Issues](https://github.com/ppy-web/dsh-plugin-xiaomi-mimo-tts/issues) 提交问题反馈、功能建议或使用体验。
|
|
110
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
|
+
|
|
111
172
|
## 开发
|
|
112
173
|
|
|
113
174
|
```bash
|
|
@@ -117,6 +178,8 @@ pnpm test
|
|
|
117
178
|
pnpm pack:check
|
|
118
179
|
```
|
|
119
180
|
|
|
181
|
+
`lib/` 是构建产物,不纳入日常代码提交。提交功能时只更新源码和测试;升级版本并执行 `pnpm pack` 或 `pnpm publish` 时,`prepack` 会自动重新生成发布包。直接从 GitHub 安装时,`prepare` 会在安装阶段构建该产物。
|
|
182
|
+
|
|
120
183
|
## 许可证
|
|
121
184
|
|
|
122
185
|
MIT
|
package/assets/image.png
CHANGED
|
Binary file
|
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
|
|
@@ -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,55 +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': "预置音色模型";
|
|
26
|
-
readonly 'settings.voiceDesignModel': "自定义音色模型";
|
|
27
|
-
readonly 'settings.modelAutoPlayHintPreset': "预置音色模型支持实时流式播放。";
|
|
28
|
-
readonly 'settings.modelAutoPlayHintVoiceDesign': "自定义音色仅支持在回复完成后自动播放。";
|
|
29
|
-
readonly 'settings.voice': "内置音色";
|
|
30
|
-
readonly 'settings.voiceDesignPrompt': "自定义音色描述";
|
|
31
|
-
readonly 'settings.voiceDesignPromptHint': "按“年龄段 + 性别、声音质感、语速节奏、情绪底色”描述声音本身;不写场景或动作。";
|
|
32
|
-
readonly 'settings.format': "音频格式";
|
|
33
|
-
readonly 'settings.save': "保存";
|
|
34
|
-
readonly 'settings.saving': "保存中…";
|
|
35
|
-
readonly 'settings.saved': "已保存";
|
|
36
|
-
readonly 'settings.unsaved': "未保存";
|
|
37
|
-
readonly 'settings.overridden': "已覆盖";
|
|
38
|
-
readonly 'settings.reset': "恢复默认";
|
|
39
|
-
readonly 'settings.discard': "放弃修改";
|
|
40
|
-
readonly 'settings.failed': "保存失败,请重试。";
|
|
41
|
-
readonly 'settings.readOnly': "当前 DSH 设置为只读。";
|
|
42
|
-
readonly 'settings.secretPlaceholder': "输入新的 Xiaomi MiMo API Key";
|
|
43
|
-
readonly 'settings.expand': "展开设置";
|
|
44
|
-
readonly 'settings.collapse': "收起设置";
|
|
45
|
-
};
|
|
46
|
-
type LocaleKey = keyof typeof zh;
|
|
47
|
-
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
48
|
-
interface LocaleNamespaceMap {
|
|
49
|
-
'xiaomi-mimo-tts': LocaleKey;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
4
|
/** Register the Web action, settings card, locale dictionaries, and styles. */
|
|
53
5
|
export declare function apply(ctx: ClientContext): void;
|
|
54
|
-
export {};
|
|
55
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,64 @@
|
|
|
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.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.star': "点亮Star⭐";
|
|
44
|
+
readonly 'settings.uninstall': "卸载此插件";
|
|
45
|
+
readonly 'settings.uninstalling': "卸载中…";
|
|
46
|
+
readonly 'settings.uninstallQuestion': "确认卸载?";
|
|
47
|
+
readonly 'settings.uninstallConfirm': "确认";
|
|
48
|
+
readonly 'settings.uninstallCancel': "取消";
|
|
49
|
+
readonly 'settings.uninstalled': "已卸载,重启 DSH Web 后生效。";
|
|
50
|
+
readonly 'settings.uninstallFailed': "卸载失败,请重试或使用 DSH 命令行卸载。";
|
|
51
|
+
readonly 'settings.readOnly': "当前 DSH 设置为只读。";
|
|
52
|
+
readonly 'settings.secretPlaceholder': "输入新的 Xiaomi MiMo API Key";
|
|
53
|
+
readonly 'settings.expand': "展开设置";
|
|
54
|
+
readonly 'settings.collapse': "收起设置";
|
|
55
|
+
};
|
|
56
|
+
export declare const en: Record<keyof typeof zh, string>;
|
|
57
|
+
export type LocaleKey = keyof typeof zh;
|
|
58
|
+
export type Translate = (key: LocaleKey) => string;
|
|
59
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
60
|
+
interface LocaleNamespaceMap {
|
|
61
|
+
'xiaomi-mimo-tts': LocaleKey;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAqD9C,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"}
|