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

@@ -19,6 +19,17 @@ class NovelTtsProvider {
customVoices: []
}
/**
* Perform any text processing before passing to TTS engine.
* @param {string} text Input text
* @returns {string} Processed text
*/
processText(text) {
// Novel reads tilde as a word. Replace with full stop
text = text.replace(/~/g, '.');
return text;
}
get settingsHtml() {
let html = `
<div class="novel_tts_hints">