RecognitionConfig constructor

RecognitionConfig({
  1. RecognitionConfig_AudioEncoding? encoding,
  2. int? sampleRateHertz,
  3. String? languageCode,
  4. int? maxAlternatives,
  5. bool? profanityFilter,
  6. Iterable<SpeechContext>? speechContexts,
  7. int? audioChannelCount,
  8. bool? enableWordTimeOffsets,
  9. RecognitionMetadata? metadata,
  10. bool? enableAutomaticPunctuation,
  11. bool? enableSeparateRecognitionPerChannel,
  12. String? model,
  13. bool? useEnhanced,
  14. bool? enableWordConfidence,
  15. @Deprecated('This field is deprecated.') bool? enableSpeakerDiarization,
  16. @Deprecated('This field is deprecated.') int? diarizationSpeakerCount,
  17. Iterable<String>? alternativeLanguageCodes,
  18. SpeakerDiarizationConfig? diarizationConfig,
  19. SpeechAdaptation? adaptation,
  20. BoolValue? enableSpokenPunctuation,
  21. BoolValue? enableSpokenEmojis,
  22. TranscriptNormalization? transcriptNormalization,
})

Implementation

factory RecognitionConfig({
  RecognitionConfig_AudioEncoding? encoding,
  $core.int? sampleRateHertz,
  $core.String? languageCode,
  $core.int? maxAlternatives,
  $core.bool? profanityFilter,
  $core.Iterable<SpeechContext>? speechContexts,
  $core.int? audioChannelCount,
  $core.bool? enableWordTimeOffsets,
  RecognitionMetadata? metadata,
  $core.bool? enableAutomaticPunctuation,
  $core.bool? enableSeparateRecognitionPerChannel,
  $core.String? model,
  $core.bool? useEnhanced,
  $core.bool? enableWordConfidence,
  @$core.Deprecated('This field is deprecated.')
  $core.bool? enableSpeakerDiarization,
  @$core.Deprecated('This field is deprecated.')
  $core.int? diarizationSpeakerCount,
  $core.Iterable<$core.String>? alternativeLanguageCodes,
  SpeakerDiarizationConfig? diarizationConfig,
  $4.SpeechAdaptation? adaptation,
  $5.BoolValue? enableSpokenPunctuation,
  $5.BoolValue? enableSpokenEmojis,
  $4.TranscriptNormalization? transcriptNormalization,
}) {
  final $result = create();
  if (encoding != null) {
    $result.encoding = encoding;
  }
  if (sampleRateHertz != null) {
    $result.sampleRateHertz = sampleRateHertz;
  }
  if (languageCode != null) {
    $result.languageCode = languageCode;
  }
  if (maxAlternatives != null) {
    $result.maxAlternatives = maxAlternatives;
  }
  if (profanityFilter != null) {
    $result.profanityFilter = profanityFilter;
  }
  if (speechContexts != null) {
    $result.speechContexts.addAll(speechContexts);
  }
  if (audioChannelCount != null) {
    $result.audioChannelCount = audioChannelCount;
  }
  if (enableWordTimeOffsets != null) {
    $result.enableWordTimeOffsets = enableWordTimeOffsets;
  }
  if (metadata != null) {
    $result.metadata = metadata;
  }
  if (enableAutomaticPunctuation != null) {
    $result.enableAutomaticPunctuation = enableAutomaticPunctuation;
  }
  if (enableSeparateRecognitionPerChannel != null) {
    $result.enableSeparateRecognitionPerChannel =
        enableSeparateRecognitionPerChannel;
  }
  if (model != null) {
    $result.model = model;
  }
  if (useEnhanced != null) {
    $result.useEnhanced = useEnhanced;
  }
  if (enableWordConfidence != null) {
    $result.enableWordConfidence = enableWordConfidence;
  }
  if (enableSpeakerDiarization != null) {
    // ignore: deprecated_member_use_from_same_package
    $result.enableSpeakerDiarization = enableSpeakerDiarization;
  }
  if (diarizationSpeakerCount != null) {
    // ignore: deprecated_member_use_from_same_package
    $result.diarizationSpeakerCount = diarizationSpeakerCount;
  }
  if (alternativeLanguageCodes != null) {
    $result.alternativeLanguageCodes.addAll(alternativeLanguageCodes);
  }
  if (diarizationConfig != null) {
    $result.diarizationConfig = diarizationConfig;
  }
  if (adaptation != null) {
    $result.adaptation = adaptation;
  }
  if (enableSpokenPunctuation != null) {
    $result.enableSpokenPunctuation = enableSpokenPunctuation;
  }
  if (enableSpokenEmojis != null) {
    $result.enableSpokenEmojis = enableSpokenEmojis;
  }
  if (transcriptNormalization != null) {
    $result.transcriptNormalization = transcriptNormalization;
  }
  return $result;
}