@deepseek-ai/dsh-experimental-client-ui-voice-input 0.1.7-rc.1 → 0.1.7-rc.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.i18n.yaml +36 -5
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/client.js +75 -26
- package/lib/types/client/PreparationCard.d.ts +1 -1
- package/lib/types/client/VoiceInput.d.ts +3 -1
- package/lib/types/client/VoiceSetupDialog.d.ts +14 -0
- package/lib/types/client/locales.d.ts +4 -1
- package/package.json +32 -32
package/README.i18n.yaml
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
# Bilingual-pair consistency record (docs/i18n/README.md):
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/experimental/client-ui-voice-input/README.md
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/:
|
|
6
|
+
en: 03616f946faebe55
|
|
7
|
+
zh: 293309d5ea63305e
|
|
8
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input:
|
|
9
|
+
en: e9ad8d109a27c143
|
|
10
|
+
zh: cb09880ab2ce8942
|
|
11
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/summary:
|
|
12
|
+
en: a75bfd33f96a2e7a
|
|
13
|
+
zh: 6866534c6a3e0662
|
|
14
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: 364c80ee00a374ff
|
|
17
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/use-this-package:
|
|
18
|
+
en: 44f25ad14ceda123
|
|
19
|
+
zh: 43c4680be42af1cf
|
|
20
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/understand-the-implementation:
|
|
21
|
+
en: 18807008bccfdb6e
|
|
22
|
+
zh: bb5a82c92d4aa056
|
|
23
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/further-exploration:
|
|
24
|
+
en: 5c64426add9d79d6
|
|
25
|
+
zh: 4e06aa2ead8d2ccd
|
|
26
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/model-experience:
|
|
27
|
+
en: 3c5a85f8b7129ce8
|
|
28
|
+
zh: d5f491ca88d9a810
|
|
29
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/model-experience/kv-cache-effect:
|
|
30
|
+
en: b5ec79db2e1d0dbc
|
|
31
|
+
zh: e5aff567ae5ee6fc
|
|
32
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/known-limitations-and-deferred-work:
|
|
33
|
+
en: e6d37618956f3ff8
|
|
34
|
+
zh: ebb74dd513ece5e3
|
|
35
|
+
/deepseek-ai-dsh-experimental-client-ui-voice-input/known-limitations-and-deferred-work/dev-note:
|
|
36
|
+
en: 0225ba087c5266f3
|
|
37
|
+
zh: 4e706f1b2b984e63
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
This optional browser plugin adds an outline microphone icon between the model selector and Send.
|
|
12
|
+
This optional browser plugin adds an outline microphone icon between the model selector and Send. When recognition is ready, clicking it opens a recording toolbar with measured audio levels, Cancel and Stop. The waveform stays shorter than the recording buttons. Stopping transcribes into the draft. Recognition preferences and model preparation live in plugin settings; language choices come from the selected provider.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ This optional browser plugin adds an outline microphone icon between the model s
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
Enable the [voice input bundle](../voice-input-bundle/README.md) from Plugins. After cache inspection, missing models trigger a setup prompt with Go to setup and Later actions. Go to setup opens bundle details; Download and prepare starts installation there. Intact cached models need no prompt or repeated installation. Before preparation, local providers can show their estimated disk, memory and setup-time requirements. The preparation summary starts collapsed; expand it to inspect completed, current and pending steps. Once ready, click the microphone, allow access and click Stop to transcribe. Cancel or Escape discards capture. Recognition feedback stays inside the toolbar. Provider and language preferences are saved from bundle details through the Settings service. Browser microphone access requires HTTPS or loopback and operating-system permission.
|
|
28
|
+
Enable the [voice input bundle](../voice-input-bundle/README.md) from Plugins. After cache inspection, missing models trigger a setup prompt with Go to setup and Later actions. Go to setup opens bundle details; Download and prepare starts installation there. Intact cached models need no prompt or repeated installation. Before recognition is ready, guidance appears only on click, with no microphone tooltip. Clicking the microphone opens the same guidance dialog; its action opens the voice bundle details without recording or downloading. Cache inspection, preparation in progress, failures and disconnected services instead offer navigation to status, progress or error details. The dialog moves focus to its navigation action and keeps Tab traversal inside it; Later or Escape restores the previous focus without changing or submitting the draft. Before preparation, local providers can show their estimated disk, memory and setup-time requirements. The preparation summary starts collapsed; expand it to inspect completed, current and pending steps. Once ready, click the microphone, allow access and click Stop to transcribe. Cancel or Escape discards capture. Recognition feedback stays inside the toolbar. Provider and language preferences are saved from bundle details through the Settings service. Browser microphone access requires HTTPS or loopback and operating-system permission.
|
|
29
29
|
|
|
30
30
|
Before downloading or retrying, **Model download source** offers Automatic and the origins advertised by the Host. SenseVoice normally offers Hugging Face and HF-Mirror; a fixed private deployment exposes only its configured origin. Manual selection uses only that source, while Automatic preserves the provider’s comparison and fallback policy. The choice is retained for retries in the current card, without changing deployment configuration or recognition preferences. Source controls are unavailable during preparation and hidden when resources are ready.
|
|
31
31
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
此可选浏览器插件在模型选择器与发送按钮之间添加空心麦克风图标。识别就绪后,点击展开录音栏,显示实际音量以及取消、停止按钮。声波高度低于录音按钮高度。停止后转写到草稿。识别偏好和模型准备放在插件设置中;语言选项来自所选 Provider。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用此包
|
|
27
27
|
|
|
28
|
-
在插件管理页启用[语音输入 Bundle](../voice-input-bundle/README.zh.md)。缓存检查后,缺少模型时弹出安装引导,可选择“前往安装”或“稍后”。“前往安装”打开 Bundle
|
|
28
|
+
在插件管理页启用[语音输入 Bundle](../voice-input-bundle/README.zh.md)。缓存检查后,缺少模型时弹出安装引导,可选择“前往安装”或“稍后”。“前往安装”打开 Bundle 详情,再点击“下载并准备”才开始安装。缓存完整时不弹引导,也无需重复安装。识别未就绪时不显示麦克风悬停提示,点击后才打开同一个引导弹窗;点击引导按钮进入语音 Bundle 详情,不会录音或下载。缓存检查、正在准备、准备失败或服务断连时,弹窗改为引导查看状态、进度或错误详情。弹窗将焦点移到导航按钮,并将 Tab 切换约束在弹窗内;选择“稍后”或按 Escape 关闭时恢复此前焦点,不改变或提交草稿。准备前,本地 Provider 可展示磁盘、内存与安装时间的估算。准备摘要默认折叠;展开后可查看已完成、当前和未开始的步骤。就绪后点击麦克风,允许访问,再点击停止以转写。取消或 Escape 丢弃录音。识别反馈留在工具栏内部。Provider 和语言偏好在 Bundle 详情中通过 Settings 服务保存。浏览器麦克风访问需要 HTTPS 或环回地址,以及操作系统权限。
|
|
29
29
|
|
|
30
30
|
下载或重试前,**模型下载源**提供自动选择及 Host 公布的源。SenseVoice 默认提供 Hugging Face 和 HF-Mirror;固定私有部署仅显示配置的源。手动选择只使用指定源,自动选择沿用提供方的比较与回退策略。当前卡片中的重试会保留选择,不修改部署配置或识别偏好。准备期间不能改源,资源就绪后隐藏源选择器。
|
|
31
31
|
|
package/lib/client.js
CHANGED
|
@@ -4887,6 +4887,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4887
4887
|
});
|
|
4888
4888
|
}
|
|
4889
4889
|
//#endregion
|
|
4890
|
+
//#region lib/types/client/VoiceSetupDialog.js
|
|
4891
|
+
/** Shared modal for voice activation and unavailable recognition. */
|
|
4892
|
+
/**
|
|
4893
|
+
* Guide activation or microphone clicks to the existing plugin details.
|
|
4894
|
+
* @param props - visibility, installation need and navigation callbacks.
|
|
4895
|
+
* @returns a dismissible prompt that never starts preparation or recording.
|
|
4896
|
+
*/
|
|
4897
|
+
function VoiceSetupDialog({ open, needsInstallation, onDismiss, onOpenDetails, t }) {
|
|
4898
|
+
return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
4899
|
+
open,
|
|
4900
|
+
title: t(needsInstallation ? "setupPrompt.title" : "setupPrompt.unavailableTitle"),
|
|
4901
|
+
closeLabel: t("cancel"),
|
|
4902
|
+
onClose: onDismiss,
|
|
4903
|
+
footer: (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4904
|
+
variant: "ghost",
|
|
4905
|
+
onClick: onDismiss,
|
|
4906
|
+
children: t("setupPrompt.later")
|
|
4907
|
+
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
4908
|
+
variant: "primary",
|
|
4909
|
+
"data-modal-autofocus": true,
|
|
4910
|
+
onClick: onOpenDetails,
|
|
4911
|
+
children: t(needsInstallation ? "setupPrompt.open" : "setupPrompt.details")
|
|
4912
|
+
})] }),
|
|
4913
|
+
children: (0, react_jsx_runtime.jsx)("p", { children: t(needsInstallation ? "setupPrompt.body" : "setupPrompt.unavailableBody") })
|
|
4914
|
+
});
|
|
4915
|
+
}
|
|
4916
|
+
//#endregion
|
|
4890
4917
|
//#region lib/types/client/VoiceInput.js
|
|
4891
4918
|
/** Click-to-record toolbar activity; transcripts remain in the original Session draft. */
|
|
4892
4919
|
async function disposeRecording(capture) {
|
|
@@ -4895,11 +4922,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4895
4922
|
} catch (_error) {}
|
|
4896
4923
|
}
|
|
4897
4924
|
/** Render a compact microphone or an expanded capture, transcription, or retry row. */
|
|
4898
|
-
function VoiceInput({ sessionId, inputActions, locked, onActiveChange, createRecording, transcribe, useSpeechReadiness, t }) {
|
|
4925
|
+
function VoiceInput({ sessionId, inputActions, locked, onActiveChange, createRecording, transcribe, openSettings, useSpeechReadiness, t }) {
|
|
4899
4926
|
const readiness = useSpeechReadiness((value) => value), catalog = readiness.catalog;
|
|
4900
4927
|
const provider = catalog?.providers.find((item) => item.id === catalog.selection.providerId);
|
|
4901
4928
|
const usable = readiness.connected && (provider?.preparation.phase === "ready" || provider?.preparation.phase === "standby" || provider?.preparation.phase === "waking");
|
|
4902
4929
|
const [phase, setPhase] = (0, react.useState)("idle"), [message, setMessage] = (0, react.useState)(""), [pending, setPending] = (0, react.useState)("");
|
|
4930
|
+
const [setupOpen, setSetupOpen] = (0, react.useState)(false);
|
|
4931
|
+
(0, react.useEffect)(() => {
|
|
4932
|
+
if (usable) setSetupOpen(false);
|
|
4933
|
+
}, [usable]);
|
|
4903
4934
|
const current = (0, react.useRef)(), generation = (0, react.useRef)(0);
|
|
4904
4935
|
const expanded = phase !== "idle";
|
|
4905
4936
|
(0, react.useLayoutEffect)(() => {
|
|
@@ -4920,11 +4951,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4920
4951
|
setPending("");
|
|
4921
4952
|
setMessage("");
|
|
4922
4953
|
setPhase("idle");
|
|
4954
|
+
setSetupOpen(false);
|
|
4923
4955
|
};
|
|
4924
4956
|
(0, react.useEffect)(() => {
|
|
4925
4957
|
setPending("");
|
|
4926
4958
|
setMessage("");
|
|
4927
4959
|
setPhase("idle");
|
|
4960
|
+
setSetupOpen(false);
|
|
4928
4961
|
const blur = () => {
|
|
4929
4962
|
if (current.current?.phase === "recording") cancel();
|
|
4930
4963
|
};
|
|
@@ -5037,8 +5070,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5037
5070
|
}
|
|
5038
5071
|
}
|
|
5039
5072
|
};
|
|
5040
|
-
if (!expanded) return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
5041
|
-
label: t(
|
|
5073
|
+
if (!expanded) return (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
5074
|
+
label: t("dictate"),
|
|
5075
|
+
disabled: !usable,
|
|
5042
5076
|
side: "top",
|
|
5043
5077
|
portal: true,
|
|
5044
5078
|
children: (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -5046,18 +5080,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5046
5080
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5047
5081
|
className: VoiceInput_module_css_default.trigger,
|
|
5048
5082
|
size: "sm",
|
|
5049
|
-
disabled:
|
|
5050
|
-
"aria-label": t("start"),
|
|
5083
|
+
disabled: locked,
|
|
5084
|
+
"aria-label": t(usable ? "start" : "setupPrompt.trigger"),
|
|
5085
|
+
"aria-haspopup": usable ? void 0 : "dialog",
|
|
5051
5086
|
onMouseDown: (event) => {
|
|
5052
5087
|
event.preventDefault();
|
|
5053
5088
|
},
|
|
5054
5089
|
onClick: () => {
|
|
5055
|
-
start();
|
|
5090
|
+
if (usable) start();
|
|
5091
|
+
else setSetupOpen(true);
|
|
5056
5092
|
},
|
|
5057
5093
|
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconMicrophoneOutlineRegular, { size: 18 })
|
|
5058
5094
|
})
|
|
5059
5095
|
})
|
|
5060
|
-
})
|
|
5096
|
+
}), (0, react_jsx_runtime.jsx)(VoiceSetupDialog, {
|
|
5097
|
+
open: setupOpen && !usable,
|
|
5098
|
+
needsInstallation: readiness.connected && provider?.location === "host-local" && provider.preparation.phase === "unprepared",
|
|
5099
|
+
onDismiss: () => {
|
|
5100
|
+
setSetupOpen(false);
|
|
5101
|
+
},
|
|
5102
|
+
onOpenDetails: () => {
|
|
5103
|
+
setSetupOpen(false);
|
|
5104
|
+
openSettings();
|
|
5105
|
+
},
|
|
5106
|
+
t
|
|
5107
|
+
})] });
|
|
5061
5108
|
return (0, react_jsx_runtime.jsxs)("div", {
|
|
5062
5109
|
className: VoiceInput_module_css_default.captureRow,
|
|
5063
5110
|
"data-voice-activity": phase,
|
|
@@ -5125,6 +5172,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5125
5172
|
"setupPrompt.body": "语音输入插件已开启。首次使用需要在本机下载并准备识别模型,请前往插件详情页查看空间、内存和时间说明,再开始安装。",
|
|
5126
5173
|
"setupPrompt.later": "稍后",
|
|
5127
5174
|
"setupPrompt.open": "前往安装",
|
|
5175
|
+
"setupPrompt.trigger": "打开语音输入引导",
|
|
5176
|
+
"setupPrompt.details": "前往语音插件设置",
|
|
5177
|
+
"setupPrompt.unavailableTitle": "语音识别尚未就绪",
|
|
5178
|
+
"setupPrompt.unavailableBody": "请前往语音插件详情页查看识别服务状态、准备进度或错误信息",
|
|
5128
5179
|
"setup.local": "将在运行 DSH 的机器上下载本地模型,无需安装 Python 或编译工具。",
|
|
5129
5180
|
"setup.disk": "硬盘空间",
|
|
5130
5181
|
"setup.diskValue": "建议预留约 {gb} GB,包含模型、运行时和下载缓存",
|
|
@@ -5189,7 +5240,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5189
5240
|
"preparation.cancelled": "准备已取消,已完成的下载会保留。",
|
|
5190
5241
|
"preparation.cancelling": "正在取消准备…",
|
|
5191
5242
|
cloudReady: "云端语音识别已就绪。",
|
|
5192
|
-
prepareRequired: "请先在语音插件设置中准备识别服务",
|
|
5193
5243
|
discard: "丢弃识别文字",
|
|
5194
5244
|
transcribingShort: "识别中…",
|
|
5195
5245
|
wakingShort: "唤醒中…",
|
|
@@ -5226,6 +5276,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5226
5276
|
"setupPrompt.body": "Voice input is enabled. First use requires downloading and preparing local recognition models. Open the plugin details to review disk space, memory and time estimates before starting setup.",
|
|
5227
5277
|
"setupPrompt.later": "Later",
|
|
5228
5278
|
"setupPrompt.open": "Go to setup",
|
|
5279
|
+
"setupPrompt.trigger": "Open voice input setup",
|
|
5280
|
+
"setupPrompt.details": "Open voice plugin settings",
|
|
5281
|
+
"setupPrompt.unavailableTitle": "Speech recognition is not ready",
|
|
5282
|
+
"setupPrompt.unavailableBody": "Open the voice plugin details to check recognition status, preparation progress, or errors.",
|
|
5229
5283
|
"setup.local": "Local models will be downloaded to the machine running DSH. No Python or compiler is required.",
|
|
5230
5284
|
"setup.disk": "Disk space",
|
|
5231
5285
|
"setup.diskValue": "Allow about {gb} GB for models, runtime, and download caches",
|
|
@@ -5290,7 +5344,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5290
5344
|
"preparation.cancelled": "Preparation cancelled. Completed downloads are retained.",
|
|
5291
5345
|
"preparation.cancelling": "Cancelling preparation…",
|
|
5292
5346
|
cloudReady: "Cloud speech recognition is ready.",
|
|
5293
|
-
prepareRequired: "Prepare recognition in the voice plugin settings first",
|
|
5294
5347
|
discard: "Discard transcript",
|
|
5295
5348
|
transcribingShort: "Transcribing…",
|
|
5296
5349
|
wakingShort: "Waking…",
|
|
@@ -5666,7 +5719,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5666
5719
|
}
|
|
5667
5720
|
//#endregion
|
|
5668
5721
|
//#region lib/types/client/VoiceSetupPrompt.js
|
|
5669
|
-
/**
|
|
5722
|
+
/** Activation guidance after the Host inspects local recognition resources. */
|
|
5670
5723
|
/**
|
|
5671
5724
|
* Offer navigation to installation without starting a download.
|
|
5672
5725
|
* @param props - activation navigation and the shared Host readiness observer.
|
|
@@ -5684,21 +5737,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5684
5737
|
needsSetup,
|
|
5685
5738
|
onDismiss
|
|
5686
5739
|
]);
|
|
5687
|
-
return (0, react_jsx_runtime.jsx)(
|
|
5740
|
+
return (0, react_jsx_runtime.jsx)(VoiceSetupDialog, {
|
|
5688
5741
|
open: needsSetup,
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
variant: "ghost",
|
|
5694
|
-
onClick: onDismiss,
|
|
5695
|
-
children: t("setupPrompt.later")
|
|
5696
|
-
}), (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
5697
|
-
variant: "primary",
|
|
5698
|
-
onClick: onOpenDetails,
|
|
5699
|
-
children: t("setupPrompt.open")
|
|
5700
|
-
})] }),
|
|
5701
|
-
children: (0, react_jsx_runtime.jsx)("p", { children: t("setupPrompt.body") })
|
|
5742
|
+
needsInstallation: true,
|
|
5743
|
+
onDismiss,
|
|
5744
|
+
onOpenDetails,
|
|
5745
|
+
t
|
|
5702
5746
|
});
|
|
5703
5747
|
}
|
|
5704
5748
|
//#endregion
|
|
@@ -5706,7 +5750,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5706
5750
|
const inject = [
|
|
5707
5751
|
"remote",
|
|
5708
5752
|
"slots",
|
|
5709
|
-
"locale"
|
|
5753
|
+
"locale",
|
|
5754
|
+
"pluginNavigation"
|
|
5710
5755
|
];
|
|
5711
5756
|
function registerUi(ctx) {
|
|
5712
5757
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
@@ -5720,6 +5765,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5720
5765
|
await Promise.all([...recordings].map((recording) => recording.dispose()));
|
|
5721
5766
|
});
|
|
5722
5767
|
const actions = {
|
|
5768
|
+
openSettings: () => {
|
|
5769
|
+
ctx.pluginNavigation.openBundle("@deepseek-ai/dsh-experimental-voice-input-bundle");
|
|
5770
|
+
},
|
|
5723
5771
|
hooks: { speechReadiness: readiness.state },
|
|
5724
5772
|
createRecording: () => {
|
|
5725
5773
|
const recording = new Recording(() => {
|
|
@@ -5771,7 +5819,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5771
5819
|
const ui = ctx.inject([
|
|
5772
5820
|
"remote.speech",
|
|
5773
5821
|
"slots",
|
|
5774
|
-
"locale"
|
|
5822
|
+
"locale",
|
|
5823
|
+
"pluginNavigation"
|
|
5775
5824
|
], registerUi);
|
|
5776
5825
|
try {
|
|
5777
5826
|
await ui;
|
|
@@ -10,5 +10,5 @@ export type PreparationCardProps = Pick<InjectFace<VoiceInputInjected>, 'prepare
|
|
|
10
10
|
/** Render a collapsed current-step summary or all Host-owned preparation steps. */
|
|
11
11
|
export declare function PreparationCard({ provider, connected, prepare, cancelPreparation, t }: PreparationCardProps): import("react").JSX.Element;
|
|
12
12
|
/** Recognition preferences and preparation cards shared by plugin details and Settings. */
|
|
13
|
-
export declare function VoicePreparation({ useSpeechReadiness, ...props }: InjectFace<VoiceInputInjected> & PropsLocale<typeof NS>): import("react").JSX.Element;
|
|
13
|
+
export declare function VoicePreparation({ useSpeechReadiness, ...props }: Pick<InjectFace<VoiceInputInjected>, 'useSpeechReadiness' | 'configure' | 'prepare' | 'cancelPreparation'> & PropsLocale<typeof NS>): import("react").JSX.Element;
|
|
14
14
|
//# sourceMappingURL=PreparationCard.d.ts.map
|
|
@@ -7,6 +7,8 @@ import type { SpeechReadiness } from './readiness.ts';
|
|
|
7
7
|
import { NS } from './locales.ts';
|
|
8
8
|
/** Host calls injected without exposing a Cordis Context to React. */
|
|
9
9
|
export interface VoiceInputActions {
|
|
10
|
+
/** Open the voice bundle details without starting preparation. */
|
|
11
|
+
openSettings: () => void;
|
|
10
12
|
/** @returns one microphone operation owned by the plugin lifecycle. */
|
|
11
13
|
createRecording: () => Recording;
|
|
12
14
|
transcribe: (request: TranscriptionRequest, signal: AbortSignal) => Promise<RemoteResult<Transcript>>;
|
|
@@ -23,5 +25,5 @@ export interface VoiceInputInjected extends VoiceInputActions {
|
|
|
23
25
|
/** Composer-owned expansion and draft actions; preferences stay in plugin settings. */
|
|
24
26
|
export type VoiceInputProps = Pick<PropsRuntime<'conversation.input.activity'>, 'sessionId' | 'inputActions' | 'locked' | 'onActiveChange'> & PropsLocale<typeof NS> & InjectFace<VoiceInputInjected>;
|
|
25
27
|
/** Render a compact microphone or an expanded capture, transcription, or retry row. */
|
|
26
|
-
export declare function VoiceInput({ sessionId, inputActions, locked, onActiveChange, createRecording, transcribe, useSpeechReadiness, t }: VoiceInputProps): import("react").JSX.Element;
|
|
28
|
+
export declare function VoiceInput({ sessionId, inputActions, locked, onActiveChange, createRecording, transcribe, openSettings, useSpeechReadiness, t }: VoiceInputProps): import("react").JSX.Element;
|
|
27
29
|
//# sourceMappingURL=VoiceInput.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
+
import type { NS } from './locales.ts';
|
|
3
|
+
type VoiceSetupDialogProps = PropsLocale<typeof NS> & Pick<PropsRuntime<'plugins.bundle.activation'>, 'onDismiss' | 'onOpenDetails'> & {
|
|
4
|
+
open: boolean;
|
|
5
|
+
needsInstallation: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Guide activation or microphone clicks to the existing plugin details.
|
|
9
|
+
* @param props - visibility, installation need and navigation callbacks.
|
|
10
|
+
* @returns a dismissible prompt that never starts preparation or recording.
|
|
11
|
+
*/
|
|
12
|
+
export declare function VoiceSetupDialog({ open, needsInstallation, onDismiss, onOpenDetails, t }: VoiceSetupDialogProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=VoiceSetupDialog.d.ts.map
|
|
@@ -7,6 +7,10 @@ export declare const zh: {
|
|
|
7
7
|
readonly 'setupPrompt.body': "语音输入插件已开启。首次使用需要在本机下载并准备识别模型,请前往插件详情页查看空间、内存和时间说明,再开始安装。";
|
|
8
8
|
readonly 'setupPrompt.later': "稍后";
|
|
9
9
|
readonly 'setupPrompt.open': "前往安装";
|
|
10
|
+
readonly 'setupPrompt.trigger': "打开语音输入引导";
|
|
11
|
+
readonly 'setupPrompt.details': "前往语音插件设置";
|
|
12
|
+
readonly 'setupPrompt.unavailableTitle': "语音识别尚未就绪";
|
|
13
|
+
readonly 'setupPrompt.unavailableBody': "请前往语音插件详情页查看识别服务状态、准备进度或错误信息";
|
|
10
14
|
readonly 'setup.local': "将在运行 DSH 的机器上下载本地模型,无需安装 Python 或编译工具。";
|
|
11
15
|
readonly 'setup.disk': "硬盘空间";
|
|
12
16
|
readonly 'setup.diskValue': "建议预留约 {gb} GB,包含模型、运行时和下载缓存";
|
|
@@ -71,7 +75,6 @@ export declare const zh: {
|
|
|
71
75
|
readonly 'preparation.cancelled': "准备已取消,已完成的下载会保留。";
|
|
72
76
|
readonly 'preparation.cancelling': "正在取消准备…";
|
|
73
77
|
readonly cloudReady: "云端语音识别已就绪。";
|
|
74
|
-
readonly prepareRequired: "请先在语音插件设置中准备识别服务";
|
|
75
78
|
readonly discard: "丢弃识别文字";
|
|
76
79
|
readonly transcribingShort: "识别中…";
|
|
77
80
|
readonly wakingShort: "唤醒中…";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-experimental-client-ui-voice-input",
|
|
3
3
|
"description": "Record speech and insert editable text into the conversation draft",
|
|
4
|
-
"version": "0.1.7-rc.
|
|
4
|
+
"version": "0.1.7-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
|
|
36
37
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
37
|
-
"@deepseek-ai/dsh-api-
|
|
38
|
-
"@deepseek-ai/dsh-client-
|
|
39
|
-
"@deepseek-ai/dsh-client-
|
|
40
|
-
"@deepseek-ai/dsh-client-ui-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-client-ui-
|
|
43
|
-
"@deepseek-ai/dsh-client-ui-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-client-store": "0.1.7-rc.1"
|
|
38
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.7-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.7-rc.2",
|
|
43
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-session": "0.1.7-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-experimental-api-speech-to-text": "0.1.7-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.7-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.1.7-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-experimental-speech-to-text": "0.1.7-rc.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/react": "~18.3.1",
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"react-dom": "^18.2.0",
|
|
57
57
|
"@testing-library/react": "^16.1.0",
|
|
58
58
|
"@deepseek-ai/cordis": "~4.0.4",
|
|
59
|
-
"@deepseek-ai/dsh-api-remotes": "0.1.7-rc.
|
|
60
|
-
"@deepseek-ai/dsh-api-session-controller": "0.1.7-rc.
|
|
61
|
-
"@deepseek-ai/dsh-client-
|
|
62
|
-
"@deepseek-ai/dsh-client-
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-
|
|
65
|
-
"@deepseek-ai/dsh-session": "0.1.7-rc.
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-experimental-speech-to-text": "0.1.7-rc.
|
|
69
|
-
"@deepseek-ai/dsh-experimental-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-client-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-client-
|
|
74
|
-
"@deepseek-ai/dsh-client-
|
|
59
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.7-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.7-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.7-rc.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-session": "0.1.7-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-experimental-api-speech-to-text": "0.1.7-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-experimental-speech-to-text": "0.1.7-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.7-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.7-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.1.7-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-client-test-runtime": "0.1.7-rc.2"
|
|
75
75
|
},
|
|
76
76
|
"dsh": {
|
|
77
77
|
"client": {
|