Easy Text-to-Speech


Easy Text-to-Speech

Easy Text-to-Speech

About

 The Easy Text-to-Speech item consists of a JavaScript class which allows for the easy integration of text to speech into any project. The Reader class allows any element to be read with as little as 1 line of code. The following peice of code creates an event listener that reads the element with the id “clickable” when it is clicked:
(new Reader()).readWhen(‘click’, document.getElementById(‘clickable’));  The Reader class also comes with default word highlighting. When the reader is reading a word, the words background will change color, and appear to be highlighted. The highlighting can be changed, and styled by the <c>’c’</c> tag. For additional support and to see a full list of abilities visit the docs page

Change Logs

  • 12/26/2021: initial release
  • 4/30/2022: Added setOnEnd() method
  • 12/29/2022: Added setUseDefaultButton, setPlayIcon, setPauseIcon, and setLanguage methods as well as Reader.css.