JSFiddle - React, Tailwind, and code Playground

by atesgoral

HTML

<button id="walk">Walk</button>
<button id="hit">Hit</button>

JavaScript

e=(u,p,r)=>{
v=new SpeechSynthesisUtterance(u);
//v.voice=speechSynthesis.getVoices()[0];
//v.text=u;
//v.pitch=p;
//v.rate=r;
speechSynthesis.speak(v);
}


$('#walk').click(_ => e('cat',1,1));
$('#hit').click(_ => e('womp',1,1));