WIP: Implement Realtime Ephemeral Token functionality and update related components

This commit is contained in:
Marco Beretta 2024-12-19 14:58:15 +01:00
parent 40c8b8fd75
commit ea5cb4bc2b
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
13 changed files with 1113 additions and 14 deletions

View file

@ -408,6 +408,18 @@ const speechTab = z
})
.optional();
const realtime = z
.object({
openai: z
.object({
url: z.string().optional(),
apiKey: z.string().optional(),
voices: z.array(z.string()).optional(),
})
.optional(),
})
.optional();
export enum RateLimitPrefix {
FILE_UPLOAD = 'FILE_UPLOAD',
IMPORT = 'IMPORT',
@ -595,6 +607,7 @@ export const configSchema = z.object({
tts: ttsSchema.optional(),
stt: sttSchema.optional(),
speechTab: speechTab.optional(),
realtime: realtime.optional(),
})
.optional(),
rateLimits: rateLimitSchema.optional(),
@ -1216,6 +1229,13 @@ export enum TTSProviders {
LOCALAI = 'localai',
}
export enum RealtimeVoiceProviders {
/**
* Provider for OpenAI Realtime Voice API
*/
OPENAI = 'openai',
}
/** Enum for app-wide constants */
export enum Constants {
/** Key for the app's version. */