Text to Speech with SpeechSynthesis API

Easy
37
1
52.6% Acceptance

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.

In your JavaScript code, you will use the 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.