Merge pull request #3037 from yar3333/release Remove embedded images before send text to TTS

fe469745b390d11517fdf46b0072ad62510899c5

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
1 files changed, +3 -0Showing whitespace changes
public/scripts/extensions/tts/index.js+3 -0
@@ -483,6 +483,9 @@ async function processTtsQueue() {
483483 text = matches ? matches.join(partJoiner) : text;
484484 }
485485
486+ // Remove embedded images
487+ text = text.replace(/!\[.*?]\([^)]*\)/g, '');
488+
486489 if (typeof ttsProvider?.processText === 'function') {
487490 text = await ttsProvider.processText(text);
488491 }