Lfm3AudioEncoder class final

Synchronous lab implementation for complete clips or streaming input.

Q4 weights retain their published blocks. Convolutions and norms stay F32. Matmul uses float inputs by default to isolate weight quantization from activation quantization. Run in a worker isolate for interactive apps. startStream keeps bounded per-stream context. Audio generation is separate.

Constructors

Lfm3AudioEncoder.load(String mmproj, {bool int8Inputs = false, bool nativeDownsampling = true})
Set nativeDownsampling to false to compare with the Dart audio stem.
factory

Properties

config → Lfm3AudioEncoderConfig
final
hashCode → int
The hash code for this object.
no setterinherited
int8Inputs → bool
final
nativeDownsampling → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
encode(AudioFeatures features, {void capture(String stage, Float32List rows)?}) → Float32List
Owned features.encoderTokens, config.projectionSize projected rows. capture receives owned copies of intermediate rows for parity checks.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startStream() → Lfm3AudioEncoderStream
Independent causal state sharing this encoder's weights. The downsampler needs seven future feature frames; only Lfm3AudioEncoderStream.finish pads the tail. Closing this encoder also closes every active stream.
toString() → String
A string representation of this object.
inherited
useGpu() → bool
Copies quantized matrices to the GPU for their linear products. Returns false where the GPU is unavailable or int8Inputs is enabled. Call before starting streams and serialize GPU work across isolates (see GpuLinear). Convolutions, norms and attention stay on the CPU.

Operators

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