You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove SpeechRecognitionContext and add SpeechRecognitionPhraseList to SpeechRecognition directly
Remove updateContext and always update phrases instead
Rename context-not-supported error code to phrases-not-supported
Add removeItem to SpeechRecognitionPhraseList
<dd>This attribute will set the language of the recognition for the request, using a valid BCP 47 language tag. [[!BCP47]]
285
277
If unset it remains unset for getting in script, but will default to use the <a spec=html>language</a> of the html document root element and associated hierarchy.
This attribute represents a list of phrases for contextual biasing.
303
+
The setter steps are:
304
+
1. If the {{SpeechRecognitionPhraseList/length}} of the given value is greater than 0 and the system does not support contextual biasing,
305
+
throw a {{SpeechRecognitionErrorEvent}} with the {{phrases-not-supported}} error code and abort these steps.
306
+
1. Set phrases to the given value.
307
+
</dd>
310
308
</dl>
311
309
312
310
<p class=issue>The group has discussed whether WebRTC might be used to specify selection of audio sources and remote recognizers.
@@ -352,17 +350,6 @@ See <a href="https://lists.w3.org/Archives/Public/public-speech-api/2012Sep/0072
352
350
The user agent must raise an <a event for=SpeechRecognition>end</a> event once the speech service is no longer connected.
353
351
If the abort method is called on an object which is already stopped or aborting (that is, start was never called on it, the <a event for=SpeechRecognition>end</a> or <a event for=SpeechRecognition>error</a> event has fired on it, or abort was previously called on it), the user agent must ignore the call.</dd>
The updateContext method updates the speech recognition context after the speech recognition session has started.
358
-
If the session has not started yet, user should update {{SpeechRecognition/context}} instead of using this method.
359
-
360
-
When invoked, run the following steps:
361
-
1. If {{[[started]]}} is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
362
-
1. If the system does not support speech recognition context, throw a {{SpeechRecognitionErrorEvent}} with the {{context-not-supported}} error code and abort these steps.
363
-
1. The system updates its speech recognition context to be |context|.
<dd>The availableOnDevice method returns a Promise that resolves to a boolean indicating whether on-device speech recognition is available for a given BCP 47 language tag. [[!BCP47]]</dd>
368
355
@@ -384,9 +371,10 @@ following steps:
384
371
1. If |requestMicrophonePermission| is `true` and [=request
385
372
permission to use=] "`microphone`" is [=permission/"denied"=], abort
386
373
these steps.
387
-
1. If {{SpeechRecognition/context}} is not null and the system does not support
388
-
speech recognition context, throw a {{SpeechRecognitionErrorEvent}} with the
389
-
{{context-not-supported}} error code and abort these steps.
374
+
1. If the {{SpeechRecognitionPhraseList/length}} of {{SpeechRecognition/phrases}}
375
+
is greater than 0 and the system does not support contextual biasing, throw a
376
+
{{SpeechRecognitionErrorEvent}} with the {{phrases-not-supported}} error code
377
+
and abort these steps.
390
378
1. Once the system is successfully listening to the recognition, queue a task to
391
379
[=fire an event=] named <a event for=SpeechRecognition>start</a> at [=this=].
392
380
@@ -481,8 +469,8 @@ For example, some implementations may fire <a event for=SpeechRecognition>audioe
<dd>This attribute is approximately the natural log of the number of times more likely the website thinks this phrase is than what the speech recognition model knows.
583
-
A valid boost must be a float value inside the range [0.0, 10.0], with a default value of 1.0 if not specified.
584
-
A boost of 0.0 means the phrase is not boosted at all, and a higher boost means the phrase is more likely to appear.
585
-
A boost of 10.0 means the phrase is extremely likely to appear and should be rarely set.
586
-
</dd>
588
+
<dd>This attribute returns the value of {{[[boost]]}}.</dd>
0 commit comments