diff --git a/public/scripts/extensions/tts/elevenlabs.js b/public/scripts/extensions/tts/elevenlabs.js index 0429f5ea8..65c3cf302 100644 --- a/public/scripts/extensions/tts/elevenlabs.js +++ b/public/scripts/extensions/tts/elevenlabs.js @@ -7,6 +7,7 @@ class ElevenLabsTtsProvider { settings voices = [] + separator = ' ... ... ... ' get settings() { return this.settings diff --git a/public/scripts/extensions/tts/index.js b/public/scripts/extensions/tts/index.js index 696a18c05..4eeded46c 100644 --- a/public/scripts/extensions/tts/index.js +++ b/public/scripts/extensions/tts/index.js @@ -247,7 +247,8 @@ async function processTtsQueue() { const special_quotes = /[“”]/g; // Extend this regex to include other special quotes text = text.replace(special_quotes, '"'); const matches = text.match(/".*?"/g); // Matches text inside double quotes, non-greedily - text = matches ? matches.join(' ... ... ... ') : text; + const partJoiner = (ttsProvider?.separator || ' ... '); + text = matches ? matches.join(partJoiner) : text; } console.log(`TTS: ${text}`) const char = currentTtsJob.name diff --git a/public/scripts/extensions/tts/silerotts.js b/public/scripts/extensions/tts/silerotts.js index 7b00e78e1..97e6db528 100644 --- a/public/scripts/extensions/tts/silerotts.js +++ b/public/scripts/extensions/tts/silerotts.js @@ -9,6 +9,7 @@ class SileroTtsProvider { settings voices = [] + separator = ' ... ' defaultSettings = { provider_endpoint: "http://localhost:8001/tts", diff --git a/public/scripts/extensions/tts/system.js b/public/scripts/extensions/tts/system.js index e07a32843..dd8c324fb 100644 --- a/public/scripts/extensions/tts/system.js +++ b/public/scripts/extensions/tts/system.js @@ -21,6 +21,7 @@ class SystemTtsProvider { fallbackPreview = 'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet' settings voices = [] + separator = ' ... ' defaultSettings = { voiceMap: {},