From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/ru/web/api/web_speech_api/index.html | 176 +++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 files/ru/web/api/web_speech_api/index.html (limited to 'files/ru/web/api/web_speech_api/index.html') diff --git a/files/ru/web/api/web_speech_api/index.html b/files/ru/web/api/web_speech_api/index.html new file mode 100644 index 0000000000..3398c86aad --- /dev/null +++ b/files/ru/web/api/web_speech_api/index.html @@ -0,0 +1,176 @@ +--- +title: Web Speech API +slug: Web/API/Web_Speech_API +translation_of: Web/API/Web_Speech_API +--- +
{{DefaultAPISidebar("Web Speech API")}}{{seecompattable}}
+ +
+

Web Speech API позволяет взаимодействовать с голосовыми интерфейсами в ваших веб приложениях. Web Speech API состоит из двух частей: SpeechSynthesis (Текст-в-Речь), и SpeechRecognition (Асинхронное распознавание речи)

+
+ +

Концепции и использование Web Speech

+ +

Web Speech API позволяет веб приложениям управлять голосовыми данными. Существует два компонента к этому API:

+ + + +

Для большей информации по использованию этих фич, смотрите Using the Web Speech API.

+ +

Интерфейсы Web Speech API

+ +

Распознавание речи

+ +
+
{{domxref("SpeechRecognition")}}
+
The controller interface for the recognition service; this also handles the {{domxref("SpeechRecognitionEvent")}} sent from the recognition service.
+
{{domxref("SpeechRecognitionAlternative")}}
+
Представляет одно слово которое было распознано службой распознавания голоса.
+
{{domxref("SpeechRecognitionError")}}
+
Представляет сообщения об ошибках из службы распознавания.
+
{{domxref("SpeechRecognitionEvent")}}
+
The event object for the {{event("result")}} and {{event("nomatch")}} events, and contains all the data associated with an interim or final speech recognition result.
+
{{domxref("SpeechGrammar")}}
+
Слова или шаблоны слов которые мы хотим чтобы служба распознавания распознала.
+
{{domxref("SpeechGrammarList")}}
+
Представляет список объектов {{domxref("SpeechGrammar")}}.
+
{{domxref("SpeechRecognitionResult")}}
+
Представляет одно распознанное совпадение, которое может содержать несколько объектов {{domxref("SpeechRecognitionAlternative")}}.
+
{{domxref("SpeechRecognitionResultList")}}
+
Represents a list of {{domxref("SpeechRecognitionResult")}} objects, or a single one if results are being captured in {{domxref("SpeechRecognition.continuous","continuous")}} mode.
+
+ +

Синтезирование речи

+ +
+
{{domxref("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.
+
{{domxref("SpeechSynthesisErrorEvent")}}
+
Contains information about any errors that occur while processing {{domxref("SpeechSynthesisUtterance")}} objects in the speech service.
+
{{domxref("SpeechSynthesisEvent")}}
+
Contains information about the current state of {{domxref("SpeechSynthesisUtterance")}} objects that have been processed in the speech service.
+
{{domxref("SpeechSynthesisUtterance")}}
+
Represents 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.)
+
+ +
+
{{domxref("SpeechSynthesisVoice")}}
+
Represents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI.
+
{{domxref("Window.speechSynthesis")}}
+
Specced out as part of a [NoInterfaceObject] interface called SpeechSynthesisGetter, and Implemented by the Window object, the speechSynthesis property provides access to the {{domxref("SpeechSynthesis")}} controller, and therefore the entry point to speech synthesis functionality.
+
+ +

Примеры

+ +

Web Speech API репозиторий на GitHub содержит примеры, показывающие распознавание и синтез речи.

+ +

Спецификации

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('Web Speech API')}}{{Spec2('Web Speech API')}}Initial definition
+ +

Browser compatibility

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(33)}}[1]{{CompatVersionUnknown}}{{CompatGeckoDesktop(49)}}[2]{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChromeEdgeFirefox Mobile (Gecko)Firefox OSIE PhoneOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}[1]{{CompatVersionUnknown}}{{CompatUnknown}}2.5{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ + + +

Firefox OS permissions

+ +

To use speech recognition in an app, you need to specify the following permissions in your manifest:

+ +
"permissions": {
+  "audio-capture" : {
+    "description" : "Audio capture"
+  },
+  "speech-recognition" : {
+    "description" : "Speech recognition"
+  }
+}
+ +

You also need a privileged app, so you need to include this as well:

+ +
  "type": "privileged"
+ +

Speech synthesis needs no permissions to be set.

+ +

Смотрите также

+ + -- cgit v1.2.3-54-g00ecf