mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🔉 fix: Elevenlabs TTS and STT (#3482)
* fix: add `await` on getVoices * fix: STT function * fix: elevenlabs * chore(lint): remove unnecessary whitespace in ldap.js --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
51cd847606
commit
27ab00c6a9
5 changed files with 4 additions and 5 deletions
|
|
@ -15,7 +15,7 @@ const getLdapConfig = () => {
|
||||||
if (ldapLoginUsesUsername) {
|
if (ldapLoginUsesUsername) {
|
||||||
ldap.username = true;
|
ldap.username = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ldap;
|
return ldap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -245,4 +245,4 @@ async function speechToText(req, res) {
|
||||||
await sttService.processTextToSpeech(req, res);
|
await sttService.processTextToSpeech(req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = speechToText;
|
module.exports = { speechToText };
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ async function getVoices(req, res) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ttsSchema = customConfig?.speech?.tts;
|
const ttsSchema = customConfig?.speech?.tts;
|
||||||
const provider = getProvider(ttsSchema);
|
const provider = await getProvider(ttsSchema);
|
||||||
let voices;
|
let voices;
|
||||||
|
|
||||||
switch (provider) {
|
switch (provider) {
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ export default function VoiceDropdown() {
|
||||||
options={voiceOptions}
|
options={voiceOptions}
|
||||||
sizeClasses="min-w-[200px] !max-w-[400px] [--anchor-max-width:400px]"
|
sizeClasses="min-w-[200px] !max-w-[400px] [--anchor-max-width:400px]"
|
||||||
anchor="bottom start"
|
anchor="bottom start"
|
||||||
position="left"
|
|
||||||
testId="VoiceDropdown"
|
testId="VoiceDropdown"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ const ttsLocalaiSchema = z.object({
|
||||||
const ttsSchema = z.object({
|
const ttsSchema = z.object({
|
||||||
openai: ttsOpenaiSchema.optional(),
|
openai: ttsOpenaiSchema.optional(),
|
||||||
azureOpenAI: ttsAzureOpenAISchema.optional(),
|
azureOpenAI: ttsAzureOpenAISchema.optional(),
|
||||||
elevenLabs: ttsElevenLabsSchema.optional(),
|
elevenlabs: ttsElevenLabsSchema.optional(),
|
||||||
localai: ttsLocalaiSchema.optional(),
|
localai: ttsLocalaiSchema.optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue