RecognitionConfig constructor
RecognitionConfig({
- RecognitionConfig_AudioEncoding? encoding,
- int? sampleRateHertz,
- String? languageCode,
- int? maxAlternatives,
- bool? profanityFilter,
- Iterable<
SpeechContext> ? speechContexts, - int? audioChannelCount,
- bool? enableWordTimeOffsets,
- RecognitionMetadata? metadata,
- bool? enableAutomaticPunctuation,
- bool? enableSeparateRecognitionPerChannel,
- String? model,
- bool? useEnhanced,
- bool? enableWordConfidence,
- Iterable<
String> ? alternativeLanguageCodes, - SpeakerDiarizationConfig? diarizationConfig,
- SpeechAdaptation? adaptation,
- BoolValue? enableSpokenPunctuation,
- 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;
}