LiveTranscriptionResult class
A Results message: an interim or final transcription for one channel.
Constructors
-
LiveTranscriptionResult({List<
SttAlternative> alternatives = const <SttAlternative>[], List<int> channelIndex = const <int>[], double duration = 0, double start = 0, bool isFinal = false, bool speechFinal = false, bool fromFinalize = false, required SttMetadata metadata, List<SttEntity> entities = const <SttEntity>[], bool recovered = false, DateTime? recoveredAtUtc}) - Creates a transcription result.
-
LiveTranscriptionResult.fromJson(Map<
String, dynamic> json) -
Parses a
Resultsmessage.factory
Properties
-
alternatives
→ List<
SttAlternative> -
Alternatives for the channel this result belongs to, best first.
final
-
channelIndex
→ List<
int> -
[channel, stream]indices this result belongs to.final - duration → double
-
Duration of the covered audio span, in seconds.
final
-
entities
→ List<
SttEntity> -
Entities detected when
detect_entitiesis enabled. Only present in final results.final - fromFinalize → bool
-
Whether this result was flushed by a
Finalizemessage.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isFinal → bool
-
Whether this result is final (it will not be revised again).
final
- metadata → SttMetadata
-
Request metadata.
final
- recovered → bool
-
Whether this result was recovered through gap recovery rather than
received over the live socket.
final
- recoveredAtUtc → DateTime?
-
UTC instant the connection was lost, anchoring a recovered result to
its true position in the timeline.
nullfor live results.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speechFinal → bool
-
Whether speech ended with this result (endpointing).
final
- start → double
-
Start of the covered audio span, in seconds.
final
- transcript → String
-
The transcript of the first alternative (empty string when none).
no setter
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