mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: 切换语音模式对各种语言源提示错误
This commit is contained in:
parent
8baef8b579
commit
68ef2d104f
1 changed files with 19 additions and 3 deletions
22
apps/chat.js
22
apps/chat.js
|
|
@ -510,9 +510,25 @@ export class chatgpt extends plugin {
|
|||
}
|
||||
|
||||
async switch2Audio (e) {
|
||||
if (!Config.ttsSpace) {
|
||||
await this.reply('您没有配置VITS API,请前往锅巴面板进行配置')
|
||||
return
|
||||
switch (Config.ttsMode){
|
||||
case 'vits-uma-genshin-honkai':
|
||||
if(!Config.ttsSpace){
|
||||
await this.reply('您没有配置VITS API,请前往锅巴面板进行配置')
|
||||
return
|
||||
}
|
||||
break
|
||||
case 'azure':
|
||||
if(!Config.azureKey){
|
||||
await this.reply('您没有配置Azure Key,请前往锅巴面板进行配置')
|
||||
return
|
||||
}
|
||||
break
|
||||
case 'voicevox':
|
||||
if(!Config.voicevoxSpace){
|
||||
await this.reply('您没有配置VoiceVox API,请前往锅巴面板进行配置')
|
||||
return
|
||||
}
|
||||
break
|
||||
}
|
||||
let userSetting = await redis.get(`CHATGPT:USER:${e.sender.user_id}`)
|
||||
if (!userSetting) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue