@goodandready/dsh-voice 0.9.6 → 0.9.8
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 +747 -630
- package/lib/index.js +29 -26
- package/lib/sensevoice-installer.js +1 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -12,28 +12,25 @@
|
|
|
12
12
|
// Provider keys are resolved on the host via ctx.credentials and never reach
|
|
13
13
|
// the browser.
|
|
14
14
|
|
|
15
|
-
import z from
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { isAutoLang } from './provider-http.js'
|
|
35
|
-
import { ChainEntry, CustomProvider, BaseConfig } from './schema.js'
|
|
36
|
-
import { registerTranscribeAudioTool, MIME_BY_EXT } from './tool.js'
|
|
15
|
+
import z from "@deepseek-ai/schemastery"
|
|
16
|
+
import { credentialRef } from "@deepseek-ai/dsh-credentials"
|
|
17
|
+
import path from "node:path"
|
|
18
|
+
import { runChain } from "./chain.js"
|
|
19
|
+
import { makeProviders, KNOWN_KEYS, DEFAULT_MODELS } from "./providers.js"
|
|
20
|
+
import { toWav16k } from "./wav.js"
|
|
21
|
+
import { applyJargonDictionary, extractVoiceActions } from "./normalize.js"
|
|
22
|
+
import { createStatsTracker, mergeContextVocabulary } from "./stats.js"
|
|
23
|
+
import { writeJson, readBody, isTrustedCaller } from "./http-util.js"
|
|
24
|
+
import { createPolishText } from "./polish.js"
|
|
25
|
+
import { createUserMessage } from "@deepseek-ai/dsh-llm"
|
|
26
|
+
import { buildProviderOrder, sessionCommand } from "./transcribe-core.js"
|
|
27
|
+
import { registerPluginUpdater } from "./updater.js"
|
|
28
|
+
import { registerSensevoiceInstaller, findTokensFile } from "./sensevoice-installer.js"
|
|
29
|
+
import { createConfigReader } from "./config-compat.js"
|
|
30
|
+
import { registerConfigRoutes } from "./config-routes.js"
|
|
31
|
+
import { isAutoLang } from "./provider-http.js"
|
|
32
|
+
import { ChainEntry, CustomProvider, BaseConfig } from "./schema.js"
|
|
33
|
+
import { registerTranscribeAudioTool } from "./tool.js"
|
|
37
34
|
export { ChainEntry, CustomProvider, BaseConfig }
|
|
38
35
|
|
|
39
36
|
export const name = '@goodandready/dsh-voice'
|
|
@@ -249,10 +246,16 @@ export function apply(ctx, baseConfig) {
|
|
|
249
246
|
triggerAutostart()
|
|
250
247
|
})
|
|
251
248
|
|
|
252
|
-
if (typeof ctx.on ===
|
|
253
|
-
ctx.
|
|
254
|
-
|
|
255
|
-
|
|
249
|
+
if (typeof ctx.on === "function") {
|
|
250
|
+
if (typeof ctx.effect === "function") {
|
|
251
|
+
ctx.effect(() => ctx.on('loader/volatile-update', () => triggerAutostart()), "dsh-voice: volatile autostart")
|
|
252
|
+
ctx.effect(() => ctx.on('settings/document-updated', () => triggerAutostart()), "dsh-voice: settings autostart")
|
|
253
|
+
ctx.effect(() => ctx.on('config', () => triggerAutostart()), "dsh-voice: config autostart")
|
|
254
|
+
} else {
|
|
255
|
+
ctx.on('loader/volatile-update', () => triggerAutostart())
|
|
256
|
+
ctx.on('settings/document-updated', () => triggerAutostart())
|
|
257
|
+
ctx.on('config', () => triggerAutostart())
|
|
258
|
+
}
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
triggerAutostart()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Downloads pre-quantized ONNX model and configures autostart on the host.
|
|
3
3
|
|
|
4
4
|
import { createWriteStream, existsSync, readdirSync } from 'node:fs'
|
|
5
|
-
import { mkdir,
|
|
5
|
+
import { mkdir, unlink } from 'node:fs/promises'
|
|
6
6
|
import { homedir } from 'node:os'
|
|
7
7
|
import path from 'node:path'
|
|
8
8
|
import { spawn } from 'node:child_process'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-voice",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
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",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
66
|
-
"@deepseek-ai/dsh-tools": "^0.1.0-rc.
|
|
67
|
-
"@deepseek-ai/dsh-credentials": "^0.1.0-rc.
|
|
68
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.
|
|
69
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.
|
|
66
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-rc.2 || ^0.2.0-rc.1",
|
|
67
|
+
"@deepseek-ai/dsh-credentials": "^0.1.7-rc.2 || ^0.2.0-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.7-rc.2 || ^0.2.0-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-rc.2 || ^0.2.0-rc.1",
|
|
70
70
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
71
71
|
}
|
|
72
72
|
}
|