fix: 解决角色性格切换问题

This commit is contained in:
2ndelement 2023-04-23 02:01:36 +08:00
parent 4a5407502a
commit 78a99801e7

View file

@ -26,8 +26,7 @@ const newFetch = (url, options = {}) => {
async function generateAudio(text, options = {}) {
let host = Config.voicevoxSpace
logger.info(`用户配置speaker:${options.speaker}`)
let speaker = options.speaker?.speaker || '护士机器子T'
let speaker = options.speaker || '随机'
if (speaker === '随机') {
speaker = supportConfigurations[Math.floor(Math.random() * supportConfigurations.length)].name
}