mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
Merge pull request #2365 from Risenafis/fix-sbvits-splitting
Fix Style-Bert-VITS2 auto splitting
This commit is contained in:
commit
ea21de89c3
@ -19,6 +19,8 @@ class SBVits2TtsProvider {
|
||||
* @returns {string} Processed text
|
||||
*/
|
||||
processText(text) {
|
||||
// backup for auto_split
|
||||
text = text.replace(/\n+/g, '<br>');
|
||||
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('<br>', '\n');
|
||||
params.append('text', inputText);
|
||||
params.append('model_id', model_id);
|
||||
params.append('speaker_id', speaker_id);
|
||||
|
Loading…
Reference in New Issue
Block a user