Package com.google.cloud.speech.v2
Class RecognitionConfig
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.speech.v2.RecognitionConfig
-
- All Implemented Interfaces:
RecognitionConfigOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class RecognitionConfig extends com.google.protobuf.GeneratedMessageV3 implements RecognitionConfigOrBuilder
Provides information to the Recognizer that specifies how to process the recognition request.
Protobuf typegoogle.cloud.speech.v2.RecognitionConfig- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRecognitionConfig.BuilderProvides information to the Recognizer that specifies how to process the recognition request.static classRecognitionConfig.DecodingConfigCase-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intADAPTATION_FIELD_NUMBERstatic intAUTO_DECODING_CONFIG_FIELD_NUMBERstatic intEXPLICIT_DECODING_CONFIG_FIELD_NUMBERstatic intFEATURES_FIELD_NUMBERstatic intLANGUAGE_CODES_FIELD_NUMBERstatic intMODEL_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)SpeechAdaptationgetAdaptation()Speech adaptation context that weights recognizer predictions for specific words and phrases.SpeechAdaptationOrBuildergetAdaptationOrBuilder()Speech adaptation context that weights recognizer predictions for specific words and phrases.AutoDetectDecodingConfiggetAutoDecodingConfig()Automatically detect decoding parameters.AutoDetectDecodingConfigOrBuildergetAutoDecodingConfigOrBuilder()Automatically detect decoding parameters.RecognitionConfig.DecodingConfigCasegetDecodingConfigCase()static RecognitionConfiggetDefaultInstance()RecognitionConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()ExplicitDecodingConfiggetExplicitDecodingConfig()Explicitly specified decoding parameters.ExplicitDecodingConfigOrBuildergetExplicitDecodingConfigOrBuilder()Explicitly specified decoding parameters.RecognitionFeaturesgetFeatures()Speech recognition features to enable.RecognitionFeaturesOrBuildergetFeaturesOrBuilder()Speech recognition features to enable.StringgetLanguageCodes(int index)Optional.com.google.protobuf.ByteStringgetLanguageCodesBytes(int index)Optional.intgetLanguageCodesCount()Optional.com.google.protobuf.ProtocolStringListgetLanguageCodesList()Optional.StringgetModel()Optional.com.google.protobuf.ByteStringgetModelBytes()Optional.com.google.protobuf.Parser<RecognitionConfig>getParserForType()intgetSerializedSize()booleanhasAdaptation()Speech adaptation context that weights recognizer predictions for specific words and phrases.booleanhasAutoDecodingConfig()Automatically detect decoding parameters.booleanhasExplicitDecodingConfig()Explicitly specified decoding parameters.booleanhasFeatures()Speech recognition features to enable.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static RecognitionConfig.BuildernewBuilder()static RecognitionConfig.BuildernewBuilder(RecognitionConfig prototype)RecognitionConfig.BuildernewBuilderForType()protected RecognitionConfig.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static RecognitionConfigparseDelimitedFrom(InputStream input)static RecognitionConfigparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RecognitionConfigparseFrom(byte[] data)static RecognitionConfigparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RecognitionConfigparseFrom(com.google.protobuf.ByteString data)static RecognitionConfigparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RecognitionConfigparseFrom(com.google.protobuf.CodedInputStream input)static RecognitionConfigparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RecognitionConfigparseFrom(InputStream input)static RecognitionConfigparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static RecognitionConfigparseFrom(ByteBuffer data)static RecognitionConfigparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<RecognitionConfig>parser()RecognitionConfig.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
AUTO_DECODING_CONFIG_FIELD_NUMBER
public static final int AUTO_DECODING_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXPLICIT_DECODING_CONFIG_FIELD_NUMBER
public static final int EXPLICIT_DECODING_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LANGUAGE_CODES_FIELD_NUMBER
public static final int LANGUAGE_CODES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FEATURES_FIELD_NUMBER
public static final int FEATURES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ADAPTATION_FIELD_NUMBER
public static final int ADAPTATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getDecodingConfigCase
public RecognitionConfig.DecodingConfigCase getDecodingConfigCase()
- Specified by:
getDecodingConfigCasein interfaceRecognitionConfigOrBuilder
-
hasAutoDecodingConfig
public boolean hasAutoDecodingConfig()
Automatically detect decoding parameters. Preferred for supported formats.
.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;- Specified by:
hasAutoDecodingConfigin interfaceRecognitionConfigOrBuilder- Returns:
- Whether the autoDecodingConfig field is set.
-
getAutoDecodingConfig
public AutoDetectDecodingConfig getAutoDecodingConfig()
Automatically detect decoding parameters. Preferred for supported formats.
.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;- Specified by:
getAutoDecodingConfigin interfaceRecognitionConfigOrBuilder- Returns:
- The autoDecodingConfig.
-
getAutoDecodingConfigOrBuilder
public AutoDetectDecodingConfigOrBuilder getAutoDecodingConfigOrBuilder()
Automatically detect decoding parameters. Preferred for supported formats.
.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;- Specified by:
getAutoDecodingConfigOrBuilderin interfaceRecognitionConfigOrBuilder
-
hasExplicitDecodingConfig
public boolean hasExplicitDecodingConfig()
Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
.google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;- Specified by:
hasExplicitDecodingConfigin interfaceRecognitionConfigOrBuilder- Returns:
- Whether the explicitDecodingConfig field is set.
-
getExplicitDecodingConfig
public ExplicitDecodingConfig getExplicitDecodingConfig()
Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
.google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;- Specified by:
getExplicitDecodingConfigin interfaceRecognitionConfigOrBuilder- Returns:
- The explicitDecodingConfig.
-
getExplicitDecodingConfigOrBuilder
public ExplicitDecodingConfigOrBuilder getExplicitDecodingConfigOrBuilder()
Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
.google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;- Specified by:
getExplicitDecodingConfigOrBuilderin interfaceRecognitionConfigOrBuilder
-
getModel
public String getModel()
Optional. Which model to use for recognition requests. Select the model best suited to your domain to get best results. Guidance for choosing which model to use can be found in the [Transcription Models Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model) and the models supported in each region can be found in the [Table Of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
string model = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelin interfaceRecognitionConfigOrBuilder- Returns:
- The model.
-
getModelBytes
public com.google.protobuf.ByteString getModelBytes()
Optional. Which model to use for recognition requests. Select the model best suited to your domain to get best results. Guidance for choosing which model to use can be found in the [Transcription Models Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model) and the models supported in each region can be found in the [Table Of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
string model = 9 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelBytesin interfaceRecognitionConfigOrBuilder- Returns:
- The bytes for model.
-
getLanguageCodesList
public com.google.protobuf.ProtocolStringList getLanguageCodesList()
Optional. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Language tags are normalized to BCP-47 before they are used eg "en-us" becomes "en-US". Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.
repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLanguageCodesListin interfaceRecognitionConfigOrBuilder- Returns:
- A list containing the languageCodes.
-
getLanguageCodesCount
public int getLanguageCodesCount()
Optional. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Language tags are normalized to BCP-47 before they are used eg "en-us" becomes "en-US". Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.
repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLanguageCodesCountin interfaceRecognitionConfigOrBuilder- Returns:
- The count of languageCodes.
-
getLanguageCodes
public String getLanguageCodes(int index)
Optional. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Language tags are normalized to BCP-47 before they are used eg "en-us" becomes "en-US". Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.
repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLanguageCodesin interfaceRecognitionConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The languageCodes at the given index.
-
getLanguageCodesBytes
public com.google.protobuf.ByteString getLanguageCodesBytes(int index)
Optional. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Language tags are normalized to BCP-47 before they are used eg "en-us" becomes "en-US". Supported languages for each model are listed in the [Table of Supported Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.
repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getLanguageCodesBytesin interfaceRecognitionConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the languageCodes at the given index.
-
hasFeatures
public boolean hasFeatures()
Speech recognition features to enable.
.google.cloud.speech.v2.RecognitionFeatures features = 2;- Specified by:
hasFeaturesin interfaceRecognitionConfigOrBuilder- Returns:
- Whether the features field is set.
-
getFeatures
public RecognitionFeatures getFeatures()
Speech recognition features to enable.
.google.cloud.speech.v2.RecognitionFeatures features = 2;- Specified by:
getFeaturesin interfaceRecognitionConfigOrBuilder- Returns:
- The features.
-
getFeaturesOrBuilder
public RecognitionFeaturesOrBuilder getFeaturesOrBuilder()
Speech recognition features to enable.
.google.cloud.speech.v2.RecognitionFeatures features = 2;- Specified by:
getFeaturesOrBuilderin interfaceRecognitionConfigOrBuilder
-
hasAdaptation
public boolean hasAdaptation()
Speech adaptation context that weights recognizer predictions for specific words and phrases.
.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;- Specified by:
hasAdaptationin interfaceRecognitionConfigOrBuilder- Returns:
- Whether the adaptation field is set.
-
getAdaptation
public SpeechAdaptation getAdaptation()
Speech adaptation context that weights recognizer predictions for specific words and phrases.
.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;- Specified by:
getAdaptationin interfaceRecognitionConfigOrBuilder- Returns:
- The adaptation.
-
getAdaptationOrBuilder
public SpeechAdaptationOrBuilder getAdaptationOrBuilder()
Speech adaptation context that weights recognizer predictions for specific words and phrases.
.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;- Specified by:
getAdaptationOrBuilderin interfaceRecognitionConfigOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static RecognitionConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RecognitionConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RecognitionConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RecognitionConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RecognitionConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RecognitionConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static RecognitionConfig parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static RecognitionConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static RecognitionConfig parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static RecognitionConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static RecognitionConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static RecognitionConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public RecognitionConfig.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static RecognitionConfig.Builder newBuilder()
-
newBuilder
public static RecognitionConfig.Builder newBuilder(RecognitionConfig prototype)
-
toBuilder
public RecognitionConfig.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected RecognitionConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static RecognitionConfig getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<RecognitionConfig> parser()
-
getParserForType
public com.google.protobuf.Parser<RecognitionConfig> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public RecognitionConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-