InputAudioConfig constructor

InputAudioConfig({
  1. AudioEncoding? audioEncoding,
  2. int? sampleRateHertz,
  3. Iterable<String>? phraseHints,
  4. String? model,
  5. bool? singleUtterance,
  6. SpeechModelVariant? modelVariant,
  7. bool? enableWordInfo,
})

Implementation

factory InputAudioConfig({
  AudioEncoding? audioEncoding,
  $core.int? sampleRateHertz,
  $core.Iterable<$core.String>? phraseHints,
  $core.String? model,
  $core.bool? singleUtterance,
  SpeechModelVariant? modelVariant,
  $core.bool? enableWordInfo,
}) {
  final _result = create();
  if (audioEncoding != null) {
    _result.audioEncoding = audioEncoding;
  }
  if (sampleRateHertz != null) {
    _result.sampleRateHertz = sampleRateHertz;
  }
  if (phraseHints != null) {
    _result.phraseHints.addAll(phraseHints);
  }
  if (model != null) {
    _result.model = model;
  }
  if (singleUtterance != null) {
    _result.singleUtterance = singleUtterance;
  }
  if (modelVariant != null) {
    _result.modelVariant = modelVariant;
  }
  if (enableWordInfo != null) {
    _result.enableWordInfo = enableWordInfo;
  }
  return _result;
}