Class InputAudioConfig (4.51.0)

public final class InputAudioConfig extends GeneratedMessageV3 implements InputAudioConfigOrBuilder

Instructs the speech recognizer how to process the audio content.

Protobuf type google.cloud.dialogflow.v2.InputAudioConfig

Static Fields

AUDIO_ENCODING_FIELD_NUMBER

public static final int AUDIO_ENCODING_FIELD_NUMBER
Field Value
Type Description
int

DISABLE_NO_SPEECH_RECOGNIZED_EVENT_FIELD_NUMBER

public static final int DISABLE_NO_SPEECH_RECOGNIZED_EVENT_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER

public static final int ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_WORD_INFO_FIELD_NUMBER

public static final int ENABLE_WORD_INFO_FIELD_NUMBER
Field Value
Type Description
int

LANGUAGE_CODE_FIELD_NUMBER

public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value
Type Description
int

MODEL_FIELD_NUMBER

public static final int MODEL_FIELD_NUMBER
Field Value
Type Description
int

MODEL_VARIANT_FIELD_NUMBER

public static final int MODEL_VARIANT_FIELD_NUMBER
Field Value
Type Description
int

OPT_OUT_CONFORMER_MODEL_MIGRATION_FIELD_NUMBER

public static final int OPT_OUT_CONFORMER_MODEL_MIGRATION_FIELD_NUMBER
Field Value
Type Description
int

PHRASE_HINTS_FIELD_NUMBER

public static final int PHRASE_HINTS_FIELD_NUMBER
Field Value
Type Description
int

SAMPLE_RATE_HERTZ_FIELD_NUMBER

public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER
Field Value
Type Description
int

SINGLE_UTTERANCE_FIELD_NUMBER

public static final int SINGLE_UTTERANCE_FIELD_NUMBER
Field Value
Type Description
int

SPEECH_CONTEXTS_FIELD_NUMBER

public static final int SPEECH_CONTEXTS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static InputAudioConfig getDefaultInstance()
Returns
Type Description
InputAudioConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static InputAudioConfig.Builder newBuilder()
Returns
Type Description
InputAudioConfig.Builder

newBuilder(InputAudioConfig prototype)

public static InputAudioConfig.Builder newBuilder(InputAudioConfig prototype)
Parameter
Name Description
prototype InputAudioConfig
Returns
Type Description
InputAudioConfig.Builder

parseDelimitedFrom(InputStream input)

public static InputAudioConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static InputAudioConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static InputAudioConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static InputAudioConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static InputAudioConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static InputAudioConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static InputAudioConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static InputAudioConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static InputAudioConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static InputAudioConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static InputAudioConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static InputAudioConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InputAudioConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<InputAudioConfig> parser()
Returns
Type Description
Parser<InputAudioConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAudioEncoding()

public AudioEncoding getAudioEncoding()

Required. Audio encoding of the audio content to process.

.google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AudioEncoding

The audioEncoding.

getAudioEncodingValue()

public int getAudioEncodingValue()

Required. Audio encoding of the audio content to process.

.google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for audioEncoding.

getDefaultInstanceForType()

public InputAudioConfig getDefaultInstanceForType()
Returns
Type Description
InputAudioConfig

getDisableNoSpeechRecognizedEvent()

public boolean getDisableNoSpeechRecognizedEvent()

Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If false and recognition doesn't return any result, trigger NO_SPEECH_RECOGNIZED event to Dialogflow agent.

bool disable_no_speech_recognized_event = 14;

Returns
Type Description
boolean

The disableNoSpeechRecognizedEvent.

getEnableAutomaticPunctuation()

public boolean getEnableAutomaticPunctuation()

Enable automatic punctuation option at the speech backend.

bool enable_automatic_punctuation = 17;

Returns
Type Description
boolean

The enableAutomaticPunctuation.

getEnableWordInfo()

public boolean getEnableWordInfo()

If true, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.

bool enable_word_info = 13;

Returns
Type Description
boolean

The enableWordInfo.

getLanguageCode()

public String getLanguageCode()

Required. The language of the supplied audio. Dialogflow does not do translations. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.

string language_code = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The languageCode.

getLanguageCodeBytes()

public ByteString getLanguageCodeBytes()

Required. The language of the supplied audio. Dialogflow does not do translations. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.

string language_code = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for languageCode.

getModel()

public String getModel()

Optional. Which Speech model to select for the given request. For more information, see Speech models.

string model = 7;

Returns
Type Description
String

The model.

getModelBytes()

public ByteString getModelBytes()

Optional. Which Speech model to select for the given request. For more information, see Speech models.

string model = 7;

Returns
Type Description
ByteString

The bytes for model.

getModelVariant()

public SpeechModelVariant getModelVariant()

Which variant of the Speech model to use.

.google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10;

Returns
Type Description
SpeechModelVariant

The modelVariant.

getModelVariantValue()

public int getModelVariantValue()

Which variant of the Speech model to use.

.google.cloud.dialogflow.v2.SpeechModelVariant model_variant = 10;

Returns
Type Description
int

The enum numeric value on the wire for modelVariant.

getOptOutConformerModelMigration()

public boolean getOptOutConformerModelMigration()

If true, the request will opt out for STT conformer model migration. This field will be deprecated once force migration takes place in June

  1. Please refer to Dialogflow ES Speech model migration.

bool opt_out_conformer_model_migration = 26;

Returns
Type Description
boolean

The optOutConformerModelMigration.

getParserForType()

public Parser<InputAudioConfig> getParserForType()
Returns
Type Description
Parser<InputAudioConfig>
Overrides

getPhraseHints(int index) (deprecated)

public String getPhraseHints(int index)

Deprecated. google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See google/cloud/dialogflow/v2/audio_config.proto;l=129

A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

See the Cloud Speech documentation for more details.

This field is deprecated. Please use speech_contexts instead. If you specify both phrase_hints and speech_contexts, Dialogflow will treat the phrase_hints as a single additional SpeechContext.

repeated string phrase_hints = 4 [deprecated = true];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The phraseHints at the given index.

getPhraseHintsBytes(int index) (deprecated)

public ByteString getPhraseHintsBytes(int index)

Deprecated. google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See google/cloud/dialogflow/v2/audio_config.proto;l=129

A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

See the Cloud Speech documentation for more details.

This field is deprecated. Please use speech_contexts instead. If you specify both phrase_hints and speech_contexts, Dialogflow will treat the phrase_hints as a single additional SpeechContext.

repeated string phrase_hints = 4 [deprecated = true];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the phraseHints at the given index.

getPhraseHintsCount() (deprecated)

public int getPhraseHintsCount()

Deprecated. google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See google/cloud/dialogflow/v2/audio_config.proto;l=129

A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

See the Cloud Speech documentation for more details.

This field is deprecated. Please use speech_contexts instead. If you specify both phrase_hints and speech_contexts, Dialogflow will treat the phrase_hints as a single additional SpeechContext.

repeated string phrase_hints = 4 [deprecated = true];

Returns
Type Description
int

The count of phraseHints.

getPhraseHintsList() (deprecated)

public ProtocolStringList getPhraseHintsList()

Deprecated. google.cloud.dialogflow.v2.InputAudioConfig.phrase_hints is deprecated. See google/cloud/dialogflow/v2/audio_config.proto;l=129

A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

See the Cloud Speech documentation for more details.

This field is deprecated. Please use speech_contexts instead. If you specify both phrase_hints and speech_contexts, Dialogflow will treat the phrase_hints as a single additional SpeechContext.

repeated string phrase_hints = 4 [deprecated = true];

Returns
Type Description
ProtocolStringList

A list containing the phraseHints.

getSampleRateHertz()

public int getSampleRateHertz()

Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to Cloud Speech API documentation for more details.

int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The sampleRateHertz.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSingleUtterance()

public boolean getSingleUtterance()

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.

bool single_utterance = 8;

Returns
Type Description
boolean

The singleUtterance.

getSpeechContexts(int index)

public SpeechContext getSpeechContexts(int index)

Context information to assist speech recognition.

See the Cloud Speech documentation for more details.

repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;

Parameter
Name Description
index int
Returns
Type Description
SpeechContext

getSpeechContextsCount()

public int getSpeechContextsCount()

Context information to assist speech recognition.

See the Cloud Speech documentation for more details.

repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;

Returns
Type Description
int

getSpeechContextsList()

public List<SpeechContext> getSpeechContextsList()

Context information to assist speech recognition.

See the Cloud Speech documentation for more details.

repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;

Returns
Type Description
List<SpeechContext>

getSpeechContextsOrBuilder(int index)

public SpeechContextOrBuilder getSpeechContextsOrBuilder(int index)

Context information to assist speech recognition.

See the Cloud Speech documentation for more details.

repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;

Parameter
Name Description
index int
Returns
Type Description
SpeechContextOrBuilder

getSpeechContextsOrBuilderList()

public List<? extends SpeechContextOrBuilder> getSpeechContextsOrBuilderList()

Context information to assist speech recognition.

See the Cloud Speech documentation for more details.

repeated .google.cloud.dialogflow.v2.SpeechContext speech_contexts = 11;

Returns
Type Description
List<? extends com.google.cloud.dialogflow.v2.SpeechContextOrBuilder>

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public InputAudioConfig.Builder newBuilderForType()
Returns
Type Description
InputAudioConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected InputAudioConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
InputAudioConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public InputAudioConfig.Builder toBuilder()
Returns
Type Description
InputAudioConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException