Speech text Reader with Javascript
course from Brad Traversy
Features:
HTML
toggle-button for hiding and showing the text boxthe select option list will fetch from API
textarea value pass into the message text when reading
the main show up the list of data (images and text)
CSS
hide the text box outside top of client Page and position turns down when adding classlist showwhen the box is active , the box-shadow shows up
and the image fit in the box
loop the data to get the image and the text, set the box dom and classList, then append to the main section
when clicking the box, setTextMessage() and speanText(),also for the box-shadow effect with active classname
new message of input text value as a parameter
the text pass to message value
speakText with speecgSynthesis.speak()
fetch the voices with speechSynthesis.getVoices()
loop each kind of voice and pass into select options including name and lang
when voice changed, getVoice()
when click the close btton in the text box, close the box removing the show class name
set the voice name to the selected option value
another demo for this web speech API