Add provider-specific TTS processing: XTTS - replace ellipsis, Novel - remove tildes.

This commit is contained in:
Cohee
2023-11-27 13:25:49 +02:00
parent edafb8dd13
commit ffc4f22012
4 changed files with 39 additions and 6 deletions

View File

@ -503,6 +503,10 @@ async function processTtsQueue() {
text = matches ? matches.join(partJoiner) : text;
}
if (typeof ttsProvider?.processText === 'function') {
text = await ttsProvider.processText(text);
}
// Collapse newlines and spaces into single space
text = text.replace(/\s+/g, ' ');