public final class InputAudioConfig extends GeneratedMessageV3 implements InputAudioConfigOrBuilder
Instructs the speech recognizer on how to process the audio content.Protobuf type
google.cloud.dialogflow.v2beta1.InputAudioConfig
Modifier and Type | Class and Description |
---|---|
static class |
InputAudioConfig.Builder
Instructs the speech recognizer on how to process the audio content.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
AUDIO_ENCODING_FIELD_NUMBER |
static int |
DISABLE_NO_SPEECH_RECOGNIZED_EVENT_FIELD_NUMBER |
static int |
ENABLE_WORD_INFO_FIELD_NUMBER |
static int |
LANGUAGE_CODE_FIELD_NUMBER |
static int |
MODEL_FIELD_NUMBER |
static int |
MODEL_VARIANT_FIELD_NUMBER |
static int |
PHRASE_HINTS_FIELD_NUMBER |
static int |
SAMPLE_RATE_HERTZ_FIELD_NUMBER |
static int |
SINGLE_UTTERANCE_FIELD_NUMBER |
static int |
SPEECH_CONTEXTS_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
AudioEncoding |
getAudioEncoding()
Required.
|
int |
getAudioEncodingValue()
Required.
|
static InputAudioConfig |
getDefaultInstance() |
InputAudioConfig |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
boolean |
getDisableNoSpeechRecognizedEvent()
Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and
[Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent].
|
boolean |
getEnableWordInfo()
If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
[StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
words, e.g.
|
String |
getLanguageCode()
Required.
|
ByteString |
getLanguageCodeBytes()
Required.
|
String |
getModel()
Which Speech model to select for the given request.
|
ByteString |
getModelBytes()
Which Speech model to select for the given request.
|
SpeechModelVariant |
getModelVariant()
Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
|
int |
getModelVariantValue()
Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
|
Parser<InputAudioConfig> |
getParserForType() |
String |
getPhraseHints(int index)
Deprecated.
google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See
google/cloud/dialogflow/v2beta1/audio_config.proto;l=216
|
ByteString |
getPhraseHintsBytes(int index)
Deprecated.
google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See
google/cloud/dialogflow/v2beta1/audio_config.proto;l=216
|
int |
getPhraseHintsCount()
Deprecated.
google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See
google/cloud/dialogflow/v2beta1/audio_config.proto;l=216
|
ProtocolStringList |
getPhraseHintsList()
Deprecated.
google.cloud.dialogflow.v2beta1.InputAudioConfig.phrase_hints is deprecated. See
google/cloud/dialogflow/v2beta1/audio_config.proto;l=216
|
int |
getSampleRateHertz()
Required.
|
int |
getSerializedSize() |
boolean |
getSingleUtterance()
If `false` (default), recognition does not cease until the
client closes the stream.
|
SpeechContext |
getSpeechContexts(int index)
Context information to assist speech recognition.
|
int |
getSpeechContextsCount()
Context information to assist speech recognition.
|
List<SpeechContext> |
getSpeechContextsList()
Context information to assist speech recognition.
|
SpeechContextOrBuilder |
getSpeechContextsOrBuilder(int index)
Context information to assist speech recognition.
|
List<? extends SpeechContextOrBuilder> |
getSpeechContextsOrBuilderList()
Context information to assist speech recognition.
|
UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static InputAudioConfig.Builder |
newBuilder() |
static InputAudioConfig.Builder |
newBuilder(InputAudioConfig prototype) |
InputAudioConfig.Builder |
newBuilderForType() |
protected InputAudioConfig.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) |
static InputAudioConfig |
parseDelimitedFrom(InputStream input) |
static InputAudioConfig |
parseDelimitedFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static InputAudioConfig |
parseFrom(byte[] data) |
static InputAudioConfig |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static InputAudioConfig |
parseFrom(ByteBuffer data) |
static InputAudioConfig |
parseFrom(ByteBuffer data,
ExtensionRegistryLite extensionRegistry) |
static InputAudioConfig |
parseFrom(ByteString data) |
static InputAudioConfig |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static InputAudioConfig |
parseFrom(CodedInputStream input) |
static InputAudioConfig |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static InputAudioConfig |
parseFrom(InputStream input) |
static InputAudioConfig |
parseFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<InputAudioConfig> |
parser() |
InputAudioConfig.Builder |
toBuilder() |
void |
writeTo(CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int AUDIO_ENCODING_FIELD_NUMBER
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER
public static final int LANGUAGE_CODE_FIELD_NUMBER
public static final int ENABLE_WORD_INFO_FIELD_NUMBER
public static final int PHRASE_HINTS_FIELD_NUMBER
public static final int SPEECH_CONTEXTS_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
public static final int MODEL_VARIANT_FIELD_NUMBER
public static final int SINGLE_UTTERANCE_FIELD_NUMBER
public static final int DISABLE_NO_SPEECH_RECOGNIZED_EVENT_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public int getAudioEncodingValue()
Required. Audio encoding of the audio content to process.
.google.cloud.dialogflow.v2beta1.AudioEncoding audio_encoding = 1;
getAudioEncodingValue
in interface InputAudioConfigOrBuilder
public AudioEncoding getAudioEncoding()
Required. Audio encoding of the audio content to process.
.google.cloud.dialogflow.v2beta1.AudioEncoding audio_encoding = 1;
getAudioEncoding
in interface InputAudioConfigOrBuilder
public int getSampleRateHertz()
Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details.
int32 sample_rate_hertz = 2;
getSampleRateHertz
in interface InputAudioConfigOrBuilder
public String getLanguageCode()
Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) 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;
getLanguageCode
in interface InputAudioConfigOrBuilder
public ByteString getLanguageCodeBytes()
Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) 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;
getLanguageCodeBytes
in interface InputAudioConfigOrBuilder
public boolean getEnableWordInfo()
If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.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;
getEnableWordInfo
in interface InputAudioConfigOrBuilder
@Deprecated public ProtocolStringList getPhraseHintsList()
A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) 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];
getPhraseHintsList
in interface InputAudioConfigOrBuilder
@Deprecated public int getPhraseHintsCount()
A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) 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];
getPhraseHintsCount
in interface InputAudioConfigOrBuilder
@Deprecated public String getPhraseHints(int index)
A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) 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];
getPhraseHints
in interface InputAudioConfigOrBuilder
index
- The index of the element to return.@Deprecated public ByteString getPhraseHintsBytes(int index)
A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) 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];
getPhraseHintsBytes
in interface InputAudioConfigOrBuilder
index
- The index of the value to return.public List<SpeechContext> getSpeechContextsList()
Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.
repeated .google.cloud.dialogflow.v2beta1.SpeechContext speech_contexts = 11;
getSpeechContextsList
in interface InputAudioConfigOrBuilder
public List<? extends SpeechContextOrBuilder> getSpeechContextsOrBuilderList()
Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.
repeated .google.cloud.dialogflow.v2beta1.SpeechContext speech_contexts = 11;
getSpeechContextsOrBuilderList
in interface InputAudioConfigOrBuilder
public int getSpeechContextsCount()
Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.
repeated .google.cloud.dialogflow.v2beta1.SpeechContext speech_contexts = 11;
getSpeechContextsCount
in interface InputAudioConfigOrBuilder
public SpeechContext getSpeechContexts(int index)
Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.
repeated .google.cloud.dialogflow.v2beta1.SpeechContext speech_contexts = 11;
getSpeechContexts
in interface InputAudioConfigOrBuilder
public SpeechContextOrBuilder getSpeechContextsOrBuilder(int index)
Context information to assist speech recognition. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details.
repeated .google.cloud.dialogflow.v2beta1.SpeechContext speech_contexts = 11;
getSpeechContextsOrBuilder
in interface InputAudioConfigOrBuilder
public String getModel()
Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details.
string model = 7;
getModel
in interface InputAudioConfigOrBuilder
public ByteString getModelBytes()
Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details.
string model = 7;
getModelBytes
in interface InputAudioConfigOrBuilder
public int getModelVariantValue()
Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
.google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10;
getModelVariantValue
in interface InputAudioConfigOrBuilder
public SpeechModelVariant getModelVariant()
Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
.google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10;
getModelVariant
in interface InputAudioConfigOrBuilder
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;
getSingleUtterance
in interface InputAudioConfigOrBuilder
public boolean getDisableNoSpeechRecognizedEvent()
Only used in [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.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;
getDisableNoSpeechRecognizedEvent
in interface InputAudioConfigOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static InputAudioConfig parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static InputAudioConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static InputAudioConfig parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static InputAudioConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static InputAudioConfig parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static InputAudioConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static InputAudioConfig parseFrom(InputStream input) throws IOException
IOException
public static InputAudioConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static InputAudioConfig parseDelimitedFrom(InputStream input) throws IOException
IOException
public static InputAudioConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static InputAudioConfig parseFrom(CodedInputStream input) throws IOException
IOException
public static InputAudioConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public InputAudioConfig.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static InputAudioConfig.Builder newBuilder()
public static InputAudioConfig.Builder newBuilder(InputAudioConfig prototype)
public InputAudioConfig.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected InputAudioConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static InputAudioConfig getDefaultInstance()
public static Parser<InputAudioConfig> parser()
public Parser<InputAudioConfig> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public InputAudioConfig getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.