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. Iterable<String>? alternativeLanguageCodes,
  16. SpeakerDiarizationConfig? diarizationConfig,
  17. SpeechAdaptation? adaptation,
  18. BoolValue? enableSpokenPunctuation,
  19. BoolValue? enableSpokenEmojis,
})

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.Iterable<$core.String>? alternativeLanguageCodes,
  SpeakerDiarizationConfig? diarizationConfig,
  $4.SpeechAdaptation? adaptation,
  $5.BoolValue? enableSpokenPunctuation,
  $5.BoolValue? enableSpokenEmojis,
}) {
  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 (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;
  }
  return $result;
}