diff --git a/src/app.tsx b/src/app.tsx index 63a93d5..aac59b0 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -59,6 +59,7 @@ export interface ChatStore { tts_voice: string; tts_speed: number; tts_speed_enabled: boolean; + tts_format: string; image_gen_api: string; image_gen_key: string; json_mode: boolean; @@ -79,6 +80,7 @@ export const newChatStore = ( tts_key = "", tts_speed = 1.0, tts_speed_enabled = false, + tts_format = "mp3", toolsString = "", image_gen_api = "https://api.openai.com/v1/images/generations", image_gen_key = "", @@ -118,6 +120,7 @@ export const newChatStore = ( image_gen_api: image_gen_api, image_gen_key: image_gen_key, json_mode: json_mode, + tts_format: tts_format, }; }; @@ -275,6 +278,7 @@ export function App() { chatStore.tts_key, chatStore.tts_speed, chatStore.tts_speed_enabled, + chatStore.tts_format, chatStore.toolsString, chatStore.image_gen_api, chatStore.image_gen_key, diff --git a/src/settings.tsx b/src/settings.tsx index ca73e00..d0cfa69 100644 --- a/src/settings.tsx +++ b/src/settings.tsx @@ -22,6 +22,7 @@ const TTS_VOICES: string[] = [ "nova", "shimmer", ]; +const TTS_FORMAT: string[] = ["mp3", "opus", "aac", "flac"]; const Help = (props: { children: any; help: string }) => { return ( @@ -510,6 +511,22 @@ export default (props: { help={"TTS Speed"} {...props} /> + + + +