Class RecognitionConfig (4.13.0)

public final class RecognitionConfig extends GeneratedMessageV3 implements RecognitionConfigOrBuilder

Provides information to the Recognizer that specifies how to process the recognition request.

Protobuf type google.cloud.speech.v2.RecognitionConfig

Static Fields

ADAPTATION_FIELD_NUMBER

public static final int ADAPTATION_FIELD_NUMBER
Field Value
TypeDescription
int

AUTO_DECODING_CONFIG_FIELD_NUMBER

public static final int AUTO_DECODING_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

EXPLICIT_DECODING_CONFIG_FIELD_NUMBER

public static final int EXPLICIT_DECODING_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

FEATURES_FIELD_NUMBER

public static final int FEATURES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RecognitionConfig getDefaultInstance()
Returns
TypeDescription
RecognitionConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static RecognitionConfig.Builder newBuilder()
Returns
TypeDescription
RecognitionConfig.Builder

newBuilder(RecognitionConfig prototype)

public static RecognitionConfig.Builder newBuilder(RecognitionConfig prototype)
Parameter
NameDescription
prototypeRecognitionConfig
Returns
TypeDescription
RecognitionConfig.Builder

parseDelimitedFrom(InputStream input)

public static RecognitionConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RecognitionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static RecognitionConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RecognitionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RecognitionConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RecognitionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RecognitionConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RecognitionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static RecognitionConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RecognitionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static RecognitionConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RecognitionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecognitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<RecognitionConfig> parser()
Returns
TypeDescription
Parser<RecognitionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAdaptation()

public SpeechAdaptation getAdaptation()

Speech adaptation context that weights recognizer predictions for specific words and phrases.

.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;

Returns
TypeDescription
SpeechAdaptation

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;

Returns
TypeDescription
SpeechAdaptationOrBuilder

getAutoDecodingConfig()

public AutoDetectDecodingConfig getAutoDecodingConfig()

Automatically detect decoding parameters. Preferred for supported formats.

.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;

Returns
TypeDescription
AutoDetectDecodingConfig

The autoDecodingConfig.

getAutoDecodingConfigOrBuilder()

public AutoDetectDecodingConfigOrBuilder getAutoDecodingConfigOrBuilder()

Automatically detect decoding parameters. Preferred for supported formats.

.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;

Returns
TypeDescription
AutoDetectDecodingConfigOrBuilder

getDecodingConfigCase()

public RecognitionConfig.DecodingConfigCase getDecodingConfigCase()
Returns
TypeDescription
RecognitionConfig.DecodingConfigCase

getDefaultInstanceForType()

public RecognitionConfig getDefaultInstanceForType()
Returns
TypeDescription
RecognitionConfig

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;

Returns
TypeDescription
ExplicitDecodingConfig

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;

Returns
TypeDescription
ExplicitDecodingConfigOrBuilder

getFeatures()

public RecognitionFeatures getFeatures()

Speech recognition features to enable.

.google.cloud.speech.v2.RecognitionFeatures features = 2;

Returns
TypeDescription
RecognitionFeatures

The features.

getFeaturesOrBuilder()

public RecognitionFeaturesOrBuilder getFeaturesOrBuilder()

Speech recognition features to enable.

.google.cloud.speech.v2.RecognitionFeatures features = 2;

Returns
TypeDescription
RecognitionFeaturesOrBuilder

getParserForType()

public Parser<RecognitionConfig> getParserForType()
Returns
TypeDescription
Parser<RecognitionConfig>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasAdaptation()

public boolean hasAdaptation()

Speech adaptation context that weights recognizer predictions for specific words and phrases.

.google.cloud.speech.v2.SpeechAdaptation adaptation = 6;

Returns
TypeDescription
boolean

Whether the adaptation field is set.

hasAutoDecodingConfig()

public boolean hasAutoDecodingConfig()

Automatically detect decoding parameters. Preferred for supported formats.

.google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;

Returns
TypeDescription
boolean

Whether the autoDecodingConfig field is set.

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;

Returns
TypeDescription
boolean

Whether the explicitDecodingConfig field is set.

hasFeatures()

public boolean hasFeatures()

Speech recognition features to enable.

.google.cloud.speech.v2.RecognitionFeatures features = 2;

Returns
TypeDescription
boolean

Whether the features field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public RecognitionConfig.Builder newBuilderForType()
Returns
TypeDescription
RecognitionConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RecognitionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
RecognitionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public RecognitionConfig.Builder toBuilder()
Returns
TypeDescription
RecognitionConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException