LiteRtLmAsrRuntimeConfig class

Configuration for a dedicated LiteRT-LM ASR session.

Constructors

LiteRtLmAsrRuntimeConfig({required String modelPath, required String tokenizerPath, required LiteRtLmAsrModelPreset modelPreset, LiteRtLmAsrBackend backend = LiteRtLmAsrBackend.cpu, int numberOfThreads = 4, Duration maxBufferedAudio = const Duration(seconds: 30), double overlapRatio = 0.4})
Creates a LiteRT-LM ASR runtime configuration from local file paths.
const
LiteRtLmAsrRuntimeConfig.source({required ModelSource model, required ModelSource tokenizer, required LiteRtLmAsrModelPreset modelPreset, LiteRtLmAsrBackend backend = LiteRtLmAsrBackend.cpu, int numberOfThreads = 4, Duration maxBufferedAudio = const Duration(seconds: 30), double overlapRatio = 0.4})
Creates a LiteRT-LM ASR runtime configuration for the model and tokenizer files.
const

Properties

backend → LiteRtLmAsrBackend
Requested accelerator.
final
hashCode → int
The hash code for this object.
no setterinherited
maxBufferedAudio → Duration
Maximum queued audio before native push backpressure is reported.
final
model → ModelSource?
The .tflite speech-recognition model: a local path, an HTTP(S) URL or a Hugging Face file.
final
modelPath → String
The model file that the runtime opens: the path given to the deprecated constructor, the path of a local model, or the URL of a remote one.
no setter
modelPreset → LiteRtLmAsrModelPreset
Model-family metadata preset.
final
numberOfThreads → int
Native CPU worker count. Must fit a positive signed 32-bit integer.
final
overlapRatio → double
Fraction of each inference window retained for transcript reconciliation.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenizer → ModelSource?
The tokenizer JSON matching model, from the same kinds of source.
final
tokenizerPath → String
The tokenizer file that the runtime opens, as modelPath describes.
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