JSFiddle - React, Tailwind, and code Playground
HTML
<button id="button">
CLICK ME
</button>
JavaScript
document.getElementById('button').onclick = function(){
var msg = new SpeechSynthesisUtterance('Hello World');
msg.lang = 'en-GB';
window.speechSynthesis.speak(msg);
}