Merge pull request #3037 from yar3333/release

Remove embedded images before send text to TTS
This commit is contained in:
Cohee 2024-11-03 19:02:44 +02:00 committed by GitHub
commit fe469745b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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