In this article, we’d be looking at the power of SpeechSynthesis (Text-to-Speech and how to make use of it. The Web Speech API has two parts: SpeechSynthesis (Text-to-Speech), and SpeechRecognition (Asynchronous Speech Recognition.) Web Speech APIĪccording to MDN, the Web Speech API is a web api that enables you to incorporate voice data into web apps. With these APIs, we can build applications that make use of native features such as Notifications, Vibrations, etc. They are able to expose data from the browser and surrounding computer environment which helps developers to perform complex operations. What are Web/Browser APIs?īrowser APIs (or web APIs) are the APIs that are built into the browsers. Our primary focus in this article is the Web Speech API which belongs to the Web/Browser API while other APIs will be extensively discussed in a different article. Web APIs often use machine-based interactions such as REST and SOAP. The different types of APIs are Open APIs, Internal APIs, Partner APIs, Composite APIs, RESTFUL, JSON-RPC, XML-RPC, and SOAP. It can also provide extension mechanisms so that users can extend existing functionalities in various ways. It defines the kinds of requests that can be made, how to make them, the data formats that should be used, conventions to follow, etc. In this article, I’d discuss what a Web API is, and how to use SpeechSynthesis API, to convert Texts to speech in different voices.Īccording to Wikipedia’s Definition of API: API(Application Programming Interface) is an interface that defines interactions between multiple Software applications. I have felt so too! This is the major reason I decided to write this piece to help Web Developers build something very simple to solve this huge problem.
If you’ve ever felt bored/tired of reading an Article or felt like you needed someone to help you read aloud the content of a magazine, then you are not alone.
How to Create a Simple Text-to-Speech Application