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 type
google.cloud.speech.v2.RecognitionConfig| Modifier and Type | Class and Description |
|---|---|
static class |
RecognitionConfig.Builder
Provides information to the Recognizer that specifies how to process the
recognition request.
|
static class |
RecognitionConfig.DecodingConfigCase |
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| Modifier and Type | Field and Description |
|---|---|
static int |
ADAPTATION_FIELD_NUMBER |
static int |
AUTO_DECODING_CONFIG_FIELD_NUMBER |
static int |
EXPLICIT_DECODING_CONFIG_FIELD_NUMBER |
static int |
FEATURES_FIELD_NUMBER |
static int |
LANGUAGE_CODES_FIELD_NUMBER |
static int |
MODEL_FIELD_NUMBER |
static int |
TRANSCRIPT_NORMALIZATION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
SpeechAdaptation |
getAdaptation()
Speech adaptation context that weights recognizer predictions for specific
words and phrases.
|
SpeechAdaptationOrBuilder |
getAdaptationOrBuilder()
Speech adaptation context that weights recognizer predictions for specific
words and phrases.
|
AutoDetectDecodingConfig |
getAutoDecodingConfig()
Automatically detect decoding parameters.
|
AutoDetectDecodingConfigOrBuilder |
getAutoDecodingConfigOrBuilder()
Automatically detect decoding parameters.
|
RecognitionConfig.DecodingConfigCase |
getDecodingConfigCase() |
static RecognitionConfig |
getDefaultInstance() |
RecognitionConfig |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
ExplicitDecodingConfig |
getExplicitDecodingConfig()
Explicitly specified decoding parameters.
|
ExplicitDecodingConfigOrBuilder |
getExplicitDecodingConfigOrBuilder()
Explicitly specified decoding parameters.
|
RecognitionFeatures |
getFeatures()
Speech recognition features to enable.
|
RecognitionFeaturesOrBuilder |
getFeaturesOrBuilder()
Speech recognition features to enable.
|
String |
getLanguageCodes(int index)
Optional.
|
com.google.protobuf.ByteString |
getLanguageCodesBytes(int index)
Optional.
|
int |
getLanguageCodesCount()
Optional.
|
com.google.protobuf.ProtocolStringList |
getLanguageCodesList()
Optional.
|
String |
getModel()
Optional.
|
com.google.protobuf.ByteString |
getModelBytes()
Optional.
|
com.google.protobuf.Parser<RecognitionConfig> |
getParserForType() |
int |
getSerializedSize() |
TranscriptNormalization |
getTranscriptNormalization()
Optional.
|
TranscriptNormalizationOrBuilder |
getTranscriptNormalizationOrBuilder()
Optional.
|
boolean |
hasAdaptation()
Speech adaptation context that weights recognizer predictions for specific
words and phrases.
|
boolean |
hasAutoDecodingConfig()
Automatically detect decoding parameters.
|
boolean |
hasExplicitDecodingConfig()
Explicitly specified decoding parameters.
|
boolean |
hasFeatures()
Speech recognition features to enable.
|
int |
hashCode() |
boolean |
hasTranscriptNormalization()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RecognitionConfig.Builder |
newBuilder() |
static RecognitionConfig.Builder |
newBuilder(RecognitionConfig prototype) |
RecognitionConfig.Builder |
newBuilderForType() |
protected RecognitionConfig.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RecognitionConfig |
parseDelimitedFrom(InputStream input) |
static RecognitionConfig |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RecognitionConfig |
parseFrom(byte[] data) |
static RecognitionConfig |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RecognitionConfig |
parseFrom(ByteBuffer data) |
static RecognitionConfig |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RecognitionConfig |
parseFrom(com.google.protobuf.ByteString data) |
static RecognitionConfig |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RecognitionConfig |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RecognitionConfig |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RecognitionConfig |
parseFrom(InputStream input) |
static RecognitionConfig |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RecognitionConfig> |
parser() |
RecognitionConfig.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int AUTO_DECODING_CONFIG_FIELD_NUMBER
public static final int EXPLICIT_DECODING_CONFIG_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
public static final int LANGUAGE_CODES_FIELD_NUMBER
public static final int FEATURES_FIELD_NUMBER
public static final int ADAPTATION_FIELD_NUMBER
public static final int TRANSCRIPT_NORMALIZATION_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public RecognitionConfig.DecodingConfigCase getDecodingConfigCase()
getDecodingConfigCase in interface RecognitionConfigOrBuilderpublic boolean hasAutoDecodingConfig()
Automatically detect decoding parameters. Preferred for supported formats.
.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;hasAutoDecodingConfig in interface RecognitionConfigOrBuilderpublic AutoDetectDecodingConfig getAutoDecodingConfig()
Automatically detect decoding parameters. Preferred for supported formats.
.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;getAutoDecodingConfig in interface RecognitionConfigOrBuilderpublic AutoDetectDecodingConfigOrBuilder getAutoDecodingConfigOrBuilder()
Automatically detect decoding parameters. Preferred for supported formats.
.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;getAutoDecodingConfigOrBuilder in interface RecognitionConfigOrBuilderpublic boolean hasExplicitDecodingConfig()
Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
.google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;hasExplicitDecodingConfig in interface RecognitionConfigOrBuilderpublic ExplicitDecodingConfig getExplicitDecodingConfig()
Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
.google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;getExplicitDecodingConfig in interface RecognitionConfigOrBuilderpublic ExplicitDecodingConfigOrBuilder getExplicitDecodingConfigOrBuilder()
Explicitly specified decoding parameters. Required if using headerless PCM audio (linear16, mulaw, alaw).
.google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;getExplicitDecodingConfigOrBuilder in interface RecognitionConfigOrBuilderpublic 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];getModel in interface RecognitionConfigOrBuilderpublic 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];getModelBytes in interface RecognitionConfigOrBuilderpublic 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];getLanguageCodesList in interface RecognitionConfigOrBuilderpublic 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];getLanguageCodesCount in interface RecognitionConfigOrBuilderpublic 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];getLanguageCodes in interface RecognitionConfigOrBuilderindex - The index of the element to return.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];getLanguageCodesBytes in interface RecognitionConfigOrBuilderindex - The index of the value to return.public boolean hasFeatures()
Speech recognition features to enable.
.google.cloud.speech.v2.RecognitionFeatures features = 2;hasFeatures in interface RecognitionConfigOrBuilderpublic RecognitionFeatures getFeatures()
Speech recognition features to enable.
.google.cloud.speech.v2.RecognitionFeatures features = 2;getFeatures in interface RecognitionConfigOrBuilderpublic RecognitionFeaturesOrBuilder getFeaturesOrBuilder()
Speech recognition features to enable.
.google.cloud.speech.v2.RecognitionFeatures features = 2;getFeaturesOrBuilder in interface RecognitionConfigOrBuilderpublic boolean hasAdaptation()
Speech adaptation context that weights recognizer predictions for specific words and phrases.
.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;hasAdaptation in interface RecognitionConfigOrBuilderpublic SpeechAdaptation getAdaptation()
Speech adaptation context that weights recognizer predictions for specific words and phrases.
.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;getAdaptation in interface RecognitionConfigOrBuilderpublic SpeechAdaptationOrBuilder getAdaptationOrBuilder()
Speech adaptation context that weights recognizer predictions for specific words and phrases.
.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;getAdaptationOrBuilder in interface RecognitionConfigOrBuilderpublic boolean hasTranscriptNormalization()
Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.
.google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL];
hasTranscriptNormalization in interface RecognitionConfigOrBuilderpublic TranscriptNormalization getTranscriptNormalization()
Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.
.google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL];
getTranscriptNormalization in interface RecognitionConfigOrBuilderpublic TranscriptNormalizationOrBuilder getTranscriptNormalizationOrBuilder()
Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.
.google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL];
getTranscriptNormalizationOrBuilder in interface RecognitionConfigOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RecognitionConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RecognitionConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RecognitionConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RecognitionConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RecognitionConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RecognitionConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RecognitionConfig parseFrom(InputStream input) throws IOException
IOExceptionpublic static RecognitionConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RecognitionConfig parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RecognitionConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RecognitionConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RecognitionConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RecognitionConfig.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RecognitionConfig.Builder newBuilder()
public static RecognitionConfig.Builder newBuilder(RecognitionConfig prototype)
public RecognitionConfig.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RecognitionConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RecognitionConfig getDefaultInstance()
public static com.google.protobuf.Parser<RecognitionConfig> parser()
public com.google.protobuf.Parser<RecognitionConfig> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RecognitionConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.