InputAudioConfig constructor
InputAudioConfig({
- AudioEncoding? audioEncoding,
- int? sampleRateHertz,
- String? languageCode,
- @Deprecated('This field is deprecated.') Iterable<
String> ? phraseHints, - String? model,
- bool? singleUtterance,
- SpeechModelVariant? modelVariant,
- Iterable<
SpeechContext> ? speechContexts, - bool? enableWordInfo,
- bool? disableNoSpeechRecognizedEvent,
Implementation
factory InputAudioConfig({
AudioEncoding? audioEncoding,
$core.int? sampleRateHertz,
$core.String? languageCode,
@$core.Deprecated('This field is deprecated.')
$core.Iterable<$core.String>? phraseHints,
$core.String? model,
$core.bool? singleUtterance,
SpeechModelVariant? modelVariant,
$core.Iterable<SpeechContext>? speechContexts,
$core.bool? enableWordInfo,
$core.bool? disableNoSpeechRecognizedEvent,
}) {
final _result = create();
if (audioEncoding != null) {
_result.audioEncoding = audioEncoding;
}
if (sampleRateHertz != null) {
_result.sampleRateHertz = sampleRateHertz;
}
if (languageCode != null) {
_result.languageCode = languageCode;
}
if (phraseHints != null) {
// ignore: deprecated_member_use_from_same_package
_result.phraseHints.addAll(phraseHints);
}
if (model != null) {
_result.model = model;
}
if (singleUtterance != null) {
_result.singleUtterance = singleUtterance;
}
if (modelVariant != null) {
_result.modelVariant = modelVariant;
}
if (speechContexts != null) {
_result.speechContexts.addAll(speechContexts);
}
if (enableWordInfo != null) {
_result.enableWordInfo = enableWordInfo;
}
if (disableNoSpeechRecognizedEvent != null) {
_result.disableNoSpeechRecognizedEvent = disableNoSpeechRecognizedEvent;
}
return _result;
}