@goodandready/dsh-voice 0.9.57 → 0.9.58
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/lib/client.js +4 -4
- package/lib/config-routes.js +8 -3
- package/lib/dictation-modes.js +1 -1
- package/lib/host-routes.js +3 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -53,8 +53,8 @@ const en = {
|
|
|
53
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
|
-
'lowVolumeHint':'Speak louder', 'vadEngine':'VAD engine', 'vadEngineHint':'
|
|
57
|
-
'vadSilero':'
|
|
56
|
+
'lowVolumeHint':'Speak louder', 'vadEngine':'VAD engine', 'vadEngineHint':'Acoustic heuristic VAD (RMS/ZCR) or classic amplitude gate',
|
|
57
|
+
'vadSilero':'Heuristic VAD (RMS/ZCR)', 'vadAmplitude':'Amplitude gate', 'streamingWs':'Streaming WebSocket',
|
|
58
58
|
'streamingWsHint':'Real-time WebSocket audio streaming to local ASR', 'beep':'Beep on start/stop', 'localOnly':'Local whisper only',
|
|
59
59
|
'localOnlyHint':'Restrict both chains to the local whisper.cpp server: fully offline.', 'sendDelay':'Dictation send delay (ms)',
|
|
60
60
|
'sendDelayHint':'Wait before appending a dictated phrase, with a cancel window. 0 = off', 'mic':'Microphone',
|
|
@@ -214,7 +214,7 @@ const zh = {
|
|
|
214
214
|
'langDe':'德语 (de)', 'dictationHint':'语音按停顿自动切句,文字实时追加至输入框。', 'pauseMs':'断句静音停顿时长(毫秒)', 'pauseHint':'数值越小切分越频繁、出字越快,但可能切断未说完的词',
|
|
215
215
|
'speaking':'正在说话…', 'silence':'停顿…', 'normalizeTranscript':'规范化转写文本', 'undo':'撤销上次插入', 'undone':'插入已撤销', 'nothingToUndo':'没有可撤销的内容',
|
|
216
216
|
'clipping':'爆音', 'clippingHint':'音量过大(爆音截断)', 'lowVolume':'信号微弱', 'lowVolumeHint':'请提高音量', 'vadEngine':'VAD 引擎',
|
|
217
|
-
'vadEngineHint':'
|
|
217
|
+
'vadEngineHint':'声学启发式 VAD (RMS/ZCR) 或传统振幅门限', 'vadSilero':'启发式 VAD (RMS/ZCR)', 'vadAmplitude':'振幅门限',
|
|
218
218
|
'streamingWs':'流式 WebSocket', 'streamingWsHint':'向本地 ASR 实时通过 WebSocket 流式传输音频', 'beep':'启停提示音', 'localOnly':'仅使用本地 whisper',
|
|
219
219
|
'localOnlyHint':'将双链限制为仅使用本地 whisper.cpp 服务:纯离线运行。', 'sendDelay':'听写延迟追加 (ms)', 'sendDelayHint':'追加听写文本前的缓冲等待时间,允许撤回。0 为关闭',
|
|
220
220
|
'mic':'麦克风设备', 'micDefault':'系统默认', 'vocabulary':'自定义词汇表(每行一个词)', 'polish':'模型润色转写文本', 'polishHint':'插入前通过模型修正标点符号并消除语气口头禅',
|
|
@@ -2398,7 +2398,7 @@ setTimeout(() => { if (voice.lastUndoNotice === msg) { voice.lastUndoNotice = ''
|
|
|
2398
2398
|
})
|
|
2399
2399
|
}
|
|
2400
2400
|
}
|
|
2401
|
-
const DICTATION_MODES = ['clean', 'task', 'note', 'verbatim']
|
|
2401
|
+
const DICTATION_MODES = ['clean', 'task', 'note', 'bug', 'verbatim']
|
|
2402
2402
|
function getDictationModeLabel(m, t) {
|
|
2403
2403
|
const trans = t || moduleT
|
|
2404
2404
|
if (m === 'verbatim') return trans('modeVerbatim')
|
package/lib/config-routes.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Solves DSH network limitation where client-side persistence is blocked in non-loopback environments (Gitea #149).
|
|
3
3
|
|
|
4
4
|
import { writeJson, readBody, isTrustedCaller, rotateVoiceSessionToken, getVoiceSessionToken } from './http-util.js'
|
|
5
|
+
import { bestEffort } from './best-effort.js'
|
|
5
6
|
|
|
6
7
|
export function registerConfigRoutes(ctx, {
|
|
7
8
|
NS,
|
|
@@ -33,7 +34,9 @@ export function registerConfigRoutes(ctx, {
|
|
|
33
34
|
try {
|
|
34
35
|
const settingsService = getSettingsService?.()
|
|
35
36
|
rev = settingsService?.describe?.()?.find?.((r) => r.ns === NS)?.revision
|
|
36
|
-
} catch {
|
|
37
|
+
} catch (revErr) {
|
|
38
|
+
bestEffort('readRevision', () => { throw revErr }, ctx?.logger)
|
|
39
|
+
}
|
|
37
40
|
writeJson(res, 200, { ok: true, config: live(), revision: rev })
|
|
38
41
|
return
|
|
39
42
|
}
|
|
@@ -103,7 +106,9 @@ export function registerConfigRoutes(ctx, {
|
|
|
103
106
|
let currentRev
|
|
104
107
|
try {
|
|
105
108
|
currentRev = settingsService.describe?.()?.find?.((r) => r.ns === NS)?.revision
|
|
106
|
-
} catch {
|
|
109
|
+
} catch (revErr) {
|
|
110
|
+
bestEffort('readRevision', () => { throw revErr }, ctx?.logger)
|
|
111
|
+
}
|
|
107
112
|
|
|
108
113
|
if (typeof expectedRevision === 'number' && typeof currentRev === 'number' && expectedRevision !== currentRev) {
|
|
109
114
|
writeJson(res, 409, {
|
|
@@ -158,7 +163,7 @@ export function registerConfigRoutes(ctx, {
|
|
|
158
163
|
try {
|
|
159
164
|
newRev = settingsService?.describe?.()?.find?.((r) => r.ns === NS)?.revision
|
|
160
165
|
} catch (revErr) {
|
|
161
|
-
bestEffort('readRevision', () => { throw revErr })
|
|
166
|
+
bestEffort('readRevision', () => { throw revErr }, ctx?.logger)
|
|
162
167
|
}
|
|
163
168
|
writeJson(res, 200, { ok: true, config: live(), revision: newRev, sessionToken: getVoiceSessionToken() })
|
|
164
169
|
} catch (err) {
|
package/lib/dictation-modes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// lib/dictation-modes.js — Dictation post-processing modes (#264, #321)
|
|
2
2
|
|
|
3
|
-
export const DICTATION_MODES = ['verbatim', 'clean', 'task', 'note']
|
|
3
|
+
export const DICTATION_MODES = ['verbatim', 'clean', 'task', 'note', 'bug']
|
|
4
4
|
export const ALL_DICTATION_MODES = ['verbatim', 'clean', 'task', 'note', 'bug']
|
|
5
5
|
|
|
6
6
|
export const DEFAULT_DICTATION_PROMPTS = {
|
package/lib/host-routes.js
CHANGED
|
@@ -103,6 +103,8 @@ export function registerHostRoutes(ctx, deps) {
|
|
|
103
103
|
showMessageButton: cfg.showMessageButton !== false,
|
|
104
104
|
dictationMode: cfg.dictationMode || 'clean',
|
|
105
105
|
dictationPrompts: cfg.dictationPrompts || {},
|
|
106
|
+
vadEngine: cfg.vadEngine || 'silero',
|
|
107
|
+
streamingWs: cfg.streamingWs !== false,
|
|
106
108
|
voiceMacros: Array.isArray(cfg.voiceMacros) ? cfg.voiceMacros : [],
|
|
107
109
|
providerStats: statsTracker.get(),
|
|
108
110
|
recentDiagnostics: typeof statsTracker.getDiagnostics === 'function' ? statsTracker.getDiagnostics() : [],
|
|
@@ -382,7 +384,7 @@ export function registerHostRoutes(ctx, deps) {
|
|
|
382
384
|
path: '/dsh-voice/vad/status',
|
|
383
385
|
handler: async (req, res) => {
|
|
384
386
|
if (!isTrustedCaller(req)) { writeJson(res, 403, { ok: false, error: 'forbidden' }); return }
|
|
385
|
-
writeJson(res, 200, { ok: true, sileroAvailable:
|
|
387
|
+
writeJson(res, 200, { ok: true, engine: 'heuristic-rms-zcr', sileroAvailable: false, modelLoaded: false, sampleRate: 16000, frameSamples: 512 })
|
|
386
388
|
},
|
|
387
389
|
}), 'dsh-voice: /dsh-voice/vad/status route')
|
|
388
390
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-voice",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.58",
|
|
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",
|