flutter_local_voice_agent library
On-device speech-to-text and text-to-speech with explicit model preparation.
Classes
- AgentCapabilities
- Capabilities of the initial native speech profile.
- AgentEvent
- A state or text notification from the native session.
- FileModelStore
- Compile-only web stand-in. It does not hash-check a compact pack.
- LocalModelBundle
- A local manifest and its containing model root.
- LocalModelStore
- Validates and installs local model manifests without network access.
- LocalVoiceAgent
- Owns one bounded, half-duplex local voice session.
- MethodChannelVoicePlatform
- Flutter method-channel native platform.
- ModelDownload
- A model file and its host-trusted HTTPS source.
- ModelFileEntry
- A checked file entry in a local model manifest.
- ModelPackDescriptor
- Immutable host-selected metadata for one complete model pack.
- ModelPreparation
- Handle for one independently cancellable preparation operation.
- ModelPreparationManager
- Compile-only web stand-in. Preparation stays a native and VM path.
- ModelPreparationProgress
- Immutable latest-state snapshot for one preparation operation.
- NativeVoicePlatform
- Boundary for the native method channel. No audio crosses this interface.
- ValidatedModelBundle
- Checked local assets accepted by LocalVoiceAgent.create.
- VoiceModelCatalog
- Pinned English Zipformer/Silero/LJS and compact VCTK speech choices.
- VoiceModelOption
- One verified speech-model configuration, not a general-purpose chat model.
- VoiceSessionBackend
- Internal session operations. The web backend owns devices itself.
- WebAssetReader
- Reads store-relative or asset-relative bytes. A null result means absent.
- WebAssetWriter
- Writes store-relative bytes into an origin-private store.
- WebModelStore
- Hash-checks a compact pack from bundled assets or an origin-private store.
Enums
- AgentErrorCode
- Stable failures returned by the local voice agent contract.
- AgentEventKind
- The type of notification emitted by an agent.
- AgentLifecycle
- The lifetime state of a LocalVoiceAgent.
- ConversationMode
- The only supported conversation mode in this release.
- ModelPreparationErrorCode
- Stable failure categories produced while preparing a model bundle.
- ModelPreparationPhase
- The current phase of one model preparation operation.
- TurnActivity
- The activity of the current turn.
Properties
- debugOverrideIsWeb ↔ bool?
-
Test-only host override. When true, create takes the web session path.
getter/setter pair
Functions
-
decodeObjectJson(
String source) → Map< String, Object?> - Converts decoded JSON into a manifest object map.
-
objectMap(
Object? value) → Map< String, Object?> - Converts an arbitrary JSON value into an object map.
-
registerWebModelStore(
WebAssetReader reader) → void - Assigns WebModelStore as the omitted web create default.
-
registerWebProfileDefaults(
{required WebAssetReader reader}) → void - Imports the production store so hosts can register both hooks together.
-
registerWebSessionBackend(
{WebAudioOwner? audio, WebInferenceEngine? inference}) → void - Assigns the production web session as the omitted create default.
Typedefs
-
LocalReplyLogic
= Future<
String> Function(String transcript) - Computes a reply from a finalized transcript.
- ModelPreparationHttpClientFactory = Object Function()
- Unused on web. The manager is a compile stub.
Exceptions / Errors
- AgentFailure
- A typed command or event failure.
- ModelPreparationFailure
- A safe typed failure from a model preparation operation.