InputConfigV2beta1 class

Helper Class For passing in audio input config

var config = InputConfigV2beta1(
  encoding: 'AUDIO_ENCODING_LINEAR_16',
  languageCode: 'en-US',
  sampleRateHertz: 8000,
  singleUtterance: false,
  speechContexts: [biasList]
);

Constructors

InputConfigV2beta1({AudioEncoding audioEncoding = AudioEncoding.AUDIO_ENCODING_LINEAR_16, String encoding = "AUDIO_ENCODING_LINEAR_16", String languageCode = "en-US", bool singleUtterance = false, List<SpeechContextV2Beta1> speechContexts = const [], int sampleRateHertz = 8000})

Properties

audioEncoding AudioEncoding
getter/setter pair
encoding String
Required. String encoding of audio data sent in all RecognitionAudio messages. See AudioEncoding docs
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
languageCode String
Required. The language of the supplied audio as a BCP-47 language tag. Example: "en-US". See Language Support for a list of the currently supported language codes.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampleRateHertz int
Required. Sample rate in Hertz of the audio data sent in all RecognitionAudio messages. Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). This field is optional for FLAC and WAV audio files, but is required for all other audio formats. For details, see AudioEncoding.
getter/setter pair
singleUtterance bool
If false (default), recognition does not cease until the client closes the stream. If true, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance.
getter/setter pair
speechContexts List<SpeechContextV2Beta1>
List of SpeechContext. A means to provide context to assist the speech recognition. For more information,
final

Methods

cast() InputAudioConfig
getAudioEncoding(dynamic encoding) AudioEncoding
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited