mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-24 07:39:27 +01:00
🤩 Added custom openai tts models and role variables
This commit is contained in:
@@ -239,7 +239,8 @@ export const generateOpenAIChatCompletion = async (
|
||||
export const synthesizeOpenAISpeech = async (
|
||||
token: string = '',
|
||||
speaker: string = 'alloy',
|
||||
text: string = ''
|
||||
text: string = '',
|
||||
model: string = 'tts-1'
|
||||
) => {
|
||||
let error = null;
|
||||
|
||||
@@ -250,7 +251,7 @@ export const synthesizeOpenAISpeech = async (
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
model: 'tts-1',
|
||||
model: model,
|
||||
input: text,
|
||||
voice: speaker
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user