Web Speech API
Web Speech API
The Web Speech API aims to enable web developers to provide, in a web
browser, speech-input and text-to-speech output features that are typically not
available when using standard speech-recognition or screen-reader software.
The API itself is agnostic of the underlying speech recognition and synthesis
implementation and can support both server-based and
client-based/embedded recognition and synthesis. The API is designed to
enable both brief (one-shot) speech input and continuous speech input.
Speech recognition results are provided to the web page as a list of
hypotheses, along with other relevant information for each hypothesis.
Speech recognition
SpeechGrammar
SpeechRecognitionAlternative
Instance properties
SpeechRecognitionAlternative.transcript Read only
SpeechRecognitionErrorEvent
The SpeechRecognitionErrorEvent interface of the Web Speech
API represents error messages from the recognition service.
SpeechSynthesisVoice
Instance properties
SpeechSynthesisVoice.default Read only
SpeechSynthesis
EventTargetSpeechSynthesis
Instance properties
SpeechSynthesis.cancel()
SpeechSynthesis.getVoices()
SpeechSynthesis.pause()
SpeechSynthesis.resume()
SpeechSynthesis.speak()
Events
For more details on using these features, see Using the Web Speech
API.
Web Speech API Interfaces
Speech recognition
SpeechRecognition
SpeechRecognitionAlternative
SpeechRecognitionErrorEvent
SpeechRecognitionEvent
The event object for the result and nomatch events, and contains
all the data associated with an interim or final speech recognition
result.
SpeechGrammar
SpeechGrammarList
SpeechRecognitionResult
Speech synthesis
SpeechSynthesis
The controller interface for the speech service; this can be used to
retrieve information about the synthesis voices available on the
device, start and pause speech, and other commands besides.
SpeechSynthesisErrorEvent
SpeechSynthesisEvent
SpeechSynthesisUtterance
SpeechSynthesisVoice