feat: 语音模式下同时发送文字(默认关闭);锅巴中选择语音人物

This commit is contained in:
ikechan8370 2023-03-07 13:05:12 +08:00
parent de5707de2b
commit 58adb3d280
3 changed files with 20 additions and 15 deletions

View file

@ -622,6 +622,12 @@ export class chatgpt extends plugin {
if (Config.ttsSpace && response.length <= 299) {
let wav = await generateAudio(response, speaker, '中文')
e.reply(segment.record(wav))
if (Config.alsoSendText) {
await this.reply(`${response}`, e.isGroup)
if (quotemessage.length > 0) {
this.reply(await makeForwardMsg(this.e, quotemessage))
}
}
} else {
await this.reply('你没有配置转语音API或者文字太长了哦我用文本回复你吧', e.isGroup)
await this.reply(`${response}`, e.isGroup)