mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: 添加基于voicevox语音支持
This commit is contained in:
parent
a714c21ffb
commit
94c44068a4
5 changed files with 291 additions and 3 deletions
|
|
@ -1,6 +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";
|
||||
// 支持锅巴
|
||||
export function supportGuoba () {
|
||||
return {
|
||||
|
|
@ -100,6 +101,19 @@ export function supportGuoba () {
|
|||
options: speakers.concat('随机').map(s => { return { label: s, value: s } })
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'voicevoxTTSSpeaker',
|
||||
label: '语音模式默认角色(VoiceVox)',
|
||||
bottomHelpMessage: 'VoiceVox语音模式下,未指定角色时使用的角色。若留空,将使用随机角色回复。若用户通过指令指定了角色,将忽略本设定',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: VoiceVoxTTS.supportConfigurations.map(item => {
|
||||
return item.styles.map(style => {
|
||||
return `${item.name}-${style.name}`
|
||||
}).concat(item.name)
|
||||
}).flat().concat('随机').map(s => { return { label: s, value: s } })
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'azureTTSSpeaker',
|
||||
label: '语音模式默认角色(微软Azure)',
|
||||
|
|
@ -545,6 +559,12 @@ export function supportGuoba () {
|
|||
bottomHelpMessage: '前往duplicate空间https://huggingface.co/spaces/ikechan8370/vits-uma-genshin-honkai后查看api地址',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'voicevoxSpace',
|
||||
label: 'voicevox语音转换API地址',
|
||||
bottomHelpMessage: '可使用https://2ndelement-voicevox.hf.space, 也可github搜索voicevox-engine自建',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'azureTTSKey',
|
||||
label: 'Azure语音服务密钥',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue