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