AudioTranscriptionPrefill class final
Incrementally feeds one recording's projected rows into the ASR backbone.
Start before accepting audio, call addProjected for each nonempty encoder output, then finish once to append the assistant prefix and compute logits. No recording or projected-row history is stored here. The caller owns the model and encoder and must use the model exclusively during this operation. This is input streaming; generated text starts after the recording finishes.
Properties
- audioTokens → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFinished → bool
-
no setter
- promptTokens → int
-
no setter
- reservedTokens → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stopTokenIds
→ Set<
int> -
no setter
Methods
-
addProjected(
Float32List rows) → Future< void> - Invalid rows/context overflow are rejected before model state changes. Calls are serialized; concurrent calls fail instead of mixing recordings. Any forward-pass failure terminates this prefill; start a new one to retry.
-
close(
) → void - Stops this input operation without closing the caller-owned language model. An already running forward pass may complete; await it before model reuse.
-
finish(
) → Future< void> - Appends the user-turn end and assistant prefix without replaying audio. Afterwards model.logits is ready for text-mode greedy generation.
-
greedyToken(
Float32List logits) → int -
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
Static Methods
-
start(
{required Lfm3Model model, required Lfm3Tokenizer tokenizer, String? language, int reservedTokens = 128, Lfm3SpeechVariant variant = Lfm3SpeechVariant.audio}) → Future< AudioTranscriptionPrefill>