mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add provider-specific TTS processing: XTTS - replace ellipsis, Novel - remove tildes.
This commit is contained in:
@ -13,6 +13,19 @@ class XTTSTtsProvider {
|
||||
voices = []
|
||||
separator = '. '
|
||||
|
||||
/**
|
||||
* Perform any text processing before passing to TTS engine.
|
||||
* @param {string} text Input text
|
||||
* @returns {string} Processed text
|
||||
*/
|
||||
processText(text) {
|
||||
// Replace fancy ellipsis with "..."
|
||||
text = text.replace(/…/g, '...')
|
||||
// Replace multiple "." with single "."
|
||||
text = text.replace(/\.+/g, '.')
|
||||
return text
|
||||
}
|
||||
|
||||
languageLabels = {
|
||||
"Arabic": "ar",
|
||||
"Brazilian Portuguese": "pt",
|
||||
|
Reference in New Issue
Block a user