Remove embedded images before send text to TTS
| @@ -483,6 +483,9 @@ async function processTtsQueue() { | ||
| 483 | 483 | text = matches ? matches.join(partJoiner) : text; |
| 484 | 484 | } |
| 485 | 485 | |
| 486 | + // Remove embedded images | |
| 487 | + text = text.replace(/!\[alt-text]\([^)]*\)/g, ' '); | |
| 488 | + | |
| 486 | 489 | if (typeof ttsProvider?.processText === 'function') { |
| 487 | 490 | text = await ttsProvider.processText(text); |
| 488 | 491 | } |