🗣️ feat: Azure OpenAI speech (#2985)

* feat: Azure STT

* feat: Azure TTS

* refactor: use enums

* fix: frontend tests

* fix(config): wrong key provider
This commit is contained in:
Marco Beretta 2024-07-10 22:33:06 +02:00 committed by GitHub
parent 87bdbda10a
commit a05e2c1dcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 201 additions and 79 deletions

View file

@ -1,3 +1,4 @@
const { TTSProviders } = require('librechat-data-provider');
const getCustomConfig = require('~/server/services/Config/getCustomConfig');
const { getProvider } = require('./textToSpeech');
@ -24,13 +25,16 @@ async function getVoices(req, res) {
let voices;
switch (provider) {
case 'openai':
case TTSProviders.OPENAI:
voices = ttsSchema.openai?.voices;
break;
case 'elevenlabs':
case TTSProviders.AZURE_OPENAI:
voices = ttsSchema.azureOpenAI?.voices;
break;
case TTSProviders.ELEVENLABS:
voices = ttsSchema.elevenlabs?.voices;
break;
case 'localai':
case TTSProviders.LOCALAI:
voices = ttsSchema.localai?.voices;
break;
default: