AudioConversationSession class final
A bounded, transactional conversation on caller-owned language/generation models. Input is projected encoder rows. Completed turns retain exact audio input/output embeddings; no waveform or microphone recording is retained. Begin reuses matching language state and replays slots when necessary, so other operations may use the backbone between turns. Use the backbone exclusively throughout begin/add/finish.
Constructors
- AudioConversationSession(Lfm3Model model, Lfm3Tokenizer tokenizer, Lfm3AudioGenerator generator)
Properties
- generator → Lfm3AudioGenerator
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- historyTokens → int
-
no setter
- model → Lfm3Model
-
final
- retainedEmbeddingBytes → int
-
no setter
- reusedTokens → int
-
The prompt slots reused by the last successful begin.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokenizer → Lfm3Tokenizer
-
final
- turns → int
-
no setter
Methods
-
acceptReply(
) → void - A deferred reply enters history only after its receiver accepts it. Cancelling an unaccepted reply preserves the previously completed turns.
-
addProjected(
Float32List rows) → Future< void> -
begin(
{int maxNewSlots = 768, int maxFrames = 375}) → Future< void> -
cancel(
) → void -
clear(
) → void -
close(
) → void -
finish(
{int seed = 0, bool deferCommit = false, void onText(String text)?, void onAudio(Float32List pcm)?, void onSlot(int token, List< int> ? codes)?}) → Future<AudioConversationReply> - Native interleaved decoding, matching the upstream six/twelve schedule. Only a complete, nonempty text+speech reply commits history. Cancellation, callback failure, context limits or output limits discard the current turn.
-
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