From 00e48097e5bb02c10691abc680c38629d00dfd96 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:34:21 +0300 Subject: [PATCH] Mark provider unofficial in the list --- .../scripts/extensions/tts/gpt-sovits-v2.js | 20 +++++++++---------- public/scripts/extensions/tts/index.js | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/public/scripts/extensions/tts/gpt-sovits-v2.js b/public/scripts/extensions/tts/gpt-sovits-v2.js index 2e4e23787..b6d2f740d 100644 --- a/public/scripts/extensions/tts/gpt-sovits-v2.js +++ b/public/scripts/extensions/tts/gpt-sovits-v2.js @@ -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}/`; diff --git a/public/scripts/extensions/tts/index.js b/public/scripts/extensions/tts/index.js index 921669229..802d51f9c 100644 --- a/public/scripts/extensions/tts/index.js +++ b/public/scripts/extensions/tts/index.js @@ -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,