SORIRecognitionConfig class
Recognition configuration, applied with SORIAudioRecognizer.configure.
The three minimal configurations:
const SORIRecognitionConfig(); // on-device (default)
const SORIRecognitionConfig(recognitionMode: SORIRecognitionMode.server);
const SORIRecognitionConfig(
recognitionMode: SORIRecognitionMode.onDeviceWithPeriodicServer,
serverRecognition: SORIServerRecognitionOptions(intervalMillis: 300000),
);
Constructors
- SORIRecognitionConfig({bool enableDelayedSending = true, int maxPendingTimeMillis = 10 * 60 * 1000, bool autoRetryOnNetworkRecovery = true, bool audiomarker = false, SORIRecognitionMode recognitionMode = SORIRecognitionMode.onDevice, SORIServerRecognitionOptions? serverRecognition, bool continueRecognitionOnEngineDetach = false})
-
const
Properties
- audiomarker → bool
-
Near-ultrasonic audio-marker detection alongside on-device recognition.
Not available with either server mode.
final
- autoRetryOnNetworkRecovery → bool
-
final
- continueRecognitionOnEngineDetach → bool
-
Android only: detach Flutter while an explicitly started microphone service keeps running.
final
- enableDelayedSending → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxPendingTimeMillis → int
-
final
- recognitionMode → SORIRecognitionMode
-
Which recognizer identifies the audio; see SORIRecognitionMode.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverRecognition → SORIServerRecognitionOptions?
-
Cadence and delay of the server queries of a server recognitionMode:
null with SORIRecognitionMode.onDevice; optional with
SORIRecognitionMode.server (null means continuous with the default
delay); required, with a positive interval, with
SORIRecognitionMode.onDeviceWithPeriodicServer.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - The platform wire map. Throws like validate.
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void - Throws an ArgumentError for a configuration that every SORI SDK rejects: server options with SORIRecognitionMode.onDevice, SORIRecognitionMode.onDeviceWithPeriodicServer without a positive interval, audiomarker with either server mode, or options outside SORIServerRecognitionOptions.validate.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited