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
<dd>When the start method is called it represents the moment in time the web application wishes to begin recognition.
281
-
When the speech input is streaming live through the input media stream, then this start call represents the moment in time that the service must begin to listen.
282
-
Once the system is successfully listening to the recognition the user agent must raise a start event.
283
-
If the start method is called on an already started object (that is, start has previously been called, and no <a event for=SpeechRecognition>error</a> or <a event for=SpeechRecognition>end</a> event has fired on the object), the user agent must throw an "{{InvalidStateError!!exception}}" {{DOMException}} and ignore the call.</dd>
288
+
<dd>
289
+
1. Let <var>requestMicrophonePermission</var>to <code>true</code>.
290
+
1. Run the <a>start session algorithm</a> with <var>requestMicrophonePermission</var>.
<dd>The overloaded start method does the same thing as the parameterless start method except it performs speech recognition on provided {{MediaStreamTrack}} instead of the input media stream.
287
-
If the {{MediaStreamTrack/kind}} attribute of the {{MediaStreamTrack}} is not "audio" or the {{MediaStreamTrack/readyState}} attribute is not "live", the user agent must throw an "{{InvalidStateError!!exception}}" {{DOMException}} and ignore the call.
288
-
Unlike the parameterless start method, the user agent does not check whether [=this=]'s [=relevant global object=]'s [=associated Document=] is [=allowed to use=] the [=policy-controlled feature=] named "<code>microphone</code>".</dd>
294
+
<dd>
295
+
1. Let <var>audioTrack</var> be the first argument.
296
+
1. If <var>audioTrack</var>'s {{MediaStreamTrack/kind}} attribute is NOT <code>"audio"</code>, throw an {{InvalidStateError}} and abort these steps.
297
+
1. If <var>audioTrack</var>'s {{MediaStreamTrack/readyState}} attribute is NOT <code>"live"</code>, throw an {{InvalidStateError}} and abort these steps.
298
+
1. Let <var>requestMicrophonePermission</var> be <code>false</code>.
299
+
1. Run the <a>start session algorithm</a> with <var>requestMicrophonePermission</var>.
<dd>The stop method represents an instruction to the recognition service to stop listening to more audio, and to try and return a result using just the audio that it has already received for this recognition.
@@ -309,6 +321,16 @@ See <a href="https://lists.w3.org/Archives/Public/public-speech-api/2012Sep/0072
309
321
310
322
</dl>
311
323
324
+
<p>When the <dfn>start session algorithm</dfn> with <var>requestMicrophonePermission</var> is invoked, the user agent MUST run the following steps:
325
+
326
+
1. If the [=current settings object=]'s [=relevant global object=]'s [=associated Document=] is NOT [=fully active=], throw an {{InvalidStateError}} and abort these steps.
327
+
1. If {{[[started]]}} is <code>true</code> and no <a event for=SpeechRecognition>error</a> or <a event for=SpeechRecognition>end</a> event has fired, throw an {{InvalidStateError}} and abort these steps.
328
+
1. Set {{[[started]]}} to <code>true</code>.
329
+
1. If <var>requestMicrophonePermission</var> is <code>true</code> and [=request permission to use=] "<code>microphone</code>" is [=permission/"denied"=], abort these steps.
330
+
1. Once the system is successfully listening to the recognition, [=fire an event=] named <a event for=SpeechRecognition>start</a> at [=this=].
0 commit comments