Add piperTTS in-browser text-to-speech (#2052)

* Add piperTTS in-browser text-to-speech

* update vite config

* Add voice default + change prod public URL

* uncheck file

* Error handling
bump package for better quality and voices

* bump package

* Remove pre-packed WASM - will not support offline first solution for docker

* attach TTSProvider telem
This commit is contained in:
Timothy Carambat
2024-08-07 11:09:51 -07:00
committed by GitHub
parent b4f80c3be2
commit d072875e43
21 changed files with 736 additions and 6 deletions

View File

@@ -477,6 +477,12 @@ const KEY_MAPPING = {
envKey: "TTS_ELEVEN_LABS_VOICE_MODEL",
checks: [],
},
// PiperTTS Local
TTSPiperTTSVoiceModel: {
envKey: "TTS_PIPER_VOICE_MODEL",
checks: [],
},
};
function isNotEmpty(input = "") {
@@ -536,7 +542,12 @@ function validOllamaLLMBasePath(input = "") {
}
function supportedTTSProvider(input = "") {
const validSelection = ["native", "openai", "elevenlabs"].includes(input);
const validSelection = [
"native",
"openai",
"elevenlabs",
"piper_local",
].includes(input);
return validSelection ? null : `${input} is not a valid TTS provider.`;
}