SpeechRecognitionResult class

A sequence of recognized words from the speech recognition service.

Depending on the platform behaviour the words may come in all at once at the end or as partial results as each word is recognized. Use the finalResult flag to determine if the result is considered final by the platform.

Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

SpeechRecognitionResult(List<SpeechRecognitionWords> alternates, bool finalResult)
SpeechRecognitionResult.fromJson(Map<String, dynamic> json)
factory

Properties

alternates List<SpeechRecognitionWords>
getter/setter pair
confidence double
The confidence that the recognizedWords are correct.
no setter
finalResult bool
False means the words are an interim result, true means they are the final recognition.
final
hasConfidenceRating bool
true if confidence is not the SpeechRecognitionWords.missingConfidence value, false otherwise.
no setter
hashCode int
The hash code for this object.
no setteroverride
recognizedWords String
Returns a list of possible transcriptions of the speech.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isConfident({double threshold = SpeechRecognitionWords.confidenceThreshold}) bool
true if there is confidence in this recognition, false otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFinal() SpeechRecognitionResult
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override