SimliClientConfig constructor

SimliClientConfig({
  1. required String apiKey,
  2. required String faceId,
  3. required bool handleSilence,
  4. required int maxSessionLength,
  5. required int maxIdleTime,
  6. required bool syncAudio,
  7. Duration retryDelay = const Duration(milliseconds: 1500),
  8. Duration connectionTimeoutTime = const Duration(seconds: 60),
  9. Duration requestTimeout = const Duration(seconds: 30),
  10. Duration audioCheckInterval = const Duration(milliseconds: 100),
  11. Duration silenceThreshold = const Duration(milliseconds: 1250),
  12. Duration iceGatheringTimeout = const Duration(seconds: 10),
  13. int maxRetryAttempts = 3,
  14. Duration webSocketTimeout = const Duration(seconds: 20),
  15. Duration answerTimeoutTime = const Duration(seconds: 10),
  16. String videoReferenceUrl = 'https://storage.googleapis.com/charactervideos/5514e24d-6086-46a3-ace4-6a7264e5cb7c/5514e24d-6086-46a3-ace4-6a7264e5cb7c.mp4',
  17. bool isJPG = true,
})

Constructs the SimliClientConfig with the necessary values.

Implementation

SimliClientConfig({
  required this.apiKey,
  required this.faceId,
  required this.handleSilence,
  required this.maxSessionLength,
  required this.maxIdleTime,
  required this.syncAudio,
  this.retryDelay = const Duration(milliseconds: 1500),
  this.connectionTimeoutTime = const Duration(seconds: 60),
  this.requestTimeout = const Duration(seconds: 30),
  this.audioCheckInterval = const Duration(milliseconds: 100),
  this.silenceThreshold = const Duration(
    milliseconds: 1250,
  ),
  this.iceGatheringTimeout = const Duration(seconds: 10),
  this.maxRetryAttempts = 3, // default value for maxRetryAttempts
  this.webSocketTimeout =
      const Duration(seconds: 20), // added webSocketTimeout
  this.answerTimeoutTime = const Duration(seconds: 10),
  this.videoReferenceUrl =
      'https://storage.googleapis.com/charactervideos/5514e24d-6086-46a3-ace4-6a7264e5cb7c/5514e24d-6086-46a3-ace4-6a7264e5cb7c.mp4', // added videoReferenceUrl
  this.isJPG = true, // added isJPG
});