force english language for speech synthesis

This commit is contained in:
Thibault Duplessis 2019-05-02 16:31:55 +07:00
parent 5858876692
commit 7ddabae84b

View file

@ -614,6 +614,7 @@
if (!speechStorage.get()) return false;
var msg = text.text ? text : new SpeechSynthesisUtterance(text);
msg.volume = api.getVolume();
msg.lang = 'en-US';
if (cut) speechSynthesis.cancel();
speechSynthesis.speak(msg);
console.log(`%c${msg.text}`, 'color: blue');