Bug fixes

This commit is contained in:
Natsumi
2021-07-31 19:22:01 +12:00
parent 7739a32fc1
commit 393335db59
2 changed files with 16 additions and 18 deletions

View File

@@ -8089,6 +8089,12 @@ speechSynthesis.getVoices();
this.notificationTTSVoice = index;
configRepository.setString('VRCX_notificationTTSVoice', this.notificationTTSVoice);
var voices = speechSynthesis.getVoices();
if (voices.length === 0) {
return;
}
if (index > voices.length) {
index = 0;
}
var voiceName = voices[index].name;
speechSynthesis.cancel();
this.speak(voiceName);