Thursday, November 20, 2025
HomeProgrammingJavaScript SpeechSynthesis API

JavaScript SpeechSynthesis API


As the online continues to be the medium for all customers, requirements our bodies have to proceed to supply new APIs to complement consumer expertise and accessibility. One underused API for unsighted customers is speechSynthesis, an API to programmatically direct the browser to audibly converse any arbitrary string.

The Code

You may direct the browser to utter speech with window.speechSynthesis and SpeechSynthesisUtterance:

window.speechSynthesis.converse(
    new SpeechSynthesisUtterance('Hey Jude!')
)

speechSynthesis.converse will robotically inform the consumer something you present as a SpeechSynthesisUtterance string. Help for this API is on the market in all trendy browsers.

I would not take into account speechSynthesis as a alternative for native accessibility instruments, however this API may very well be used to enhance what native instruments present!

  • Vibration API

    Most of the new APIs supplied to us by browser distributors are extra focused towards the cellular consumer than the desktop consumer.  A type of easy APIs the Vibration API.  The Vibration API permits builders to direct the machine, utilizing JavaScript, to vibrate in…

  • Facebook Open Graph META Tags

    It is no secret that Fb has grow to be a significant visitors driver for every type of internet sites.  These days even massive firms steer customers towards their Fb pages as an alternative of the company web sites instantly.  And naturally there are Fb “Like” and “Suggest” widgets on each web site.  One…


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments