为azure语音模式添加说话风格配置,支持vits语音模式中文回答转日语语音输出,添加翻译功能,支持指令切换语音模式,支持查看当前语音模式下的支持角色列表 (#404)

* feat: add support for ‘greeting’ and ‘global reply mode’ commands, improve variable naming and remove unnecessary backend output.

* feat: Add support for black and white lists, global reply mode and voice role settings, private chat switch, and active greeting configuration. Refactor some variable names and comment out redundant code for better readability and reduced backend output.

* feat: 为新功能完善了帮助面板

* docs: 完善了‘打招呼’的帮助说明

* Commit Type: feat, bugfix

Add functionality to view plugin command table, fix bug in blacklist/whitelist, and fix bug where chat mode can still be used in private messaging when disabled.

* Commit Type: feat, bugfix

Add functionality to view plugin command table, fix bug in blacklist/whitelist, and fix bug where chat mode can still be used in private messaging when disabled.

* refactor: Remove redundant log output.

* Refactor: optimize code logic

* Fix: 修复绘图指令表被抢指令的bug。

* Refactor:1. Add support for automatically translating replies to Japanese and generating voice messages in VITS voice mode (please monitor remaining quota after enabling). 2. Add translation function. 3. Add emotion configuration for Azure voice mode, allowing the robot to select appropriate emotional styles for replies.

* Refactor:Handle the issue of exceeding character setting limit caused by adding emotion configuration.

* Fix: fix bugs

* Refactor: Added error feedback to translation service

* Refactor: Added support for viewing the list of supported roles for each language mode, and fixed some bugs in the emotion switching feature of the auzre mode.

* Refactor: Optimized some command feedback and added owner restriction to chat record export function.

* Refactor: Optimized feedback when viewing role list to avoid excessive messages.

* Refactor: Optimized feedback when configuring multi-emotion mode.

* Feature: Added help instructions for translation feature.

* chore: Adjust help instructions for mood settings

* Fix: Fixed issue where only first line of multi-line replies were being read and Azure voice was pronouncing punctuation marks.

* Fix: Fixed bug where switching to Azure voice mode prompted for missing key and restricted ability to view voice role list to only when in voice mode.

---------

Co-authored-by: Sean <1519059137@qq.com>
Co-authored-by: ikechan8370 <geyinchibuaa@gmail.com>
This commit is contained in:
Sean Murphy 2023-05-04 22:55:49 +08:00 committed by GitHub
parent bb90c3c3e7
commit b687d45897
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 1165 additions and 75 deletions

View file

@ -98,29 +98,16 @@ export function supportGuoba () {
},
{
field: 'defaultTTSRole',
label: '语音模式默认角色vits-uma-genshin-honkai',
label: 'vits默认角色',
bottomHelpMessage: 'vits-uma-genshin-honkai语音模式下未指定角色时使用的角色。若留空将使用随机角色回复。若用户通过指令指定了角色将忽略本设定',
component: 'Select',
componentProps: {
options: speakers.concat('随机').map(s => { return { label: s, value: s } })
}
},
{
field: 'voicevoxTTSSpeaker',
label: '语音模式默认角色VoiceVox',
bottomHelpMessage: 'VoiceVox语音模式下未指定角色时使用的角色。若留空将使用随机角色回复。若用户通过指令指定了角色将忽略本设定',
component: 'Select',
componentProps: {
options: VoiceVoxTTS.supportConfigurations.map(item => {
return item.styles.map(style => {
return `${item.name}-${style.name}`
}).concat(item.name)
}).flat().concat('随机').map(s => { return { label: s, value: s } })
}
},
{
field: 'azureTTSSpeaker',
label: '语音模式默认角色微软Azure',
label: 'Azure默认角色',
bottomHelpMessage: '微软Azure语音模式下未指定角色时使用的角色。若用户通过指令指定了角色将忽略本设定',
component: 'Select',
componentProps: {
@ -132,6 +119,19 @@ export function supportGuoba () {
})
}
},
{
field: 'voicevoxTTSSpeaker',
label: 'VoiceVox默认角色',
bottomHelpMessage: 'VoiceVox语音模式下未指定角色时使用的角色。若留空将使用随机角色回复。若用户通过指令指定了角色将忽略本设定',
component: 'Select',
componentProps: {
options: VoiceVoxTTS.supportConfigurations.map(item => {
return item.styles.map(style => {
return `${item.name}-${style.name}`
}).concat(item.name)
}).flat().concat('随机').map(s => { return { label: s, value: s } })
}
},
{
field: 'ttsRegex',
label: '语音过滤正则表达式',
@ -155,6 +155,14 @@ export function supportGuoba () {
bottomHelpMessage: '语音模式下,同时发送文字版,避免音质较低听不懂',
component: 'Switch'
},
{
field: 'autoJapanese',
label: 'vits模式日语输出',
bottomHelpMessage: '使用vits语音时将机器人的文字回复翻译成日文后获取语音。' +
'需要填写下方的翻译配置配置文档http://api.fanyi.baidu.com/doc/21 ' +
'填写配置后另外支持通过本插件使用文字翻译功能,发送"#chatgpt翻译帮助"查看使用方法。',
component: 'Switch'
},
{
field: 'autoUsePicture',
label: '长文本自动转图片',
@ -557,6 +565,16 @@ export function supportGuoba () {
bottomHelpMessage: '可注册2captcha实现跳过验证码收费服务但很便宜。否则可能会遇到验证码而卡住',
component: 'InputPassword'
},
{
field: 'baiduTranslateAppId',
label: '百度翻译应用ID',
component: 'Input'
},
{
field: 'baiduTranslateSecret',
label: '百度翻译密钥',
component: 'Input'
},
{
field: 'ttsSpace',
label: 'vits-uma-genshin-honkai语音转换API地址',
@ -580,6 +598,18 @@ export function supportGuoba () {
bottomHelpMessage: '例如japaneast',
component: 'Input'
},
{
field: 'azureTTSEmotion',
label: 'Azure情绪多样化',
bottomHelpMessage: '切换角色后使用"#chatgpt使用设定xxx"重新开始对话以更新不同角色的情绪配置。支持使用不同的说话风格回复各个角色支持说话风格详情https://speech.microsoft.com/portal/voicegallery',
component: 'Switch'
},
{
field: 'enhanceAzureTTSEmotion',
label: 'Azure情绪纠正',
bottomHelpMessage: '当机器人未使用或使用了不支持的说话风格时将在对话中提醒机器人。注意bing模式开启此项后有概率增大触发抱歉的机率且不要单独开启此项。',
component: 'Switch'
},
{
field: 'huggingFaceReverseProxy',
label: '语音转换huggingface反代',