Thursday, December 25, 2025

JavaScript SpeechSynthesis API


As the online continues to be the medium for all customers, requirements our bodies must 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 possibly can 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. Assist for this API is on the market in all trendy browsers.

I would not think about speechSynthesis as a substitute for native accessibility instruments, however this API could possibly be used to enhance what native instruments present!

  • Dynamically Create Charts Using MooTools MilkChart and Google Analytics
  • MooTools Image Preloading with Progress Bar

    The thought of picture preloading has been round for the reason that daybreak of the web. After we did not have all the flowery stuff we use now, we had been compelled to make use of ugly mouseover photos to point out dynamism. I do not assume you had been declared an official…


Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles