SpeechContinuousRecognitionSession SpeechContinuousRecognitionSession SpeechContinuousRecognitionSession SpeechContinuousRecognitionSession Class

Definition

Manages speech input for free-form dictation, or an arbitrary sequence of words or phrases that are defined in a local grammar file constraint.

public : sealed class SpeechContinuousRecognitionSession : ISpeechContinuousRecognitionSessionpublic sealed class SpeechContinuousRecognitionSession : ISpeechContinuousRecognitionSessionPublic NotInheritable Class SpeechContinuousRecognitionSession Implements ISpeechContinuousRecognitionSession// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

An app retrieves this object through the SpeechRecognizer.ContinuousRecognitionSession property.

To use web-service constraints, speech input and dictation support must be enabled in Settings by turning on the "Get to know me" option in the Settings -> Privacy -> Speech, inking, and typing page. See "Recognize speech input" in Speech recognition.

Properties

AutoStopSilenceTimeout AutoStopSilenceTimeout AutoStopSilenceTimeout AutoStopSilenceTimeout

Gets or sets the time threshold at which the continuous recognition (dictation) session ends due to lack of audio input.

public : TimeSpan AutoStopSilenceTimeout { get; set; }public TimeSpan AutoStopSilenceTimeout { get; set; }Public ReadWrite Property AutoStopSilenceTimeout As TimeSpan// You can use this property in JavaScript.
Value
TimeSpan TimeSpan TimeSpan TimeSpan

The time threshold.

See Also

Methods

CancelAsync() CancelAsync() CancelAsync() CancelAsync()

Asynchronously cancel the continuous speech recognition (dictation) session and discard all pending recognition results.

public : IAsyncAction CancelAsync()public IAsyncAction CancelAsync()Public Function CancelAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

An asynchronous handler called when the operation is complete.

Remarks

A ResultGenerated event can occur after a call to CancelAsync if it exists on the stack when the call is made.

StopAsync passes pending results to the ResultGenerated event.

See Also

PauseAsync() PauseAsync() PauseAsync() PauseAsync()

Asynchronously pause a continuous speech recognition (dictation) session to update a local grammar file or list constraint.

public : IAsyncAction PauseAsync()public IAsyncAction PauseAsync()Public Function PauseAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

An asynchronous handler called when the operation is complete.

Remarks

An error is returned if SpeechRecognizerState is Idle or Paused.

If a SpeechRecognitionTopicConstraint is present in the list of constraints than PauseAsync fails with error code COR_E_INVALIDOPERATION.

See Also

Resume() Resume() Resume() Resume()

Resumes a continuous speech recognition (dictation) session, if paused.

public : void Resume()public void Resume()Public Function Resume() As void// You can use this method in JavaScript.

Remarks

An error is returned if SpeechRecognizerState is not Paused.

If a SpeechRecognitionTopicConstraint is added after PauseAsync, Resume fails with error code COR_E_INVALIDOPERATION.

See Also

StartAsync() StartAsync() StartAsync() StartAsync()

Overload

Asynchronously begin a continuous speech recognition (dictation) session with a SpeechContinuousRecognitionMode of Default.

public : IAsyncAction StartAsync()public IAsyncAction StartAsync()Public Function StartAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

An asynchronous handler called when the operation is complete.

Remarks

CompileConstraintsAsync must always be called before StartAsync, even if no constraints are specified in the Constraints property.

See Also

StartAsync(SpeechContinuousRecognitionMode) StartAsync(SpeechContinuousRecognitionMode) StartAsync(SpeechContinuousRecognitionMode) StartAsync(SpeechContinuousRecognitionMode)

Overload

Asynchronously begin a continuous speech recognition (dictation) session with the specified SpeechContinuousRecognitionMode behavior.

public : IAsyncAction StartAsync(SpeechContinuousRecognitionMode mode)public IAsyncAction StartAsync(SpeechContinuousRecognitionMode mode)Public Function StartAsync(mode As SpeechContinuousRecognitionMode) As IAsyncAction// You can use this method in JavaScript.
Parameters
Returns

An asynchronous handler called when the operation is complete.

Remarks

CompileConstraintsAsync must always be called before StartAsync, even if no constraints are specified in the Constraints property.

See Also

StopAsync() StopAsync() StopAsync() StopAsync()

Asynchronously end a continuous speech recognition (dictation) session and pass all pending recognition results to the ResultGenerated event.

public : IAsyncAction StopAsync()public IAsyncAction StopAsync()Public Function StopAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

An asynchronous handler called when the operation is complete.

Remarks

CancelAsync discards all pending results.

See Also

Events

Completed Completed Completed Completed

Occurs when a continuous recognition (dictation) session ends.

public : event TypedEventHandler Completed<SpeechContinuousRecognitionSession,  SpeechContinuousRecognitionCompletedEventArgs>public event TypedEventHandler Completed<SpeechContinuousRecognitionSession,  SpeechContinuousRecognitionCompletedEventArgs>Public Event Completed<SpeechContinuousRecognitionSession,  SpeechContinuousRecognitionCompletedEventArgs>// You can use this event in JavaScript.
See Also

ResultGenerated ResultGenerated ResultGenerated ResultGenerated

Occurs when the speech recognizer returns the result from a continuous recognition (dictation) session.

public : event TypedEventHandler ResultGenerated<SpeechContinuousRecognitionSession,  SpeechContinuousRecognitionResultGeneratedEventArgs>public event TypedEventHandler ResultGenerated<SpeechContinuousRecognitionSession,  SpeechContinuousRecognitionResultGeneratedEventArgs>Public Event ResultGenerated<SpeechContinuousRecognitionSession,  SpeechContinuousRecognitionResultGeneratedEventArgs>// You can use this event in JavaScript.
See Also

See Also