fix: 修改角色性格切换问题

This commit is contained in:
2ndelement 2023-04-23 01:55:56 +08:00
parent 06495c3c59
commit 4a5407502a

View file

@ -26,6 +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'
if (speaker === '随机') {
speaker = supportConfigurations[Math.floor(Math.random() * supportConfigurations.length)].name