TtsEvent class

Constructors

TtsEvent({required EventType type, int? charIndex, String? errorMessage, double? srcId, bool? isFinalEvent, int? length})
TtsEvent.fromJS(TtsEvent _wrapped)

Properties

charIndex int?
The index of the current character in the utterance. For word events, the event fires at the end of one word and before the beginning of the next. The charIndex represents a point in the text at the beginning of the next word to be spoken.
getter/setter pair
errorMessage String?
The error description, if the event type is error.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isFinalEvent bool?
True if this is the final event that will be sent to this handler.
getter/setter pair
length int?
The length of the next part of the utterance. For example, in a word event, this is the length of the word which will be spoken next. It will be set to -1 if not set by the speech engine.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
srcId double?
An ID unique to the calling function's context so that events can get routed back to the correct tts.speak call.
getter/setter pair
toJS → TtsEvent
no setter
type EventType
The type can be start as soon as speech has started, word when a word boundary is reached, sentence when a sentence boundary is reached, marker when an SSML mark element is reached, end when the end of the utterance is reached, interrupted when the utterance is stopped or interrupted before reaching the end, cancelled when it's removed from the queue before ever being synthesized, or error when any other error occurs. When pausing speech, a pause event is fired if a particular utterance is paused in the middle, and resume if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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