From 4e447a59b5ae0e4057f77c8a1b91d0e305fe6c70 Mon Sep 17 00:00:00 2001 From: Risenafis Date: Tue, 11 Jun 2024 00:21:05 +0900 Subject: [PATCH] fix sbvits2 auto splitting --- public/scripts/extensions/tts/sbvits2.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/scripts/extensions/tts/sbvits2.js b/public/scripts/extensions/tts/sbvits2.js index ab41d4f6d..8b9a3bef3 100644 --- a/public/scripts/extensions/tts/sbvits2.js +++ b/public/scripts/extensions/tts/sbvits2.js @@ -276,6 +276,11 @@ class SBVits2TtsProvider { const [model_id, speaker_id, style] = voiceId.split('-'); const params = new URLSearchParams(); + if (this.settings.auto_split) { + // newlines are replaced with spaces + // so, revert for auto_split + inputText = inputText.replace(' ', '\n'); + } params.append('text', inputText); params.append('model_id', model_id); params.append('speaker_id', speaker_id);