SpeechRecognitionResult
SpeechRecognitionResult
SpeechRecognitionResult
SpeechRecognitionResult
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// You can use this class in JavaScript.
- Attributes
| 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 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// You can use this property in JavaScript.
- Value
- SpeechRecognitionConfidence SpeechRecognitionConfidence SpeechRecognitionConfidence SpeechRecognitionConfidence
The confidence level of the recognition result.
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 Constraint
Gets the constraint used for the recognition result.
public : ISpeechRecognitionConstraint Constraint { get; }public ISpeechRecognitionConstraint Constraint { get; }Public ReadOnly Property Constraint As ISpeechRecognitionConstraint// You can use this property in JavaScript.
- Value
- ISpeechRecognitionConstraint ISpeechRecognitionConstraint ISpeechRecognitionConstraint ISpeechRecognitionConstraint
The constraint used for the recognition result. Null for remote recognition using predefined grammars (SpeechRecognitionTopicConstraint ).
Remarks
CompileConstraintsAsync must be called before RecognizeAsync or RecognizeWithUIAsync, even if no constraints are specified in the Constraints property.
- See Also
PhraseDuration 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// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The duration of the utterance.
- See Also
PhraseStartTime PhraseStartTime PhraseStartTime PhraseStartTime
Gets the start time of the utterance.
public : DateTime PhraseStartTime { get; }public DateTimeOffset PhraseStartTime { get; }Public ReadOnly Property PhraseStartTime As DateTimeOffset// You can use this property in JavaScript.
- Value
- DateTime DateTimeOffset DateTimeOffset DateTimeOffset
The start time of the utterance.
- See Also
RawConfidence 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// You can use this property in JavaScript.
- Value
- double double double double
The confidence level of the result.
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 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>// You can use this property in JavaScript.
- Value
- IVectorView<PlatForm::String> IReadOnlyList<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.
- See Also
SemanticInterpretation 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// You can use this property in JavaScript.
- Value
- SpeechRecognitionSemanticInterpretation SpeechRecognitionSemanticInterpretation SpeechRecognitionSemanticInterpretation SpeechRecognitionSemanticInterpretation
An interpretation object containing the semantic properties of a recognized phrase in a Speech Recognition Grammar Specification (SRGS) grammar.
- See Also
Status 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// You can use this property in JavaScript.
- Value
- SpeechRecognitionResultStatus SpeechRecognitionResultStatus SpeechRecognitionResultStatus SpeechRecognitionResultStatus
The status of the result.
- See Also
Text 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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The recognized phrase of the speech recognition session.
- See Also
Methods
GetAlternates(UInt32) 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 )// You can use this method in JavaScript.
- maxAlternates
- unsigned int UInt32 UInt32 UInt32
The maximum number of speech recognition results to return in the collection.
A collection of speech recognition results, ordered by confidence from most likely to least likely.
- See Also