mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 20:50:09 +01:00
3dc0f3f490
* Update OpenAI TTS config to allow a custom BaseURL * uncheck config file * break openai generic TTS into its own provider * add space * hide TTS on user msg --------- Co-authored-by: Adam <phazei@gmail.com>
19 lines
578 B
JavaScript
19 lines
578 B
JavaScript
function getTTSProvider() {
|
|
const provider = process.env.TTS_PROVIDER || "openai";
|
|
switch (provider) {
|
|
case "openai":
|
|
const { OpenAiTTS } = require("./openAi");
|
|
return new OpenAiTTS();
|
|
case "elevenlabs":
|
|
const { ElevenLabsTTS } = require("./elevenLabs");
|
|
return new ElevenLabsTTS();
|
|
case "generic-openai":
|
|
const { GenericOpenAiTTS } = require("./openAiGeneric");
|
|
return new GenericOpenAiTTS();
|
|
default:
|
|
throw new Error("ENV: No TTS_PROVIDER value found in environment!");
|
|
}
|
|
}
|
|
|
|
module.exports = { getTTSProvider };
|