toConfig method

RecognitionConfig toConfig()

Implementation

_cs.RecognitionConfig toConfig() => (_cs.RecognitionConfig()
  ..encoding = _encoding(encoding)
  ..languageCode = languageCode
  ..alternativeLanguageCodes.addAll(alternativeLanguageCodes)
  ..sampleRateHertz = sampleRateHertz!
  ..audioChannelCount = audioChannelCount
  ..enableSeparateRecognitionPerChannel = enableSeparateRecognitionPerChannel
  ..maxAlternatives = maxAlternatives
  ..profanityFilter = profanityFilter
  ..enableWordTimeOffsets = enableWordTimeOffsets
  ..enableWordConfidence = enableWordConfidence
  ..enableAutomaticPunctuation = enableAutomaticPunctuation
  ..diarizationConfig = diarizationConfig ?? _cs.SpeakerDiarizationConfig()
  ..metadata = recognitionMetadata ?? _cs.RecognitionMetadata()
  ..model = _model(model)
  ..useEnhanced = useEnhanced
  ..speechContexts
      .addAll(speechContexts.map((sc) => sc.toGoogleSpeechContext())));