mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
新增:加入高清语音,回复“#chatgpt开启高清语音”来开启
1.新增:加入高清语音,回复“#chatgpt开启高清语音”来开启 2.优化:语音模式下遇到超长文本将会使用图片模式
This commit is contained in:
parent
15f579aab8
commit
3364dbd89d
4 changed files with 73 additions and 14 deletions
|
|
@ -1113,7 +1113,7 @@ export class chatgpt extends plugin {
|
|||
for (let quote of quotemessage) {
|
||||
if (quote.imageLink) imgUrls.push(quote.imageLink)
|
||||
}
|
||||
if (useTTS) {
|
||||
if (useTTS && response.length <= Config.autoUsePictureThreshold {
|
||||
// 缓存数据
|
||||
this.cacheContent(e, use, response, prompt, quotemessage, mood, chatMessage.suggestedResponses, imgUrls)
|
||||
if (response === 'Thanks for this conversation! I\'ve reached my limit, will you hit “New topic,” please?') {
|
||||
|
|
|
|||
|
|
@ -184,6 +184,11 @@ export class ChatgptManagement extends plugin {
|
|||
fnc: 'setDefaultReplySetting',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
reg: '^#chatgpt(开启|关闭)高清语音',
|
||||
fnc: 'enableTtsHD',
|
||||
permission: 'master'
|
||||
},
|
||||
{
|
||||
/** 命令正则匹配 */
|
||||
reg: '^#(关闭|打开)群聊上下文$',
|
||||
|
|
@ -483,7 +488,14 @@ export class ChatgptManagement extends plugin {
|
|||
await this.reply('设置成功', e.isGroup)
|
||||
return false
|
||||
}
|
||||
|
||||
async enableTtsHD (e) {
|
||||
Config.ttsHD = e.msg.indexOf('开启') > -1
|
||||
if(Config.ttsHD) {
|
||||
await this.reply('已开启高清语音,电脑端将无法播放语音', true)
|
||||
} else {
|
||||
await this.reply('已关闭高清语音', true)
|
||||
}
|
||||
}
|
||||
async enableGroupContext (e) {
|
||||
const reg = /(关闭|打开)/
|
||||
const match = e.msg.match(reg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue