Text to Speech with SpeechSynthesis API
In this lab, you will create a Text-to-Speech converter using the SpeechSynthesis API. You will build a simple interface that allows the user to enter text and click a button to convert the text to speech.
To complete this lab, you will use the following HTML elements:
h1 for the heading,
textarea for the user to input text, and a
button to trigger the speech conversion.
SpeechSynthesisUtterance object to create a speech request and the
speechSynthesis.speak() method to convert the text to speech. Make sure to carefully write the event listener for the 'Speak' button click event.