Add TTS support with OpenAI-compatible endpoint configuration

- Add TTS settings schema and configuration UI with validation
- Create backend TTS proxy with 24hr file-based caching
- Add frontend useTTS hook with Cache API caching
- Add TTS playback button on assistant messages (step-finish)
- Include test button to verify TTS configuration
This commit is contained in:
Chris Scott committed 2025-11-28 19:52:35 -05:00
1 parent 283348b64f
commit fb91b4d3a3
12 files changed
+859 -5

No files matched your search

+20
View File
@@ -4,6 +4,24 @@ export interface CustomCommand {
promptTemplate: string
}
export interface TTSConfig {
enabled: boolean
endpoint: string
apiKey: string
voice: string
model: string
speed: number
}
export const DEFAULT_TTS_CONFIG: TTSConfig = {
enabled: false,
endpoint: 'https://api.openai.com/v1/audio/speech',
apiKey: '',
voice: 'alloy',
model: 'tts-1',
speed: 1.0,
}
export interface CustomAgent {
name: string
description: string
@@ -22,6 +40,7 @@ export interface UserPreferences {
customCommands: CustomCommand[]
customAgents: CustomAgent[]
gitToken?: string
tts?: TTSConfig
}
export interface SettingsResponse {
@@ -87,4 +106,5 @@ export const DEFAULT_USER_PREFERENCES: UserPreferences = {
customCommands: [],
customAgents: [],
gitToken: undefined,
tts: DEFAULT_TTS_CONFIG,
}