Remove embedded images before send text to TTS

This commit is contained in:
Yaroslav Sivakov 2024-11-02 20:25:25 +03:00
parent 17b7f17676
commit 8b32ee9e80
1 changed files with 3 additions and 0 deletions

View File

@ -483,6 +483,9 @@ async function processTtsQueue() {
text = matches ? matches.join(partJoiner) : text;
}
// Remove embedded images
text = text.replace(/!\[alt-text]\([^)]*\)/g, ' ');
if (typeof ttsProvider?.processText === 'function') {
text = await ttsProvider.processText(text);
}