Class RecognizeRequest.Builder (4.38.0)

public static final class RecognizeRequest.Builder extends GeneratedMessageV3.Builder<RecognizeRequest.Builder> implements RecognizeRequestOrBuilder

The top-level message sent by the client for the Recognize method.

Protobuf type google.cloud.speech.v1.RecognizeRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RecognizeRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RecognizeRequest.Builder
Overrides

build()

public RecognizeRequest build()
Returns
Type Description
RecognizeRequest

buildPartial()

public RecognizeRequest buildPartial()
Returns
Type Description
RecognizeRequest

clear()

public RecognizeRequest.Builder clear()
Returns
Type Description
RecognizeRequest.Builder
Overrides

clearAudio()

public RecognizeRequest.Builder clearAudio()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognizeRequest.Builder

clearConfig()

public RecognizeRequest.Builder clearConfig()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognizeRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public RecognizeRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
RecognizeRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public RecognizeRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
RecognizeRequest.Builder
Overrides

clone()

public RecognizeRequest.Builder clone()
Returns
Type Description
RecognizeRequest.Builder
Overrides

getAudio()

public RecognitionAudio getAudio()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognitionAudio

The audio.

getAudioBuilder()

public RecognitionAudio.Builder getAudioBuilder()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognitionAudio.Builder

getAudioOrBuilder()

public RecognitionAudioOrBuilder getAudioOrBuilder()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognitionAudioOrBuilder

getConfig()

public RecognitionConfig getConfig()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognitionConfig

The config.

getConfigBuilder()

public RecognitionConfig.Builder getConfigBuilder()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognitionConfig.Builder

getConfigOrBuilder()

public RecognitionConfigOrBuilder getConfigOrBuilder()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RecognitionConfigOrBuilder

getDefaultInstanceForType()

public RecognizeRequest getDefaultInstanceForType()
Returns
Type Description
RecognizeRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

hasAudio()

public boolean hasAudio()

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the audio field is set.

hasConfig()

public boolean hasConfig()

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the config field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAudio(RecognitionAudio value)

public RecognizeRequest.Builder mergeAudio(RecognitionAudio value)

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RecognitionAudio
Returns
Type Description
RecognizeRequest.Builder

mergeConfig(RecognitionConfig value)

public RecognizeRequest.Builder mergeConfig(RecognitionConfig value)

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RecognitionConfig
Returns
Type Description
RecognizeRequest.Builder

mergeFrom(RecognizeRequest other)

public RecognizeRequest.Builder mergeFrom(RecognizeRequest other)
Parameter
Name Description
other RecognizeRequest
Returns
Type Description
RecognizeRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RecognizeRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RecognizeRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RecognizeRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RecognizeRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RecognizeRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RecognizeRequest.Builder
Overrides

setAudio(RecognitionAudio value)

public RecognizeRequest.Builder setAudio(RecognitionAudio value)

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RecognitionAudio
Returns
Type Description
RecognizeRequest.Builder

setAudio(RecognitionAudio.Builder builderForValue)

public RecognizeRequest.Builder setAudio(RecognitionAudio.Builder builderForValue)

Required. The audio data to be recognized.

.google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue RecognitionAudio.Builder
Returns
Type Description
RecognizeRequest.Builder

setConfig(RecognitionConfig value)

public RecognizeRequest.Builder setConfig(RecognitionConfig value)

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RecognitionConfig
Returns
Type Description
RecognizeRequest.Builder

setConfig(RecognitionConfig.Builder builderForValue)

public RecognizeRequest.Builder setConfig(RecognitionConfig.Builder builderForValue)

Required. Provides information to the recognizer that specifies how to process the request.

.google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue RecognitionConfig.Builder
Returns
Type Description
RecognizeRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public RecognizeRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RecognizeRequest.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public RecognizeRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RecognizeRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final RecognizeRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RecognizeRequest.Builder
Overrides