INNER CODE UNIT · JavaScript
initializeSpeechVoices
ChatFAQ/ChatFAQ · widget/store/index.js:272
function initializeSpeechVoices(state) {
if ('speechSynthesis' in window || 'webkitSpeechSynthesis' in window) {
const speechSynthesis = window.speechSynthesis || window.webkitSpeechSynthesis;
function populateVoiceList() {
if (typeof speechSynthesis === "undefined")
return;
state.speechSynthesisVoices = speechSynthesis.getVoices();
state.speechVoicesInitialized = true;
}
if (typeof speechSynthesis !== "undefined") {
speechSynthesis.onvoiceschanged = populateVoiceList;
}
populateVoiceList()
}
return false
}