feat: implement tier-a4 tts voice output replies
This commit is contained in:
@@ -730,6 +730,24 @@ const audioSchema = z.object({
|
||||
talk_mode: talkModeSchema,
|
||||
}).default({});
|
||||
|
||||
const ttsOutputFormatSchema = z.enum(['mp3', 'wav', 'opus']);
|
||||
|
||||
const ttsProviderSchema = z.object({
|
||||
type: z.enum(['openai', 'custom']).default('openai'),
|
||||
endpoint: z.string().optional(),
|
||||
api_key: z.string().optional(),
|
||||
model: z.string().default('gpt-4o-mini-tts'),
|
||||
voice: z.string().default('alloy'),
|
||||
format: ttsOutputFormatSchema.default('mp3'),
|
||||
});
|
||||
|
||||
const ttsSchema = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
/** Restrict voice replies to selected channels. Empty means all channels. */
|
||||
enabled_channels: z.array(z.string().min(1)).default([]),
|
||||
provider: ttsProviderSchema.optional(),
|
||||
}).default({});
|
||||
|
||||
// ── Tool policy schemas ──────────────────────────────────────────────
|
||||
|
||||
const toolProfileEnum = z.enum(['minimal', 'messaging', 'coding', 'full']);
|
||||
@@ -912,6 +930,7 @@ export const configSchema = z.object({
|
||||
retry: retrySchema,
|
||||
web_search: webSearchSchema,
|
||||
audio: audioSchema,
|
||||
tts: ttsSchema,
|
||||
prompt: promptSchema,
|
||||
tools: toolsSchema,
|
||||
sandbox: sandboxSchema,
|
||||
@@ -936,6 +955,7 @@ export type CompactionConfig = z.infer<typeof compactionSchema>;
|
||||
export type MemoryConfig = z.infer<typeof memorySchema>;
|
||||
export type WebSearchConfig = z.infer<typeof webSearchSchema>;
|
||||
export type AudioConfig = z.infer<typeof audioSchema>;
|
||||
export type TtsConfig = z.infer<typeof ttsSchema>;
|
||||
export type ProcessConfig = z.infer<typeof processSchema>;
|
||||
export type BrowserConfig = z.infer<typeof browserSchema>;
|
||||
export type K8sConfig = z.infer<typeof k8sSchema>;
|
||||
|
||||
Reference in New Issue
Block a user