fix: 设置不存在的角色语音时给提示

This commit is contained in:
ikechan8370 2023-03-05 00:07:01 +08:00
parent a54f87667a
commit c9361c63b4
2 changed files with 7 additions and 2 deletions

View file

@ -61,6 +61,7 @@ export async function generateAudio (text, speaker = '随机', language = '中
}
if (response.status > 299) {
logger.info(json)
throw new Error(JSON.stringify(json))
}
let [message, audioInfo, take] = json?.data
logger.info(message, take)