@goodandready/dsh-voice 0.9.53 → 0.9.55
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.md +12 -0
- package/README.ru.md +12 -0
- package/README.zh.md +39 -0
- package/lib/client.js +59 -85
- package/lib/host-routes.js +4 -0
- package/lib/schema.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -211,8 +211,20 @@ Open **Settings → Plugins → Plugin settings → Voice** in the Web UI:
|
|
|
211
211
|
hotkey: Control
|
|
212
212
|
autoStart: true
|
|
213
213
|
whisperModel: /models/ggml-medium-q8_0.bin
|
|
214
|
+
# Composer button visibility toggles (default: true)
|
|
215
|
+
showDictationModeButton: true # Mode selector pill ([Clean], [Task], [Bug], [Note], [Verbatim])
|
|
216
|
+
showDictationButton: true # Voice typing / mic button
|
|
217
|
+
showMessageButton: true # Voice note / message button
|
|
214
218
|
```
|
|
215
219
|
|
|
220
|
+
> **Composer button visibility (#326, #328)**:
|
|
221
|
+
> The `showDictationModeButton`, `showDictationButton`, and `showMessageButton` settings allow independently toggling the visibility of voice action buttons in the composer area (`conversation.input.right`).
|
|
222
|
+
> - When a button is disabled, it is cleanly removed from the interface across both current and newly opened chat tabs.
|
|
223
|
+
> - When all three buttons are disabled, the container returns `null` and unmounts with zero DOM footprint.
|
|
224
|
+
> - Settings persist reliably across application restarts in both Desktop and Web profiles (saved in `cordis.patch.yml`).
|
|
225
|
+
> - Underlying voice functionality (including keyboard push-to-talk with `hotkey: Control`, Silero VAD, and STT pipelines) remains fully active.
|
|
226
|
+
> - Primary navigation buttons (`Remote`, `Tasks`, `Kanban`, `Scheduled Tasks`) belong to separate core slots and remain completely unaffected.
|
|
227
|
+
|
|
216
228
|
> **Note on language handling**: Setting `language: ""` (default) allows providers to auto-detect the spoken language. Spoken numeral normalization (`wordsToDigits`) and standard Russian tech slang correction (`DEFAULT_JARGON_DICTIONARY`) activate conditionally only when Russian is selected or auto-detected in the transcript, ensuring non-Russian speech is never distorted.
|
|
217
229
|
|
|
218
230
|
---
|
package/README.ru.md
CHANGED
|
@@ -211,8 +211,20 @@ dsh plugin --profile web add @goodandready/dsh-voice
|
|
|
211
211
|
hotkey: Control
|
|
212
212
|
autoStart: true
|
|
213
213
|
whisperModel: /models/ggml-medium-q8_0.bin
|
|
214
|
+
# Переключатели видимости кнопок в строке ввода (по умолчанию: true)
|
|
215
|
+
showDictationModeButton: true # Переключатель режима диктовки ([Clean], [Task], [Bug], [Note], [Verbatim])
|
|
216
|
+
showDictationButton: true # Кнопка голосового ввода (микрофон)
|
|
217
|
+
showMessageButton: true # Кнопка голосового сообщения
|
|
214
218
|
```
|
|
215
219
|
|
|
220
|
+
> **Видимость кнопок поля ввода (#326, #328)**:
|
|
221
|
+
> Параметры `showDictationModeButton`, `showDictationButton` и `showMessageButton` позволяют независимо настраивать отображение голосовых кнопок в правой части поля ввода (`conversation.input.right`).
|
|
222
|
+
> - При отключении любого тумблера соответствующая кнопка скрывается как в текущем диалоге, так и в новых чатах.
|
|
223
|
+
> - При отключении всех трёх кнопок контейнер возвращает `null` и выгружается с нулевым следом в DOM.
|
|
224
|
+
> - Настройки надёжно сохраняются при перезапуске приложения и DSH как в Desktop, так и в Web профилях (в `cordis.patch.yml`).
|
|
225
|
+
> - Базовые возможности плагина (горячая клавиша по умолчанию `hotkey: Control`, Silero VAD, STT цепочки) остаются полностью функциональными.
|
|
226
|
+
> - Основные навигационные кнопки (`Remote`, `Tasks`, `Kanban`, `Scheduled Tasks`) используют собственные системные слоты и остаются полностью нетронутыми.
|
|
227
|
+
|
|
216
228
|
> **Примечание по языку**: Значение `language: ""` (по умолчанию) включает автоопределение языка провайдером. Нормализация числительных словами в цифры и стандартный словарь технического сленга применяются адаптивно только при распознавании русской речи, исключая искажение англоязычного текста.
|
|
217
229
|
|
|
218
230
|
---
|
package/README.zh.md
CHANGED
|
@@ -169,6 +169,45 @@ v0.8.18 质量审查后的修复批次(Gitea #79–#87,PR #88):
|
|
|
169
169
|
|
|
170
170
|
---
|
|
171
171
|
|
|
172
|
+
## ⚙️ 配置说明
|
|
173
|
+
|
|
174
|
+
在 Web UI 中打开 **设置 → 插件 → 插件设置 → Voice**:
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
- id: dsh-voice
|
|
178
|
+
config:
|
|
179
|
+
dictation:
|
|
180
|
+
language: "" # 默认自动检测;或指定 "zh"、"en"、"ru" 等
|
|
181
|
+
vadSilenceMs: 700
|
|
182
|
+
chain:
|
|
183
|
+
- provider: deepgram
|
|
184
|
+
- provider: groq
|
|
185
|
+
- provider: local-whisper
|
|
186
|
+
message:
|
|
187
|
+
language: "" # 默认自动检测;或指定 "zh"、"en"、"ru" 等
|
|
188
|
+
autoSendMs: 4000
|
|
189
|
+
chain:
|
|
190
|
+
- provider: openai
|
|
191
|
+
- provider: local-whisper
|
|
192
|
+
hotkey: Control
|
|
193
|
+
autoStart: true
|
|
194
|
+
whisperModel: /models/ggml-medium-q8_0.bin
|
|
195
|
+
# 输入框按钮可见性开关(默认:true)
|
|
196
|
+
showDictationModeButton: true # 听写模式选择胶囊 ([Clean], [Task], [Bug], [Note], [Verbatim])
|
|
197
|
+
showDictationButton: true # 语音输入 / 麦克风按钮
|
|
198
|
+
showMessageButton: true # 语音消息按钮
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
> **输入框按钮可见性 (#326, #328)**:
|
|
202
|
+
> `showDictationModeButton`、`showDictationButton` 与 `showMessageButton` 支持在输入框右侧(`conversation.input.right`)独立显示或隐藏按钮。
|
|
203
|
+
> - 单独关闭时,按钮在当前及新建会话中立即隐藏。
|
|
204
|
+
> - 全部关闭时,容器组件返回 `null` 并完全卸载,零 DOM 残留。
|
|
205
|
+
> - 设置在 Desktop 与 Web 环境下重启均可靠持久化(保存在 `cordis.patch.yml` 中)。
|
|
206
|
+
> - 底层语音功能(快捷键对讲 `hotkey: Control`、VAD 停顿检测及转写链路)保持完全可用。
|
|
207
|
+
> - 主导航按钮(Remote、Tasks、Kanban、Scheduled Tasks)属于系统核心独立槽位,完全不受影响。
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
172
211
|
## 📦 安装指南
|
|
173
212
|
|
|
174
213
|
```bash
|
package/lib/client.js
CHANGED
|
@@ -50,7 +50,7 @@ const en = {
|
|
|
50
50
|
'hotkeyHint2':'Any letter, F-key or modifier.', 'language':'Language', 'langAuto':'Auto-detect',
|
|
51
51
|
'langRu':'Russian (ru)', 'langEn':'English (en)', 'langZh':'Chinese (zh)', 'langUk':'Ukrainian (uk)', 'langDe':'German (de)',
|
|
52
52
|
'dictationHint':'Speech is chunked at pauses into the input.', 'pauseMs':'Pause that ends a phrase, ms',
|
|
53
|
-
'pauseHint':'
|
|
53
|
+
'pauseHint':'Pause duration that triggers phrase cut', 'speaking':'You are speaking…',
|
|
54
54
|
'silence':'Pause…', 'normalizeTranscript':'Normalize file transcripts', 'undo':'Undo last insert', 'undone':'Insert undone',
|
|
55
55
|
'nothingToUndo':'Nothing to undo', 'clipping':'Clipping', 'clippingHint':'Too loud (clipping)', 'lowVolume':'Low signal',
|
|
56
56
|
'lowVolumeHint':'Speak louder', 'vadEngine':'VAD engine', 'vadEngineHint':'Neural Silero VAD (WASM/ONNX) or classic amplitude gate',
|
|
@@ -62,15 +62,15 @@ const en = {
|
|
|
62
62
|
'polishHint':'Fix punctuation and fillers via the harness model before inserting', 'stream':'Continuous dictation',
|
|
63
63
|
'streamHint':'Cut phrases by a timer while you speak instead of waiting for a long pause', 'streamChunkMs':'Stream chunk (ms)',
|
|
64
64
|
'vadAdapt':'Adaptive silence', 'vadAdaptHint':'Auto-tune the silence threshold to the pace of your speech. 0 = fixed',
|
|
65
|
-
'wakeWord':'Wake word', 'wakeWordHint':'
|
|
65
|
+
'wakeWord':'Wake word', 'wakeWordHint':'Starts recording when speech begins with phrase. Empty = off',
|
|
66
66
|
'bargeIn':'Barge-in', 'polishSend':'Polish whole draft before sending',
|
|
67
67
|
'polishSendHint':'Run the composed draft through the model right before sending', 'editablePreview':'Editable preview before send',
|
|
68
|
-
'editablePreviewHint':'
|
|
68
|
+
'editablePreviewHint':'Preview text before sending with editing options.', 'editPreview':'Edit',
|
|
69
69
|
'sendNow':'Send', 'cancelPreview':'Cancel', 'rawText':'Raw', 'polishedText':'Polished',
|
|
70
70
|
'sessionMismatch':'Different chat active; canceled to prevent leak.', 'sessionCommands':'Voice session commands',
|
|
71
71
|
'sessionCommandsHint':'Commands act on session instead of being inserted as text',
|
|
72
72
|
'polishBaseUrl':'Offline polish endpoint',
|
|
73
|
-
'polishBaseUrlHint':'OpenAI
|
|
73
|
+
'polishBaseUrlHint':'OpenAI /chat/completions URL. Empty = harness model',
|
|
74
74
|
'polishModel':'Offline polish model', 'polishKeyEnv':'Offline polish key credential',
|
|
75
75
|
'voiceCommandsLabel':'Voice edit commands ("new line", "paragraph")',
|
|
76
76
|
'normalizeTranscriptHint':'transcribe_audio: spoken numbers to digits, tidy punctuation', 'messageTitle':'Voice message',
|
|
@@ -85,13 +85,13 @@ const en = {
|
|
|
85
85
|
'bilingualDeveloperPrompt':'Bilingual developer context (RU/EN)',
|
|
86
86
|
'bilingualDeveloperPromptHint':'Hints dev terms & CLI to STT to prevent phonetic transliteration',
|
|
87
87
|
'calibrateNoise':'Calibrate Noise (2s)',
|
|
88
|
-
'calibrateNoiseHint':'
|
|
88
|
+
'calibrateNoiseHint':'Measures room noise for 2s to calibrate noise gate', 'calibrating':'Measuring noise…',
|
|
89
89
|
'calibratedMsg':'Gate set: {db} dB (ambient: {noise} dB)', 'calibratedValue':'Calibrated', 'save':'Save', 'saved':'Saved ✓',
|
|
90
90
|
'openrouterWarning':'OpenRouter lacks /audio/transcriptions — use openai-chat-audio template',
|
|
91
91
|
'noiseSuppression':'Hardware noise suppression',
|
|
92
92
|
'noiseSuppressionHint':'Enable browser noise suppression, echo cancellation, and auto gain control',
|
|
93
93
|
'contextGlossary':'Context glossary injection',
|
|
94
|
-
'contextGlossaryHint':'
|
|
94
|
+
'contextGlossaryHint':'Extract identifiers from composer to improve STT',
|
|
95
95
|
'providerDashboard':'Provider Latency & Health', 'avgLatency':'Avg latency', 'successRate':'Success', 'fast':'Fast', 'normal':'Normal',
|
|
96
96
|
'slow':'Slow', 'error':'Error', 'idle':'No calls', 'play':'Play', 'pause':'Pause', 'listenBack':'Listen back',
|
|
97
97
|
'lastRecording':'Last voice note', 'sensevoiceHint':'SenseVoice-ONNX / Sherpa-ONNX · ultra-fast local STT (~50ms)',
|
|
@@ -122,9 +122,10 @@ const en = {
|
|
|
122
122
|
'installSensevoice':'Install SenseVoice-Small (1-Click)', 'installingSensevoice':'Installing SenseVoice…', 'sensevoiceReady':'Ready',
|
|
123
123
|
'sensevoiceNotInstalled':'Not Installed', 'sensevoiceDownloading':'Downloading model…',
|
|
124
124
|
'turnTakingTitle':'Turn-Taking & Audio Coordination',
|
|
125
|
-
'turnTakingDesc':'
|
|
125
|
+
'turnTakingDesc':'Prevents assistant audio feedback into mic.',
|
|
126
126
|
'gatedTurnTaking':'Gated Mode (mute mic while assistant is speaking)',
|
|
127
127
|
'bargeInDesc':'True Barge-In (speaking interrupts assistant speech)', 'smartActionsTitle':'Hands-free & Smart Actions', 'audioFeedback':'Audio cues',
|
|
128
|
+
'showDictationModeBtn':'Dictation mode button', 'showDictationBtn':'Voice typing button', 'showMessageBtn':'Voice message button',
|
|
128
129
|
'autoSendVisualRing':'Silence Ring countdown animation',
|
|
129
130
|
'voiceActionsLabel':'Voice action commands ("send", "cancel", "clear", "new line")',
|
|
130
131
|
'liveInterimPreview':'Live speech preview (ghost text preview)',
|
|
@@ -134,8 +135,8 @@ const en = {
|
|
|
134
135
|
'dictationPromptsTitle':'Dictation Prompt Templates',
|
|
135
136
|
'dictationPromptsDesc':'Custom templates for dictation modes. Use {text} as speech placeholder.',
|
|
136
137
|
'promptClean':'Clean text prompt', 'promptTask':'Agent task prompt', 'promptNote':'Note prompt', 'resetPrompts':'Reset to defaults',
|
|
137
|
-
'voiceMacrosTitle':'Voice
|
|
138
|
-
'voiceMacrosDesc':'Spoken
|
|
138
|
+
'voiceMacrosTitle':'Voice Macros',
|
|
139
|
+
'voiceMacrosDesc':'Spoken triggers expanded into prompt templates.', 'addMacro':'Add macro',
|
|
139
140
|
'macroTrigger':'Spoken trigger phrase', 'macroTemplate':'Expanded prompt template', 'macroDelete':'Delete', 'rawTab':'Raw STT',
|
|
140
141
|
'resultTab':'Result', 'llmUnavailableFallback':'LLM unavailable, showing raw transcript', 'jargonTitle':'Developer Lexicon & IT Jargon',
|
|
141
142
|
'techJargonCorrection':'Auto-correct technical jargon (GitHub, Docker, pnpm, Kubernetes, etc.)', 'jargonAdd':'Add replacement',
|
|
@@ -165,9 +166,9 @@ const en = {
|
|
|
165
166
|
'wizardHintDevice':'Check microphone connection or select a different input device.',
|
|
166
167
|
'wizardHintHttps':'Open DeepSeek Harness via HTTPS or localhost address.',
|
|
167
168
|
'wizardHintProvider':'Configure STT engine credentials or install SenseVoice model below.',
|
|
168
|
-
'wizardHintWinDesktop':'Windows Settings →
|
|
169
|
+
'wizardHintWinDesktop':'Windows Settings → Microphone: enable desktop access.',
|
|
169
170
|
'wizardHintWinBrowser':'Allow microphone access in browser address bar.',
|
|
170
|
-
'wizardHintMacDesktop':'macOS Settings →
|
|
171
|
+
'wizardHintMacDesktop':'macOS Settings → Microphone: enable DSH.',
|
|
171
172
|
'wizardOpenWinMicSettings':'Open Windows Mic Settings', 'wizardFinishSuccess':'Setup & Verification Complete',
|
|
172
173
|
'wizardSkip':'Skip Wizard', 'wizardStatusCompleted':'Mic & STT verified', 'exportDiagnosticsBtn':'Export Diagnostics',
|
|
173
174
|
'exportingDiagnostics':'Exporting report…', 'diagnosticsExportSuccess':'Report downloaded',
|
|
@@ -198,7 +199,7 @@ const zh = {
|
|
|
198
199
|
'hide':'隐藏', 'title':'语音', 'recordSlot':'语音录制', 'browserHint':'Web Speech 语音识别 (设为 auto 时使用页面或浏览器语言,Chrome 会上传音频至 Google)',
|
|
199
200
|
'browserWebGpu':'浏览器 WebGPU Whisper (离线)', 'browserWebGpuHint':'通过 WebGPU/WASM 在浏览器本地运行 Whisper 模型:完全离线,音频无需上传到主机。',
|
|
200
201
|
'npuProvider':'硬件加速 (SBC NPU / 主机)',
|
|
201
|
-
'npuProviderHint':'SenseVoice
|
|
202
|
+
'npuProviderHint':'SenseVoice 加速引擎:CPU、Rockchip NPU、OpenVINO 或 CUDA。', 'npuThreads':'计算线程 (CPU/SBC)',
|
|
202
203
|
'benchmarkTitle':'硬件基准测试 (速度与延迟)', 'runBenchmarkBtn':'运行基准测试', 'benchmarking':'正在运行测试…',
|
|
203
204
|
'benchmarkHint':'测试当前执行提供者在 1.0 秒音频下的实时率 (RTF) 与推理延迟。', 'webgpuStatus':'浏览器 WebGPU 状态', 'webgpuAvailable':'WebGPU 可用 (硬件加速就绪)',
|
|
204
205
|
'webgpuNotAvailable':'未检测到 WebGPU (将自动回退到服务端)', 'openaiHint':'whisper-1 · 密钥 OPENAI_API_KEY',
|
|
@@ -255,7 +256,8 @@ const zh = {
|
|
|
255
256
|
'sensevoiceDesc':'CPU 上超低延迟离线语音识别 (50–100ms,中英俄多语种)。', 'installSensevoice':'一键安装 SenseVoice-Small',
|
|
256
257
|
'installingSensevoice':'正在安装 SenseVoice…', 'sensevoiceReady':'已就绪', 'sensevoiceNotInstalled':'未安装', 'sensevoiceDownloading':'正在下载模型…',
|
|
257
258
|
'turnTakingTitle':'轮流对话与音频协同', 'turnTakingDesc':'协调听与说,避免扬声器播放的声音被麦克风二次拾音。', 'gatedTurnTaking':'门控模式 (助手播报时麦克风自动静音)',
|
|
258
|
-
'bargeInDesc':'实时打断 (说话时立即打断助手朗读)', 'smartActionsTitle':'免提与智能指令', 'audioFeedback':'声音提示',
|
|
259
|
+
'bargeInDesc':'实时打断 (说话时立即打断助手朗读)', 'smartActionsTitle':'免提与智能指令', 'audioFeedback':'声音提示',
|
|
260
|
+
'showDictationModeBtn':'听写模式按钮', 'showDictationBtn':'语音输入按钮', 'showMessageBtn':'语音消息按钮', 'autoSendVisualRing':'环形倒计时动画指示器',
|
|
259
261
|
'voiceActionsLabel':'语音动作指令 ("发送", "取消", "清空", "换行")', 'liveInterimPreview':'实时语音文本预览 (幽灵文本)', 'structuredPromptVoice':'语音应答交互式选择提示',
|
|
260
262
|
'modeVerbatim':'逐字直录', 'modeClean':'清爽文本', 'modeTask':'智能体任务', 'modeNote':'便签备忘', 'modeBug':'缺陷报告', 'promptBug':'缺陷报告提示词', 'promptBugPlaceholder':'默认:问题概要、异常现象、复现步骤、预期行为', 'dictationModeTitle':'听写后处理模式',
|
|
261
263
|
'dictationModeDesc':'听写文本后处理:逐字直录(零LLM)、清爽文本、智能体任务或便签。', 'dictationPromptsTitle':'听写提示词模板',
|
|
@@ -1896,23 +1898,28 @@ voice.inputActions = props.inputActions
|
|
|
1896
1898
|
voice.input = props.input
|
|
1897
1899
|
if (v.phase !== 'idle' && v.phase !== 'error' && !hold.armed) return null
|
|
1898
1900
|
const err = v.phase === 'error'
|
|
1899
|
-
const hk = voice.hotkey ?
|
|
1901
|
+
const hk = voice.hotkey ? ' (' + voice.hotkey + ')' : ''
|
|
1900
1902
|
const curMode = voice.selectedDictationMode || (voice.settings && voice.settings.dictationMode) || 'clean'
|
|
1903
|
+
const showDictationMode = voice.settings ? voice.settings.showDictationModeButton !== false : true
|
|
1904
|
+
const showDictation = voice.settings ? voice.settings.showDictationButton !== false : true
|
|
1905
|
+
const showMessage = voice.settings ? voice.settings.showMessageButton !== false : true
|
|
1906
|
+
const hasLastNote = !!(voice.lastNote && voice.lastNote.url)
|
|
1907
|
+
if (!showDictationMode && !showDictation && !showMessage && !hasLastNote) return null
|
|
1901
1908
|
return h(React.Fragment, null,
|
|
1902
|
-
h('button', {
|
|
1909
|
+
showDictationMode ? h('button', {
|
|
1903
1910
|
type: 'button',
|
|
1904
1911
|
className: 'dvo-mode-pill-btn',
|
|
1905
1912
|
title: t('dictationModeTitle') + ': ' + getDictationModeLabel(curMode, t),
|
|
1906
1913
|
'aria-label': t('dictationModeTitle') + ': ' + getDictationModeLabel(curMode, t),
|
|
1907
1914
|
onClick: cycleDictationMode,
|
|
1908
|
-
}, getDictationModeLabel(curMode, t)),
|
|
1909
|
-
h('button', {
|
|
1915
|
+
}, getDictationModeLabel(curMode, t)) : null,
|
|
1916
|
+
showDictation ? h('button', {
|
|
1910
1917
|
type: 'button', className: 'dvo-btn', 'data-err': err ? '1' : '0',
|
|
1911
1918
|
title: err ? v.error : t('dictationBtn'),
|
|
1912
1919
|
'aria-label': err ? v.error : t('dictationBtn'),
|
|
1913
1920
|
onClick: startDictation,
|
|
1914
|
-
}, micIcon()),
|
|
1915
|
-
h('button', {
|
|
1921
|
+
}, micIcon()) : null,
|
|
1922
|
+
showMessage ? h('button', {
|
|
1916
1923
|
type: 'button', className: 'dvo-btn' + (hold.armed ? ' dvo-btn-active' : ''), 'data-err': err ? '1' : '0',
|
|
1917
1924
|
title: err ? v.error : (t('messageBtn') + hk),
|
|
1918
1925
|
'aria-label': err ? v.error : (t('messageBtn') + hk),
|
|
@@ -1924,8 +1931,8 @@ if (hold.armed && (!e.target || typeof e.target.hasPointerCapture !== 'function'
|
|
|
1924
1931
|
endHold(true)
|
|
1925
1932
|
}
|
|
1926
1933
|
},
|
|
1927
|
-
}, waveIcon()),
|
|
1928
|
-
|
|
1934
|
+
}, waveIcon()) : null,
|
|
1935
|
+
hasLastNote
|
|
1929
1936
|
? h('button', {
|
|
1930
1937
|
type: 'button', className: 'dvo-btn' + (voice.showPlayer ? ' dvo-btn-active' : ''),
|
|
1931
1938
|
title: t('listenBack'),
|
|
@@ -2913,7 +2920,12 @@ techJargonCorrection: data && data.techJargonCorrection !== false,
|
|
|
2913
2920
|
jargonDictionary: Array.isArray(data && data.jargonDictionary) ? data.jargonDictionary : [],
|
|
2914
2921
|
liveInterimPreview: data && data.liveInterimPreview !== false,
|
|
2915
2922
|
structuredPromptVoice: data && data.structuredPromptVoice !== false,
|
|
2923
|
+
audioFeedback: data && data.audioFeedback !== false,
|
|
2924
|
+
showDictationModeButton: data ? data.showDictationModeButton !== false : true,
|
|
2925
|
+
showDictationButton: data ? data.showDictationButton !== false : true,
|
|
2926
|
+
showMessageButton: data ? data.showMessageButton !== false : true,
|
|
2916
2927
|
})
|
|
2928
|
+
voice.notify()
|
|
2917
2929
|
})
|
|
2918
2930
|
.catch(() => { })
|
|
2919
2931
|
}
|
|
@@ -4331,6 +4343,9 @@ techJargonCorrection: val.techJargonCorrection !== false,
|
|
|
4331
4343
|
liveInterimPreview: val.liveInterimPreview !== false,
|
|
4332
4344
|
audioFeedback: val.audioFeedback !== false,
|
|
4333
4345
|
structuredPromptVoice: val.structuredPromptVoice !== false,
|
|
4346
|
+
showDictationModeButton: val.showDictationModeButton !== false,
|
|
4347
|
+
showDictationButton: val.showDictationButton !== false,
|
|
4348
|
+
showMessageButton: val.showMessageButton !== false,
|
|
4334
4349
|
dictationMode: val.dictationMode || 'clean',
|
|
4335
4350
|
dictationPrompts: val.dictationPrompts || {},
|
|
4336
4351
|
voiceMacros: Array.isArray(val.voiceMacros) ? val.voiceMacros : [],
|
|
@@ -4444,12 +4459,24 @@ techJargonCorrection: d.techJargonCorrection !== false,
|
|
|
4444
4459
|
liveInterimPreview: d.liveInterimPreview !== false,
|
|
4445
4460
|
audioFeedback: d.audioFeedback !== false,
|
|
4446
4461
|
structuredPromptVoice: d.structuredPromptVoice !== false,
|
|
4462
|
+
showDictationModeButton: d.showDictationModeButton !== false,
|
|
4463
|
+
showDictationButton: d.showDictationButton !== false,
|
|
4464
|
+
showMessageButton: d.showMessageButton !== false,
|
|
4447
4465
|
})
|
|
4448
4466
|
try { window.dispatchEvent(new CustomEvent('dsh-voice:settings-saved')) } catch (noEvents) { }
|
|
4449
|
-
setSaved(true); setJargonInput(null)
|
|
4467
|
+
voice.notify(); setSaved(true); setJargonInput(null)
|
|
4450
4468
|
setTimeout(() => setSaved(false), 2000)
|
|
4451
4469
|
fetchStatus()
|
|
4452
4470
|
}
|
|
4471
|
+
const checkItem = (k, label, defVal = true) => h('label', { className: 'cb-check-label' },
|
|
4472
|
+
h('input', {
|
|
4473
|
+
type: 'checkbox',
|
|
4474
|
+
checked: defVal ? (draft ? draft[k] !== false : true) : !!(draft && draft[k]),
|
|
4475
|
+
disabled: !writable,
|
|
4476
|
+
onChange: (e) => setTop(k, e.target.checked),
|
|
4477
|
+
}),
|
|
4478
|
+
label,
|
|
4479
|
+
)
|
|
4453
4480
|
const modeVal = (mode, key, fallback) => {
|
|
4454
4481
|
const m = draft && draft[mode]
|
|
4455
4482
|
return m && m[key] !== undefined ? m[key] : fallback
|
|
@@ -4626,24 +4653,8 @@ h('span', null, '🎙️ ' + t('turnTakingTitle')),
|
|
|
4626
4653
|
),
|
|
4627
4654
|
h('div', { className: 'cb-section-desc' }, t('turnTakingDesc')),
|
|
4628
4655
|
h('div', { className: 'cb-grid-2' },
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
type: 'checkbox',
|
|
4632
|
-
checked: draft ? draft.gatedTurnTaking !== false : true,
|
|
4633
|
-
disabled: !writable,
|
|
4634
|
-
onChange: (e) => setTop('gatedTurnTaking', e.target.checked),
|
|
4635
|
-
}),
|
|
4636
|
-
t('gatedTurnTaking'),
|
|
4637
|
-
),
|
|
4638
|
-
h('label', { className: 'cb-check-label' },
|
|
4639
|
-
h('input', {
|
|
4640
|
-
type: 'checkbox',
|
|
4641
|
-
checked: !!(draft && draft.bargeIn),
|
|
4642
|
-
disabled: !writable,
|
|
4643
|
-
onChange: (e) => setTop('bargeIn', e.target.checked),
|
|
4644
|
-
}),
|
|
4645
|
-
t('bargeInDesc'),
|
|
4646
|
-
),
|
|
4656
|
+
checkItem('gatedTurnTaking', t('gatedTurnTaking')),
|
|
4657
|
+
checkItem('bargeIn', t('bargeInDesc'), false),
|
|
4647
4658
|
),
|
|
4648
4659
|
),
|
|
4649
4660
|
h('div', { className: 'cb-section-card' },
|
|
@@ -4651,51 +4662,14 @@ h('div', { className: 'cb-section-title' },
|
|
|
4651
4662
|
h('span', null, '✨ ' + t('smartActionsTitle')),
|
|
4652
4663
|
),
|
|
4653
4664
|
h('div', { className: 'cb-grid-2' },
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
t('
|
|
4662
|
-
),
|
|
4663
|
-
h('label', { className: 'cb-check-label' },
|
|
4664
|
-
h('input', {
|
|
4665
|
-
type: 'checkbox',
|
|
4666
|
-
checked: draft ? draft.autoSendVisualRing !== false : true,
|
|
4667
|
-
disabled: !writable,
|
|
4668
|
-
onChange: (e) => setTop('autoSendVisualRing', e.target.checked),
|
|
4669
|
-
}),
|
|
4670
|
-
t('autoSendVisualRing'),
|
|
4671
|
-
),
|
|
4672
|
-
h('label', { className: 'cb-check-label' },
|
|
4673
|
-
h('input', {
|
|
4674
|
-
type: 'checkbox',
|
|
4675
|
-
checked: draft ? draft.voiceActions !== false : true,
|
|
4676
|
-
disabled: !writable,
|
|
4677
|
-
onChange: (e) => setTop('voiceActions', e.target.checked),
|
|
4678
|
-
}),
|
|
4679
|
-
t('voiceActionsLabel'),
|
|
4680
|
-
),
|
|
4681
|
-
h('label', { className: 'cb-check-label' },
|
|
4682
|
-
h('input', {
|
|
4683
|
-
type: 'checkbox',
|
|
4684
|
-
checked: draft ? draft.structuredPromptVoice !== false : true,
|
|
4685
|
-
disabled: !writable,
|
|
4686
|
-
onChange: (e) => setTop('structuredPromptVoice', e.target.checked),
|
|
4687
|
-
}),
|
|
4688
|
-
t('structuredPromptVoice'),
|
|
4689
|
-
),
|
|
4690
|
-
h('label', { className: 'cb-check-label' },
|
|
4691
|
-
h('input', {
|
|
4692
|
-
type: 'checkbox',
|
|
4693
|
-
checked: draft ? draft.audioFeedback !== false : true,
|
|
4694
|
-
disabled: !writable,
|
|
4695
|
-
onChange: (e) => setTop('audioFeedback', e.target.checked),
|
|
4696
|
-
}),
|
|
4697
|
-
t('audioFeedback'),
|
|
4698
|
-
),
|
|
4665
|
+
checkItem('liveInterimPreview', t('liveInterimPreview')),
|
|
4666
|
+
checkItem('autoSendVisualRing', t('autoSendVisualRing')),
|
|
4667
|
+
checkItem('voiceActions', t('voiceActionsLabel')),
|
|
4668
|
+
checkItem('structuredPromptVoice', t('structuredPromptVoice')),
|
|
4669
|
+
checkItem('audioFeedback', t('audioFeedback')),
|
|
4670
|
+
checkItem('showDictationModeButton', t('showDictationModeBtn')),
|
|
4671
|
+
checkItem('showDictationButton', t('showDictationBtn')),
|
|
4672
|
+
checkItem('showMessageButton', t('showMessageBtn')),
|
|
4699
4673
|
),
|
|
4700
4674
|
),
|
|
4701
4675
|
h(DictationModesSection, {
|
package/lib/host-routes.js
CHANGED
|
@@ -96,7 +96,11 @@ export function registerHostRoutes(ctx, deps) {
|
|
|
96
96
|
techJargonCorrection: cfg.techJargonCorrection !== false,
|
|
97
97
|
jargonDictionary: Array.isArray(cfg.jargonDictionary) ? cfg.jargonDictionary : [],
|
|
98
98
|
liveInterimPreview: cfg.liveInterimPreview !== false,
|
|
99
|
+
audioFeedback: cfg.audioFeedback !== false,
|
|
99
100
|
structuredPromptVoice: cfg.structuredPromptVoice !== false,
|
|
101
|
+
showDictationModeButton: cfg.showDictationModeButton !== false,
|
|
102
|
+
showDictationButton: cfg.showDictationButton !== false,
|
|
103
|
+
showMessageButton: cfg.showMessageButton !== false,
|
|
100
104
|
dictationMode: cfg.dictationMode || 'clean',
|
|
101
105
|
dictationPrompts: cfg.dictationPrompts || {},
|
|
102
106
|
voiceMacros: Array.isArray(cfg.voiceMacros) ? cfg.voiceMacros : [],
|
package/lib/schema.js
CHANGED
|
@@ -172,6 +172,12 @@ export const BaseConfig = z.object({
|
|
|
172
172
|
.description('Play subtle acoustic feedback cues via Web Audio API on start, stop, and success.'),
|
|
173
173
|
structuredPromptVoice: z.boolean().default(true)
|
|
174
174
|
.description('Target voice dictation and numeric choices to active DSH structured prompt modals.'),
|
|
175
|
+
showDictationModeButton: z.boolean().default(true)
|
|
176
|
+
.description('Show dictation processing mode cycle button in composer.'),
|
|
177
|
+
showDictationButton: z.boolean().default(true)
|
|
178
|
+
.description('Show voice typing (microphone) button in composer.'),
|
|
179
|
+
showMessageButton: z.boolean().default(true)
|
|
180
|
+
.description('Show voice message button in composer.'),
|
|
175
181
|
dictationMode: z.union(['verbatim', 'clean', 'task', 'note', 'bug']).default('clean')
|
|
176
182
|
.description('Dictation post-processing mode: "verbatim", "clean", "task", or "note".'),
|
|
177
183
|
dictationPrompts: z.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-voice",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.55",
|
|
4
4
|
"description": "Voice input for DeepSeek Harness: dictation chunked by pauses and voice messages, each with its own provider fallback chain (Deepgram, Groq, HuggingFace, local whisper.cpp, plus any OpenAI-compatible API of your own).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|