Mark provider unofficial in the list

This commit is contained in:
Cohee 2024-09-27 20:34:21 +03:00
parent 43c3943287
commit 00e48097e5
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
import { getPreviewString, saveTtsProviderSettings } from './index.js';
import { saveTtsProviderSettings } from './index.js';
export { GptSovitsV2Provider };
@ -42,7 +42,7 @@ class GptSovitsV2Provider {
lang: 'auto',
streaming: false,
text_lang: 'zh',
prompt_lang:"zh",
prompt_lang: 'zh',
};
@ -178,7 +178,7 @@ class GptSovitsV2Provider {
console.info(`Generating new TTS for voice_id ${voiceId}`);
function replaceSpeaker(text) {
return text.replace(/\[.*?\]/gu, "");
return text.replace(/\[.*?\]/gu, '');
}
let prompt_text = replaceSpeaker(voiceId);
@ -187,15 +187,15 @@ class GptSovitsV2Provider {
const params = {
text: inputText,
prompt_text:prompt_text,
ref_audio_path:"./参考音频/"+voiceId+".wav",
prompt_text: prompt_text,
ref_audio_path: './参考音频/' + voiceId + '.wav',
text_lang: this.settings.text_lang,
prompt_lang: this.settings.prompt_lang,
text_split_method:"cut5",
batch_size:1,
media_type:"ogg",
streaming_mode:"true",
};
text_split_method: 'cut5',
batch_size: 1,
media_type: 'ogg',
streaming_mode: 'true',
};
const url = `${this.settings.provider_endpoint}/`;

View File

@ -92,7 +92,7 @@ const ttsProviders = {
Edge: EdgeTtsProvider,
ElevenLabs: ElevenLabsTtsProvider,
GSVI: GSVITtsProvider,
GptSovitsV2: GptSovitsV2Provider,
'GPT-SoVITS-V2 (Unofficial)': GptSovitsV2Provider,
Novel: NovelTtsProvider,
OpenAI: OpenAITtsProvider,
'OpenAI Compatible': OpenAICompatibleTtsProvider,