added await to tts to properly catch the error on this async function

This commit is contained in:
johnbenac 2024-04-05 18:57:51 -04:00 committed by GitHub
parent 6cf897219e
commit 3b6c32113f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -578,7 +578,7 @@ async function processTtsQueue() {
toastr.error(`Specified voice for ${char} was not found. Check the TTS extension settings.`);
throw `Unable to attain voiceId for ${char}`;
}
tts(text, voiceId, char);
await tts(text, voiceId, char);
} catch (error) {
toastr.error(error.toString());
console.error(error);