Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
Web Speech API позволяет взаимодействовать с голосовыми интерфейсами в ваших веб приложениях. Web Speech API состоит из двух частей: SpeechSynthesis (Текст-в-Речь), и SpeechRecognition (Асинхронное распознавание речи)
Web Speech API позволяет веб приложениям управлять голосовыми данными. Существует два компонента к этому API:
Для большей информации по использованию этих фич, смотрите Using the Web Speech API.
The controller interface for the recognition service; this also handles the SpeechRecognitionEvent sent from the recognition service.
SpeechRecognitionAlternativeПредставляет одно слово которое было распознано службой распознавания голоса.
SpeechRecognitionErrorПредставляет сообщения об ошибках из службы распознавания.
SpeechRecognitionEventThe event object for the result and nomatch events, and contains all the data associated with an interim or final speech recognition result.
SpeechGrammarСлова или шаблоны слов которые мы хотим чтобы служба распознавания распознала.
SpeechGrammarListПредставляет список объектов SpeechGrammar.
SpeechRecognitionResultПредставляет одно распознанное совпадение, которое может содержать несколько объектов SpeechRecognitionAlternative.
SpeechRecognitionResultListRepresents a list of SpeechRecognitionResult objects, or a single one if results are being captured in continuous mode.
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.
SpeechSynthesisErrorEventContains information about any errors that occur while processing SpeechSynthesisUtterance objects in the speech service.
SpeechSynthesisEventContains information about the current state of SpeechSynthesisUtterance objects that have been processed in the speech service.
SpeechSynthesisUtteranceRepresents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.)
SpeechSynthesisVoiceRepresents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI.
Window.speechSynthesisSpecced out as part of a [NoInterfaceObject] interface called SpeechSynthesisGetter, and Implemented by the Window object, the speechSynthesis property provides access to the SpeechSynthesis controller, and therefore the entry point to speech synthesis functionality.
Web Speech API репозиторий на GitHub содержит примеры, показывающие распознавание и синтез речи.
| Web Speech API |
Enable JavaScript to view this browser compatibility table.
Enable JavaScript to view this browser compatibility table.
This page was last modified on 17 дек. 2024 г. by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.