SpeechRecognitionWords class

A set of words recognized in a SpeechRecognitionResult.

Each result will have one or more SpeechRecognitionWords with a varying degree of confidence about each set of words.

Annotations
  • @JsonSerializable()

Constructors

SpeechRecognitionWords(String recognizedWords, List<String>? recognizedPhrases, double confidence)
const
SpeechRecognitionWords.fromJson(Map<String, dynamic> json)
factory

Properties

confidence double
The confidence that the recognizedWords are correct.
final
hasConfidenceRating bool
true if confidence is not the missingConfidence value, false otherwise.
no setter
hashCode int
The hash code for this object.
no setteroverride
recognizedPhrases List<String>?
If the platform provides it, a list of phrases that were recognized as individual utterances. This can generally be ignored as it is usually null and where it is not recognizedWords will contain the same information aggregated into a single string. Currently this is only populated on iOS 17.5 and 18 where a bug in the speech recognizer causes unexpected extra phrases. These are automatically handled by the plugin and recognizedWords will be an aggregate of all the phrases. To customize the handling of these phrases, use the SpeechToText.unexpectedPhraseAggregator property to customize the aggregation.
final
recognizedWords String
The sequence of words recognized
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isConfident({double threshold = 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
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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

Constants

confidenceThreshold → const double
missingConfidence → const double