0

I am in need to convert the text contained in a textbox to be converted to a speech which should be played on the click of a button. Right now, I do not have any clue about how to achieve the same. Can anyone please help? I tried to get the Google API for the same, but the links were not helpful.

3

You can use the SpeechSynthesisUtterance from the Web APIs. Note that this is not supported in Internet Explorer, so if your users don't use Firefox, Safari, or Chrome, they won't get to hear the voices. There's also libraries like meSpeak which should also add support for Internet Explorer users, if that's important, but personally, I find the Web API voices to be less annoying.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.