JSFiddle - React, Tailwind, and code Playground
by technik300
JavaScript
const utterance = new SpeechSynthesisUtterance('Добрый день!');
const cat = new CustomEvent('anif', {
detail: {
name: 'cat'
}
});
document.addEventListener('anif', function() {
window.speechSynthesis.speak(utterance);
})
document.dispatchEvent(cat);