VoiceAgentConfig constructor

VoiceAgentConfig({
  1. String? llmModelId,
  2. String? sttModelId,
  3. String? ttsModelId,
  4. String? vadModelId,
  5. String? ttsVoiceId,
  6. int? sampleRateHz,
  7. int? chunkMs,
  8. AudioSource? audioSource,
  9. String? audioFilePath,
  10. bool? enableBargeIn,
  11. int? bargeInThresholdMs,
  12. LLMGenerationOptions? generation,
  13. int? maxContextTokens,
  14. bool? emitPartials,
})

Implementation

factory VoiceAgentConfig({
  $core.String? llmModelId,
  $core.String? sttModelId,
  $core.String? ttsModelId,
  $core.String? vadModelId,
  $core.String? ttsVoiceId,
  $core.int? sampleRateHz,
  $core.int? chunkMs,
  AudioSource? audioSource,
  $core.String? audioFilePath,
  $core.bool? enableBargeIn,
  $core.int? bargeInThresholdMs,
  $0.LLMGenerationOptions? generation,
  $core.int? maxContextTokens,
  $core.bool? emitPartials,
}) {
  final result = create();
  if (llmModelId != null) result.llmModelId = llmModelId;
  if (sttModelId != null) result.sttModelId = sttModelId;
  if (ttsModelId != null) result.ttsModelId = ttsModelId;
  if (vadModelId != null) result.vadModelId = vadModelId;
  if (ttsVoiceId != null) result.ttsVoiceId = ttsVoiceId;
  if (sampleRateHz != null) result.sampleRateHz = sampleRateHz;
  if (chunkMs != null) result.chunkMs = chunkMs;
  if (audioSource != null) result.audioSource = audioSource;
  if (audioFilePath != null) result.audioFilePath = audioFilePath;
  if (enableBargeIn != null) result.enableBargeIn = enableBargeIn;
  if (bargeInThresholdMs != null)
    result.bargeInThresholdMs = bargeInThresholdMs;
  if (generation != null) result.generation = generation;
  if (maxContextTokens != null) result.maxContextTokens = maxContextTokens;
  if (emitPartials != null) result.emitPartials = emitPartials;
  return result;
}