diff --git a/public/scripts/extensions/tts/sbvits2.js b/public/scripts/extensions/tts/sbvits2.js
index ab41d4f6d..7f542ca6a 100644
--- a/public/scripts/extensions/tts/sbvits2.js
+++ b/public/scripts/extensions/tts/sbvits2.js
@@ -19,6 +19,8 @@ class SBVits2TtsProvider {
* @returns {string} Processed text
*/
processText(text) {
+ // backup for auto_split
+ text = text.replace(/\n+/g, '
');
return text;
}
@@ -276,6 +278,8 @@ class SBVits2TtsProvider {
const [model_id, speaker_id, style] = voiceId.split('-');
const params = new URLSearchParams();
+ // restore for auto_split
+ inputText = inputText.replaceAll('
', '\n');
params.append('text', inputText);
params.append('model_id', model_id);
params.append('speaker_id', speaker_id);