-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_conf_schema.json
More file actions
296 lines (296 loc) · 10.4 KB
/
_conf_schema.json
File metadata and controls
296 lines (296 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
{
"Voice_Recognition": {
"description": "语音识别设置",
"type": "object",
"hint": "语音识别服务提供商配置",
"items": {
"STT_Source": {
"description": "STT服务来源",
"type": "string",
"hint": "选择语音转文字服务的来源:使用AstrBot框架配置的STT服务 或 使用插件独立配置的STT API,支持填写 framework 或 plugin",
"default": "framework",
"enum": ["framework", "plugin"],
"enum_descriptions": ["使用AstrBot框架配置的STT服务", "使用插件独立配置的STT API"]
},
"Framework_STT_Provider_Name": {
"description": "框架STT提供商名字",
"type": "string",
"hint": "当选择'framework'时,指定使用哪个框架STT提供商。留空则使用框架默认的STT提供商",
"default": "",
"condition": {
"field": "Voice_Recognition.STT_Source",
"value": "framework"
}
},
"Enable_Voice_Processing": {
"description": "是否启用语音消息处理",
"type": "bool",
"hint": "如果为true,则自动处理收到的语音消息",
"default": true
},
"Max_Audio_Size_MB": {
"description": "语音文件大小限制",
"type": "int",
"hint": "语音文件大小限制,单位为MB",
"default": 25
}
}
},
"Group_Chat_Settings": {
"description": "群聊语音识别设置",
"type": "object",
"hint": "控制群聊中的语音识别和回复行为",
"items": {
"Enable_Group_Voice_Recognition": {
"description": "是否识别群聊语音",
"type": "bool",
"hint": "如果为true,则在群聊中识别语音消息",
"default": true
},
"Enable_Group_Voice_Reply": {
"description": "是否回复群聊语音",
"type": "bool",
"hint": "如果为true,则对群聊中的语音识别结果生成智能回复",
"default": true
},
"Group_Recognition_Whitelist": {
"description": "群聊语音识别白名单",
"type": "list",
"hint": "指定允许进行语音识别的群号列表,为空则对所有群聊生效",
"default": []
},
"Group_Reply_Whitelist": {
"description": "群聊语音回复白名单",
"type": "list",
"hint": "指定允许进行语音回复的群号列表,为空则对所有群聊生效",
"default": []
},
"Group_Recognition_Blacklist": {
"description": "群聊语音识别黑名单",
"type": "list",
"hint": "指定禁止进行语音识别的群号列表",
"default": []
},
"Group_Reply_Blacklist": {
"description": "群聊语音回复黑名单",
"type": "list",
"hint": "指定禁止进行语音回复的群号列表",
"default": []
}
}
},
"STT_API_Config": {
"description": "插件独立STT API配置",
"type": "object",
"hint": "当STT服务来源选择'plugin'时显示。支持OpenAI Whisper及其他兼容OpenAI格式的语音转文字服务提供商",
"condition": {
"field": "Voice_Recognition.STT_Source",
"value": "plugin"
},
"items": {
"API_Key": {
"description": "API密钥",
"type": "string",
"hint": "语音转文字服务的API密钥,根据所选服务提供商填写",
"default": ""
},
"API_Base_URL": {
"description": "API基础URL",
"type": "string",
"hint": "语音转文字服务的API基础URL,会根据选择的提供商自动设置推荐值",
"default": "https://api.openai.com/v1"
},
"Model": {
"description": "语音识别模型",
"type": "string",
"hint": "语音识别模型名称,请根据所选提供商填写对应的模型名称。例如:whisper-1、whisper-large-v3、nova-2、speech-01 等",
"default": "whisper-1"
},
"Provider_Type": {
"description": "STT服务提供商",
"type": "string",
"hint": "选择具体的语音转文字服务提供商,每个提供商有不同的API格式和特性",
"default": "openai",
"enum": [
"openai",
"groq",
"deepgram",
"azure",
"siliconflow",
"minimax",
"volcengine",
"tencent",
"baidu",
"custom",
"other"
],
"enum_descriptions": [
"OpenAI Whisper API - 官方Whisper服务",
"Groq - 高速Whisper推理服务",
"Deepgram - 专业语音识别服务",
"Azure Speech Services - 微软语音服务",
"SiliconFlow - 硅基流动语音识别服务",
"MiniMax - 海螺AI语音服务",
"VolcEngine - 火山引擎语音服务",
"Tencent - 腾讯云语音识别",
"Baidu - 百度语音识别",
"自定义 - 其他兼容OpenAI格式的服务",
"其他服务商 - 完全自定义请求格式"
]
},
"Custom_Headers": {
"description": "自定义请求头",
"type": "object",
"hint": "某些服务提供商可能需要的额外请求头参数。支持动态变量:{api_key}、{model}等",
"default": {},
"items": {}
},
"Custom_Request_Body": {
"description": "自定义请求体模板",
"type": "object",
"hint": "当选择'其他服务商'时,自定义API请求体格式。支持变量:{audio_base64}、{model}、{api_key}等",
"default": {},
"condition": {
"field": "STT_API_Config.Provider_Type",
"value": "other"
},
"items": {}
},
"Custom_Endpoint": {
"description": "自定义API端点",
"type": "string",
"hint": "当选择'其他服务商'时,指定API的具体端点路径,如:/v1/audio/transcribe",
"default": "/audio/transcriptions",
"condition": {
"field": "STT_API_Config.Provider_Type",
"value": "other"
}
},
"Custom_Request_Method": {
"description": "请求方法",
"type": "string",
"hint": "HTTP请求方法",
"default": "POST",
"enum": ["POST", "PUT", "PATCH"],
"condition": {
"field": "STT_API_Config.Provider_Type",
"value": "other"
}
},
"Custom_Content_Type": {
"description": "请求内容类型",
"type": "string",
"hint": "请求的Content-Type类型",
"default": "multipart/form-data",
"enum": ["multipart/form-data", "application/json", "application/octet-stream"],
"condition": {
"field": "STT_API_Config.Provider_Type",
"value": "other"
}
},
"Custom_Response_Path": {
"description": "响应文本提取路径",
"type": "string",
"hint": "从API响应JSON中提取文本的路径,如:result.text 或 data.transcript",
"default": "text",
"condition": {
"field": "STT_API_Config.Provider_Type",
"value": "other"
}
}
}
},
"Chat_Reply": {
"description": "智能回复设置",
"type": "object",
"hint": "语音识别后的智能回复配置",
"items": {
"Enable_Chat_Reply": {
"description": "是否启用智能回复",
"type": "bool",
"hint": "如果为true,则在语音识别后自动生成智能回复",
"default": true
},
"Chat_Provider": {
"description": "聊天服务提供商",
"type": "string",
"hint": "用于生成智能回复的聊天服务提供商",
"default": "default"
},
"Use_Framework_Personality": {
"description": "使用框架人格系统",
"type": "bool",
"hint": "插件将使用 AstrBot 框架配置的人格进行回复",
"default": true
},
"Enable_Probabilistic_Reply": {
"description": "启用概率性回复",
"type": "bool",
"hint": "启用后,语音识别并加入历史消息后将概率性生成回复,而不是总是回复",
"default": false
},
"Reply_Probability": {
"description": "回复概率",
"type": "float",
"hint": "设置概率性回复的概率值,范围0.0-1.0。1.0表示总是回复,0.0表示从不回复",
"default": 0.3,
"minimum": 0.0,
"maximum": 1.0,
"condition": {
"field": "Chat_Reply.Enable_Probabilistic_Reply",
"value": true
}
}
}
},
"Output_Settings": {
"description": "输出设置",
"type": "object",
"hint": "语音识别结果的输出配置",
"items": {
"Console_Output": {
"description": "是否在控制台输出",
"type": "bool",
"hint": "如果为true,则在控制台输出语音识别结果",
"default": true
},
"Show_Recognition_Result": {
"description": "是否显示识别结果",
"type": "bool",
"hint": "如果为true,则向用户显示语音识别的文本结果",
"default": true
},
"Result_Format": {
"description": "识别结果显示格式",
"type": "string",
"hint": "语音识别结果的显示格式",
"default": "🗣️ 语音识别结果:\n{text}"
}
}
},
"Processing_Config": {
"description": "处理配置",
"type": "object",
"hint": "语音处理相关配置",
"items": {
"Processing_Timeout": {
"description": "处理超时时间",
"type": "int",
"hint": "语音处理超时时间,单位为秒",
"default": 30
},
"Retry_Count": {
"description": "重试次数",
"type": "int",
"hint": "语音识别失败时的重试次数",
"default": 2
},
"Enable_Error_Notification": {
"description": "是否启用错误通知",
"type": "bool",
"hint": "如果为true,则在处理失败时向用户发送错误通知",
"default": true
}
}
}
}