LocalVoicePlatform class abstract

Platform contract implemented by MethodChannelLocalVoice (and any federated platform implementation).

Every method here maps directly onto an on-device speech API call — there is intentionally no cloud fallback. Implementations must request on-device recognition explicitly (iOS requiresOnDeviceRecognition = true, Android EXTRA_PREFER_OFFLINE) and fail rather than silently falling back to a network recognizer.

Inheritance
  • Object
  • PlatformInterface
  • LocalVoicePlatform
Implementers

Constructors

LocalVoicePlatform()
Constructs a LocalVoicePlatform.

Properties

events Stream<LocalVoiceEvent>
Stream of transcript, error, and status events for the lifetime of the plugin. A single broadcast stream is shared across listen sessions.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() Future<void>
Immediately aborts the current session with no final result.
hasPermission() Future<bool>
Whether microphone + speech-recognition permission has already been granted.
isAvailable() Future<bool>
Whether on-device speech recognition is available on this device right now (model downloaded, hardware supported). Does not request permission.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestPermission() Future<bool>
Prompts the user for microphone + speech-recognition permission. Returns whether permission was granted.
startListening({String? localeId, Duration? pauseFor, Duration? listenFor}) Future<void>
Starts an on-device listening session.
stopListening() Future<void>
Stops capturing audio; the recognizer will still emit a final result for whatever was captured so far.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance LocalVoicePlatform
The default instance of LocalVoicePlatform to use.
getter/setter pair