mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
修复回复内容过长时,同时回复语音的问题
This commit is contained in:
parent
4a6cad2e4e
commit
f4fccf957f
1 changed files with 7 additions and 5 deletions
|
|
@ -1302,12 +1302,14 @@ export class chatgpt extends plugin {
|
|||
this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`)
|
||||
}
|
||||
}
|
||||
if(ttsResponse.length <= parseInt(Config.ttsAutoFallbackThreshold)) {
|
||||
const sendable = await generateAudio(this.e, ttsResponse, emotion, emotionDegree)
|
||||
if (sendable) {
|
||||
await this.reply(sendable)
|
||||
} else {
|
||||
await this.reply('合成语音发生错误~')
|
||||
}
|
||||
}
|
||||
} else if (userSetting.usePicture || (Config.autoUsePicture && response.length > Config.autoUsePictureThreshold)) {
|
||||
// todo use next api of chatgpt to complete incomplete respoonse
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue