+ Start a Discussion
dellseysdellseys 

help with text to speech functionality or 508 compliance in visual force page

I have a visual force page that I would like to implement the functionality below.
A text to speech functionality. How can I go about this on my external site in visualforcepage?
https://www.w3.org/WAI/perspective-videos/speech/
https://www.webdevelopmentgroup.com/2017/09/508-compliance-making-websites-accessible-for-people-with-disabilities/
NagendraNagendra (Salesforce Developers) 
Hi Stephen,


You can use google text to speech API.

https://cloud.google.com/text-to-speech/docs/basics

Logic is very simple, take the text from your VF Page and pass that text to JSON input.
'input':{     'text':'I\'ve added the event to your calendar.'   },
Also, You can use the SpeechSynthesisUtterance https://developer.mozilla.org/en-US/docs/Web/API/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 are also libraries like meSpeak https://www.masswerk.at/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.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra