umma.dev

Voice Recognition in a React App

A very basic overview of Web Speech API, along with an example.

Web Speech API

This API allows you to incorporate voice data into applications. It can be used in two ways.

Text to Speech (SpeechSynthesis)

Allows application to read out the text through device output like speakers. Voice types can be changed through SpeechSynthesisVoice objects.

Asynchronous Speech Recognition (SpeechRecognition)

Recognise voice from an audio input such as device input. The SpeechGrammar interface is used for grammar the app should be able to recognise.

To read more about grammar click here.

Integration into a React App