SimliClientConfig class

This will configuration for the SimliClient

apiKey is the key used for authenticating API requests. faceId identifies the face to use for the session. handleSilence is optional and determines whether silence handling is enabled.

Constructors

SimliClientConfig({required String apiKey, required String faceId, required bool handleSilence, required int maxSessionLength, required int maxIdleTime, required bool syncAudio, Duration retryDelay = const Duration(milliseconds: 1500), Duration connectionTimeoutTime = const Duration(seconds: 60), Duration requestTimeout = const Duration(seconds: 30), Duration audioCheckInterval = const Duration(milliseconds: 100), Duration silenceThreshold = const Duration(milliseconds: 1250), Duration iceGatheringTimeout = const Duration(seconds: 10), int maxRetryAttempts = 3, Duration webSocketTimeout = const Duration(seconds: 20), Duration answerTimeoutTime = const Duration(seconds: 10), String videoReferenceUrl = 'https://storage.googleapis.com/charactervideos/5514e24d-6086-46a3-ace4-6a7264e5cb7c/5514e24d-6086-46a3-ace4-6a7264e5cb7c.mp4', bool isJPG = true})
Constructs the SimliClientConfig with the necessary values.
SimliClientConfig.fromJson(Map<String, dynamic> json)
Factory constructor for creating an instance from JSON if needed.
factory

Properties

answerTimeoutTime Duration
Duration for answer timeout. The maximum time to wait for an answer before timing out.
final
apiKey String
The API key for authentication.
final
audioCheckInterval Duration
Duration for audio check interval. This interval is used to determine how frequently the audio status should be checked.
final
connectionTimeoutTime Duration
Duration for connection timeout. Specifies the maximum time to wait while trying to establish a connection before giving up.
final
faceId String
The Face ID associated with the client.
final
handleSilence bool
Whether silence should be handled by the client.
final
hashCode int
The hash code for this object.
no setterinherited
iceGatheringTimeout Duration
Duration for ICE gathering timeout. Defines the maximum time to wait for ICE gathering before declaring a failure.
final
isJPG bool
Indicates if the file format is JPG.
final
maxIdleTime int
Maximum idle time allowed.
final
maxRetryAttempts int
Max number of retry attempts for API requests.
final
maxSessionLength int
Maximum session length allowed.
final
requestTimeout Duration
Duration for request timeout. Defines the maximum time to wait for a request to complete successfully.
final
retryDelay Duration
Duration for retry delay. This duration specifies how long the system should wait before retrying a failed operation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
silenceThreshold Duration
Duration for silence threshold. Sets the duration beyond which silence is considered significant enough to take an action.
final
syncAudio bool
Whether audio should be synchronized.
final
videoReferenceUrl String
Video reference URL for the session.
final
webSocketTimeout Duration
Duration for WebSocket timeout. The time period to wait for WebSocket before timing out.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the SimliClientConfig to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

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