mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-11 17:40:14 +01:00
Mark provider unofficial in the list
This commit is contained in:
parent
d7d204f2ab
commit
84c04f0354
@ -1,4 +1,4 @@
|
|||||||
import { getPreviewString, saveTtsProviderSettings } from './index.js';
|
import { saveTtsProviderSettings } from './index.js';
|
||||||
|
|
||||||
export { CosyVoiceProvider };
|
export { CosyVoiceProvider };
|
||||||
|
|
||||||
@ -111,14 +111,14 @@ class CosyVoiceProvider {
|
|||||||
|
|
||||||
async getVoice(voiceName) {
|
async getVoice(voiceName) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (this.voices.length == 0) {
|
if (this.voices.length == 0) {
|
||||||
this.voices = await this.fetchTtsVoiceObjects();
|
this.voices = await this.fetchTtsVoiceObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const match = this.voices.filter(
|
const match = this.voices.filter(
|
||||||
v => v.name == voiceName,
|
v => v.name == voiceName,
|
||||||
)[0];
|
)[0];
|
||||||
@ -129,7 +129,7 @@ class CosyVoiceProvider {
|
|||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async generateTts(text, voiceId) {
|
async generateTts(text, voiceId) {
|
||||||
const response = await this.fetchTtsGeneration(text, voiceId);
|
const response = await this.fetchTtsGeneration(text, voiceId);
|
||||||
@ -168,11 +168,11 @@ class CosyVoiceProvider {
|
|||||||
console.info(`Generating new TTS for voice_id ${voiceId}`);
|
console.info(`Generating new TTS for voice_id ${voiceId}`);
|
||||||
|
|
||||||
const streaming = this.settings.streaming;
|
const streaming = this.settings.streaming;
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
text: inputText,
|
text: inputText,
|
||||||
speaker: voiceId,
|
speaker: voiceId,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (streaming) {
|
if (streaming) {
|
||||||
params['streaming'] = 1;
|
params['streaming'] = 1;
|
||||||
@ -197,7 +197,7 @@ class CosyVoiceProvider {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Interface not used
|
// Interface not used
|
||||||
async fetchTtsFromHistory(history_item_id) {
|
async fetchTtsFromHistory(history_item_id) {
|
||||||
|
@ -87,6 +87,7 @@ const ttsProviders = {
|
|||||||
AllTalk: AllTalkTtsProvider,
|
AllTalk: AllTalkTtsProvider,
|
||||||
Azure: AzureTtsProvider,
|
Azure: AzureTtsProvider,
|
||||||
Coqui: CoquiTtsProvider,
|
Coqui: CoquiTtsProvider,
|
||||||
|
'CosyVoice (Unofficial)': CosyVoiceProvider,
|
||||||
Edge: EdgeTtsProvider,
|
Edge: EdgeTtsProvider,
|
||||||
ElevenLabs: ElevenLabsTtsProvider,
|
ElevenLabs: ElevenLabsTtsProvider,
|
||||||
GSVI: GSVITtsProvider,
|
GSVI: GSVITtsProvider,
|
||||||
@ -99,7 +100,6 @@ const ttsProviders = {
|
|||||||
System: SystemTtsProvider,
|
System: SystemTtsProvider,
|
||||||
VITS: VITSTtsProvider,
|
VITS: VITSTtsProvider,
|
||||||
XTTSv2: XTTSTtsProvider,
|
XTTSv2: XTTSTtsProvider,
|
||||||
CosyVoice: CosyVoiceProvider,
|
|
||||||
};
|
};
|
||||||
let ttsProvider;
|
let ttsProvider;
|
||||||
let ttsProviderName;
|
let ttsProviderName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user