Speech​Recognition​Result Speech​Recognition​Result Speech​Recognition​Result Class

Definition

The result of a speech recognition session.

public : sealed class SpeechRecognitionResult : ISpeechRecognitionResult, ISpeechRecognitionResult2public sealed class SpeechRecognitionResult : ISpeechRecognitionResult, ISpeechRecognitionResult2Public NotInheritable Class SpeechRecognitionResult Implements ISpeechRecognitionResult, ISpeechRecognitionResult2
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Call the SpeechRecognizer.RecognizeAsync or the SpeechRecognizer.RecognizeWithUIAsync method to obtain an instance of this class.

Properties

Confidence Confidence Confidence

Gets a value that indicates the confidence of the speech recognizer in the recognition result.

public : SpeechRecognitionConfidence Confidence { get; }public SpeechRecognitionConfidence Confidence { get; }Public ReadOnly Property Confidence As SpeechRecognitionConfidence
Value
SpeechRecognitionConfidence SpeechRecognitionConfidence SpeechRecognitionConfidence

The confidence level of the recognition result.

Attributes

Remarks

Call GetAlternates for the full collection of recognition alternatives, ordered by confidence from most likely to least likely. The first item in the collection is the recognition result indicated by the parent object.

See Also

Constraint Constraint Constraint

Gets the constraint used for the recognition result.

public : ISpeechRecognitionConstraint Constraint { get; }public ISpeechRecognitionConstraint Constraint { get; }Public ReadOnly Property Constraint As ISpeechRecognitionConstraint
Value
ISpeechRecognitionConstraint ISpeechRecognitionConstraint ISpeechRecognitionConstraint

The constraint used for the recognition result. Null for remote recognition using predefined grammars (SpeechRecognitionTopicConstraint ).

Attributes

Remarks

CompileConstraintsAsync must be called before RecognizeAsync or RecognizeWithUIAsync, even if no constraints are specified in the Constraints property.

See Also

PhraseDuration PhraseDuration PhraseDuration

Gets the amount of time required for the utterance.

public : TimeSpan PhraseDuration { get; }public TimeSpan PhraseDuration { get; }Public ReadOnly Property PhraseDuration As TimeSpan
Value
TimeSpan TimeSpan TimeSpan

The duration of the utterance.

Attributes
See Also

PhraseStartTime PhraseStartTime PhraseStartTime

Gets the start time of the utterance.

public : DateTime PhraseStartTime { get; }public DateTimeOffset PhraseStartTime { get; }Public ReadOnly Property PhraseStartTime As DateTimeOffset
Value
DateTime DateTimeOffset DateTimeOffset

The start time of the utterance.

Attributes
See Also

RawConfidence RawConfidence RawConfidence

Gets a value that indicates the relative confidence of the SpeechRecognitionResult when compared with a collection of alternatives returned with the recognition result.

public : double RawConfidence { get; }public double RawConfidence { get; }Public ReadOnly Property RawConfidence As double
Value
double double double

The confidence level of the result.

Attributes

Remarks

RawConfidence does not indicate the likelihood that a phrase was correctly recognized. Instead it provides a way to compare the relative accuracy of alternatives returned with the recognition result. For example, a RawConfidence score of 0.8 does not mean that a result is 80% likely to be correct; it means the phrase is more likely than an alternative with a RawConfidence of 0.7.

Do not use RawConfidence to determine whether a result should be discarded. RawConfidence values are unique to each recognition engine and can vary between sessions or devices. Instead, check the Confidence property, which indicates a SpeechRecognitionConfidence of High, Medium, Low or Rejected.

See Also

RulePath RulePath RulePath

Gets the hierarchy of rule elements that were triggered to return the recognized phrase.

public : IVectorView<string> RulePath { get; }public IReadOnlyList<string> RulePath { get; }Public ReadOnly Property RulePath As IReadOnlyList<string>
Value
IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string>

An array that represents the hierarchy of rule elements that were triggered to return the recognized phrase. Each value in the array contains the value of the id attribute for a rule element. The order of values in the array corresponds to the order that the rules were triggered.

Attributes
See Also

SemanticInterpretation SemanticInterpretation SemanticInterpretation

Gets an interpretation object containing the semantic properties of a recognized phrase in a Speech Recognition Grammar Specification (SRGS) grammar.

public : SpeechRecognitionSemanticInterpretation SemanticInterpretation { get; }public SpeechRecognitionSemanticInterpretation SemanticInterpretation { get; }Public ReadOnly Property SemanticInterpretation As SpeechRecognitionSemanticInterpretation
Value
SpeechRecognitionSemanticInterpretation SpeechRecognitionSemanticInterpretation SpeechRecognitionSemanticInterpretation

An interpretation object containing the semantic properties of a recognized phrase in a Speech Recognition Grammar Specification (SRGS) grammar.

Attributes
See Also

Status Status Status

Gets the result state (SpeechRecognitionResultStatus ) of a speech recognition session.

public : SpeechRecognitionResultStatus Status { get; }public SpeechRecognitionResultStatus Status { get; }Public ReadOnly Property Status As SpeechRecognitionResultStatus
Attributes
See Also

Text Text Text

Gets the recognized phrase of the speech recognition session.

public : PlatForm::String Text { get; }public string Text { get; }Public ReadOnly Property Text As string
Value
PlatForm::String string string

The recognized phrase of the speech recognition session.

Attributes
See Also

Methods

GetAlternates(UInt32) GetAlternates(UInt32) GetAlternates(UInt32)

Gets a collection of recognition result alternatives, ordered by RawConfidence from most likely to least likely. The first item in the collection is the recognition result indicated by the parent object.

public : IVectorView<SpeechRecognitionResult> GetAlternates(unsigned int maxAlternates)public IReadOnlyList<SpeechRecognitionResult> GetAlternates(UInt32 maxAlternates)Public Function GetAlternates(maxAlternates As UInt32) As IReadOnlyList( Of SpeechRecognitionResult )
Parameters
maxAlternates
unsigned int UInt32 UInt32

The maximum number of speech recognition results to return in the collection.

Returns
IVectorView<SpeechRecognitionResult> IReadOnlyList<SpeechRecognitionResult> IReadOnlyList<SpeechRecognitionResult>

A collection of speech recognition results, ordered by confidence from most likely to least likely.

Attributes
See Also

See Also