dsh-voice-mode 0.7.43 → 0.7.45
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 +185 -394
- package/README.md +176 -406
- package/SECURITY.md +2 -2
- package/THIRD_PARTY_NOTICES.md +31 -2
- package/lib/client.js +316 -191
- package/lib/index.d.ts +127 -0
- package/lib/index.js +1304 -609
- package/lib/tts-vits-worker.cjs +1 -1
- package/package.json +9 -2
- package/scripts/check-anchors.mjs +42 -3
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis'
|
|
2
|
+
import type z from '@deepseek-ai/schemastery'
|
|
3
|
+
|
|
4
|
+
export declare const name = 'voice-mode'
|
|
5
|
+
export declare const inject: string[]
|
|
6
|
+
|
|
7
|
+
export type TtsEngineKind = 'edge' | 'vits' | 'kokoro' | 'openai' | 'mimo'
|
|
8
|
+
export type KokoroModel = 'int8' | 'fp32'
|
|
9
|
+
|
|
10
|
+
export interface AsrReplacement {
|
|
11
|
+
from: string[]
|
|
12
|
+
to: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OpenAiTtsConfig {
|
|
16
|
+
baseUrl: string
|
|
17
|
+
apiKey: string
|
|
18
|
+
apiKeys: Record<string, string>
|
|
19
|
+
model: string
|
|
20
|
+
voice: string
|
|
21
|
+
instructions: string
|
|
22
|
+
responseFormat: 'mp3' | 'wav'
|
|
23
|
+
timeoutMs: number
|
|
24
|
+
fallback: 'none' | 'vits' | 'kokoro'
|
|
25
|
+
fallbackVoice: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export declare const OpenAiTtsConfig: z<OpenAiTtsConfig>
|
|
29
|
+
|
|
30
|
+
export interface MimoTtsConfig {
|
|
31
|
+
apiKey: string
|
|
32
|
+
baseUrl: string
|
|
33
|
+
model: string
|
|
34
|
+
voice: string
|
|
35
|
+
instructions: string
|
|
36
|
+
responseFormat: 'wav' | 'mp3'
|
|
37
|
+
timeoutMs: number
|
|
38
|
+
fallback: 'none' | 'vits' | 'kokoro'
|
|
39
|
+
fallbackVoice: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare const MimoTtsConfig: z<MimoTtsConfig>
|
|
43
|
+
|
|
44
|
+
export interface VoiceSettingsValue {
|
|
45
|
+
ttsEngine: TtsEngineKind
|
|
46
|
+
kokoroModel: KokoroModel
|
|
47
|
+
voice: string
|
|
48
|
+
rate: number
|
|
49
|
+
interruptLevel: 0 | 1 | 2
|
|
50
|
+
silenceMs: number
|
|
51
|
+
idleTimeoutMinutes: number
|
|
52
|
+
modelHost: string
|
|
53
|
+
autoSend: boolean
|
|
54
|
+
autoResume: boolean
|
|
55
|
+
mode: 'toggle' | 'hold' | 'once'
|
|
56
|
+
readAloud: 'voice' | 'always' | 'off'
|
|
57
|
+
showCaptions: boolean
|
|
58
|
+
showStatusBar: boolean
|
|
59
|
+
bargeInMode: 'auto' | 'manual' | 'detect'
|
|
60
|
+
echoGateDb: number
|
|
61
|
+
shortcut: string
|
|
62
|
+
composerShortcut: string
|
|
63
|
+
spokenFormat: boolean
|
|
64
|
+
senseVoice: boolean
|
|
65
|
+
wakeWord: string
|
|
66
|
+
toolBeep: boolean
|
|
67
|
+
senseITN: boolean
|
|
68
|
+
captionFontSize: 0 | 1 | 2 | 3
|
|
69
|
+
captionMaxWidth: 0 | 1 | 2
|
|
70
|
+
backchannelYield: boolean
|
|
71
|
+
bargeInSalvage: boolean
|
|
72
|
+
asrReplacements: AsrReplacement[]
|
|
73
|
+
llmCorrect: boolean
|
|
74
|
+
openaiPreset: string
|
|
75
|
+
openaiBaseUrl: string
|
|
76
|
+
openaiModel: string
|
|
77
|
+
openaiApiKey: string
|
|
78
|
+
openaiApiKeys: Record<string, string>
|
|
79
|
+
mimoApiKey: string
|
|
80
|
+
yieldMs: number
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export declare function createVoiceSettingsSchema(defs?: Partial<VoiceSettingsValue>): z<VoiceSettingsValue>
|
|
84
|
+
export declare const VoiceSettingsSchema: z<VoiceSettingsValue>
|
|
85
|
+
|
|
86
|
+
export interface Config {
|
|
87
|
+
enabled: boolean
|
|
88
|
+
cacheDir: string
|
|
89
|
+
modelHost: string
|
|
90
|
+
ttsEngine: TtsEngineKind
|
|
91
|
+
kokoroModel: KokoroModel
|
|
92
|
+
openaiTts: OpenAiTtsConfig
|
|
93
|
+
mimoTts: MimoTtsConfig
|
|
94
|
+
allowLan: boolean
|
|
95
|
+
asrReplacements: AsrReplacement[]
|
|
96
|
+
allowCustomModelHost: boolean
|
|
97
|
+
voice: string
|
|
98
|
+
rate: number
|
|
99
|
+
interruptLevel: 0 | 1 | 2
|
|
100
|
+
silenceMs: number
|
|
101
|
+
idleTimeoutMinutes: number
|
|
102
|
+
autoSend: boolean
|
|
103
|
+
autoResume: boolean
|
|
104
|
+
mode: 'toggle' | 'hold' | 'once'
|
|
105
|
+
readAloud: 'voice' | 'always' | 'off'
|
|
106
|
+
showCaptions: boolean
|
|
107
|
+
showStatusBar: boolean
|
|
108
|
+
bargeInMode: 'auto' | 'manual' | 'detect'
|
|
109
|
+
echoGateDb: number
|
|
110
|
+
shortcut: string
|
|
111
|
+
composerShortcut: string
|
|
112
|
+
spokenFormat: boolean
|
|
113
|
+
senseVoice: boolean
|
|
114
|
+
wakeWord: string
|
|
115
|
+
toolBeep: boolean
|
|
116
|
+
senseITN: boolean
|
|
117
|
+
captionFontSize: 0 | 1 | 2 | 3
|
|
118
|
+
captionMaxWidth: 0 | 1 | 2
|
|
119
|
+
backchannelYield: boolean
|
|
120
|
+
bargeInSalvage: boolean
|
|
121
|
+
llmCorrect: boolean
|
|
122
|
+
yieldMs: number
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export declare const Config: z<Config>
|
|
126
|
+
|
|
127
|
+
export declare function apply(ctx: Context, config: Config): void
|