InputAudioConfig constructor

InputAudioConfig({
  1. AudioEncoding? audioEncoding,
  2. int? sampleRateHertz,
  3. String? languageCode,
  4. @Deprecated('This field is deprecated.') Iterable<String>? phraseHints,
  5. String? model,
  6. bool? singleUtterance,
  7. SpeechModelVariant? modelVariant,
  8. Iterable<SpeechContext>? speechContexts,
  9. bool? enableWordInfo,
  10. bool? disableNoSpeechRecognizedEvent,
})

Implementation

factory InputAudioConfig({
  AudioEncoding? audioEncoding,
  $core.int? sampleRateHertz,
  $core.String? languageCode,
  @$core.Deprecated('This field is deprecated.')
      $core.Iterable<$core.String>? phraseHints,
  $core.String? model,
  $core.bool? singleUtterance,
  SpeechModelVariant? modelVariant,
  $core.Iterable<SpeechContext>? speechContexts,
  $core.bool? enableWordInfo,
  $core.bool? disableNoSpeechRecognizedEvent,
}) {
  final _result = create();
  if (audioEncoding != null) {
    _result.audioEncoding = audioEncoding;
  }
  if (sampleRateHertz != null) {
    _result.sampleRateHertz = sampleRateHertz;
  }
  if (languageCode != null) {
    _result.languageCode = languageCode;
  }
  if (phraseHints != null) {
    // ignore: deprecated_member_use_from_same_package
    _result.phraseHints.addAll(phraseHints);
  }
  if (model != null) {
    _result.model = model;
  }
  if (singleUtterance != null) {
    _result.singleUtterance = singleUtterance;
  }
  if (modelVariant != null) {
    _result.modelVariant = modelVariant;
  }
  if (speechContexts != null) {
    _result.speechContexts.addAll(speechContexts);
  }
  if (enableWordInfo != null) {
    _result.enableWordInfo = enableWordInfo;
  }
  if (disableNoSpeechRecognizedEvent != null) {
    _result.disableNoSpeechRecognizedEvent = disableNoSpeechRecognizedEvent;
  }
  return _result;
}