diff --git a/public/scripts/extensions/tts/edge.js b/public/scripts/extensions/tts/edge.js index cfa6b22cc..5f6e2670d 100644 --- a/public/scripts/extensions/tts/edge.js +++ b/public/scripts/extensions/tts/edge.js @@ -127,14 +127,14 @@ class EdgeTtsProvider { } ) if (!response.ok) { - throw new Error(`HTTP ${response.status}: ${await response.json()}`) + toastr.error(response.statusText); + throw new Error(`HTTP ${response.status}`) } return response } } function throwIfModuleMissing() { if (!modules.includes('edge-tts')) { - toastr.error(`Edge TTS module not loaded. Add edge-tts to enable-modules and restart the Extras API.`) throw new Error(`Edge TTS module not loaded.`) } diff --git a/public/scripts/extensions/tts/index.js b/public/scripts/extensions/tts/index.js index 035d485c3..bd7b32bcd 100644 --- a/public/scripts/extensions/tts/index.js +++ b/public/scripts/extensions/tts/index.js @@ -414,6 +414,7 @@ async function processTtsQueue() { const voice = await ttsProvider.getVoice((voiceMap[char])) const voiceId = voice.voice_id if (voiceId == null) { + toastr.error(`Specified voice for ${char} was not found. Check the TTS extension settings.`) throw `Unable to attain voiceId for ${char}` } tts(text, voiceId) @@ -494,7 +495,6 @@ async function voicemapIsValid(parsedVoiceMap) { async function updateVoiceMap() { let isValidResult = false - const context = getContext() const value = $('#tts_voice_map').val() const parsedVoiceMap = parseVoiceMap(value)