fix: 调整以支持云转码

This commit is contained in:
葛胤池 2023-04-29 18:27:57 +08:00
parent 0daecc2edb
commit 1454917cad
5 changed files with 262 additions and 236 deletions

View file

@ -1,7 +1,7 @@
import { Config } from './utils/config.js'
import { speakers } from './utils/tts.js'
import AzureTTS from './utils/tts/microsoft-azure.js'
import VoiceVoxTTS from "./utils/tts/voicevox.js";
import VoiceVoxTTS from './utils/tts/voicevox.js'
// 支持锅巴
export function supportGuoba () {
return {
@ -108,12 +108,12 @@ export function supportGuoba () {
{
field: 'voicevoxTTSSpeaker',
label: '语音模式默认角色VoiceVox',
bottomHelpMessage: 'VoiceVox语音模式下未指定角色时使用的角色。若留空将使用随机角色回复。若用户通过指令指定了角色将忽略本设定',
component: 'Select',
componentProps: {
bottomHelpMessage: 'VoiceVox语音模式下未指定角色时使用的角色。若留空将使用随机角色回复。若用户通过指令指定了角色将忽略本设定',
component: 'Select',
componentProps: {
options: VoiceVoxTTS.supportConfigurations.map(item => {
return item.styles.map(style => {
return `${item.name}-${style.name}`
return `${item.name}-${style.name}`
}).concat(item.name)
}).flat().concat('随机').map(s => { return { label: s, value: s } })
}
@ -567,7 +567,7 @@ export function supportGuoba () {
field: 'voicevoxSpace',
label: 'voicevox语音转换API地址',
bottomHelpMessage: '可使用https://2ndelement-voicevox.hf.space, 也可github搜索voicevox-engine自建',
component: 'Input'
component: 'Input'
},
{
field: 'azureTTSKey',
@ -728,7 +728,7 @@ export function supportGuoba () {
label: 'Live2D模型',
bottomHelpMessage: '选择Live2D使用的模型',
component: 'Input'
},
}
],
// 获取配置数据方法(用于前端填充显示数据)
getConfigData () {