mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
修复:语音模式下转文本模式的错误
This commit is contained in:
parent
4f44094794
commit
05732f87f2
1 changed files with 54 additions and 52 deletions
|
|
@ -1156,8 +1156,9 @@ export class chatgpt extends plugin {
|
||||||
this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`)
|
this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(ttsResponse.length <= Config.ttsAutoFallbackThreshold) {
|
||||||
let wav
|
let wav
|
||||||
if (Config.ttsMode === 'vits-uma-genshin-honkai' && Config.ttsSpace && ttsResponse.length <= Config.ttsAutoFallbackThreshold) {
|
if (Config.ttsMode === 'vits-uma-genshin-honkai' && Config.ttsSpace) {
|
||||||
if (Config.autoJapanese && (_.isEmpty(Config.baiduTranslateAppId) || _.isEmpty(Config.baiduTranslateSecret))) {
|
if (Config.autoJapanese && (_.isEmpty(Config.baiduTranslateAppId) || _.isEmpty(Config.baiduTranslateSecret))) {
|
||||||
await this.reply('请检查翻译配置是否正确。')
|
await this.reply('请检查翻译配置是否正确。')
|
||||||
return false
|
return false
|
||||||
|
|
@ -1193,7 +1194,7 @@ export class chatgpt extends plugin {
|
||||||
wav = await VoiceVoxTTS.generateAudio(ttsResponse, {
|
wav = await VoiceVoxTTS.generateAudio(ttsResponse, {
|
||||||
speaker
|
speaker
|
||||||
})
|
})
|
||||||
} else if (!Config.ttsSpace && !Config.azureTTSKey && !Config.voicevoxSpace) {
|
} else {
|
||||||
await this.reply('你没有配置转语音API哦')
|
await this.reply('你没有配置转语音API哦')
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
@ -1221,6 +1222,7 @@ export class chatgpt extends plugin {
|
||||||
logger.warn(err)
|
logger.warn(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (userSetting.usePicture || (Config.autoUsePicture && response.length > Config.autoUsePictureThreshold)) {
|
} else if (userSetting.usePicture || (Config.autoUsePicture && response.length > Config.autoUsePictureThreshold)) {
|
||||||
// todo use next api of chatgpt to complete incomplete respoonse
|
// todo use next api of chatgpt to complete incomplete respoonse
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue