Class StreamingRecognizeRequest.Builder (4.38.0)

public static final class StreamingRecognizeRequest.Builder extends GeneratedMessageV3.Builder<StreamingRecognizeRequest.Builder> implements StreamingRecognizeRequestOrBuilder

The top-level message sent by the client for the StreamingRecognize method. Multiple StreamingRecognizeRequest messages are sent. The first message must contain a streaming_config message and must not contain audio_content. All subsequent messages must contain audio_content and must not contain a streaming_config message.

Protobuf type google.cloud.speech.v1.StreamingRecognizeRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingRecognizeRequest build()
Returns
Type Description
StreamingRecognizeRequest

buildPartial()

public StreamingRecognizeRequest buildPartial()
Returns
Type Description
StreamingRecognizeRequest

clear()

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

clearAudioContent()

public StreamingRecognizeRequest.Builder clearAudioContent()

The audio data to be recognized. Sequential chunks of audio data are sent in sequential StreamingRecognizeRequest messages. The first StreamingRecognizeRequest message must not contain audio_content data and all subsequent StreamingRecognizeRequest messages must contain audio_content data. The audio bytes must be encoded as specified in RecognitionConfig. Note: as with all bytes fields, proto buffers use a pure binary representation (not base64). See content limits.

bytes audio_content = 2;

Returns
Type Description
StreamingRecognizeRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearStreamingConfig()

public StreamingRecognizeRequest.Builder clearStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Returns
Type Description
StreamingRecognizeRequest.Builder

clearStreamingRequest()

public StreamingRecognizeRequest.Builder clearStreamingRequest()
Returns
Type Description
StreamingRecognizeRequest.Builder

clone()

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

getAudioContent()

public ByteString getAudioContent()

The audio data to be recognized. Sequential chunks of audio data are sent in sequential StreamingRecognizeRequest messages. The first StreamingRecognizeRequest message must not contain audio_content data and all subsequent StreamingRecognizeRequest messages must contain audio_content data. The audio bytes must be encoded as specified in RecognitionConfig. Note: as with all bytes fields, proto buffers use a pure binary representation (not base64). See content limits.

bytes audio_content = 2;

Returns
Type Description
ByteString

The audioContent.

getDefaultInstanceForType()

public StreamingRecognizeRequest getDefaultInstanceForType()
Returns
Type Description
StreamingRecognizeRequest

getDescriptorForType()

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

getStreamingConfig()

public StreamingRecognitionConfig getStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Returns
Type Description
StreamingRecognitionConfig

The streamingConfig.

getStreamingConfigBuilder()

public StreamingRecognitionConfig.Builder getStreamingConfigBuilder()

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Returns
Type Description
StreamingRecognitionConfig.Builder

getStreamingConfigOrBuilder()

public StreamingRecognitionConfigOrBuilder getStreamingConfigOrBuilder()

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Returns
Type Description
StreamingRecognitionConfigOrBuilder

getStreamingRequestCase()

public StreamingRecognizeRequest.StreamingRequestCase getStreamingRequestCase()
Returns
Type Description
StreamingRecognizeRequest.StreamingRequestCase

hasAudioContent()

public boolean hasAudioContent()

The audio data to be recognized. Sequential chunks of audio data are sent in sequential StreamingRecognizeRequest messages. The first StreamingRecognizeRequest message must not contain audio_content data and all subsequent StreamingRecognizeRequest messages must contain audio_content data. The audio bytes must be encoded as specified in RecognitionConfig. Note: as with all bytes fields, proto buffers use a pure binary representation (not base64). See content limits.

bytes audio_content = 2;

Returns
Type Description
boolean

Whether the audioContent field is set.

hasStreamingConfig()

public boolean hasStreamingConfig()

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Returns
Type Description
boolean

Whether the streamingConfig field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StreamingRecognizeRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeStreamingConfig(StreamingRecognitionConfig value)

public StreamingRecognizeRequest.Builder mergeStreamingConfig(StreamingRecognitionConfig value)

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Parameter
Name Description
value StreamingRecognitionConfig
Returns
Type Description
StreamingRecognizeRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAudioContent(ByteString value)

public StreamingRecognizeRequest.Builder setAudioContent(ByteString value)

The audio data to be recognized. Sequential chunks of audio data are sent in sequential StreamingRecognizeRequest messages. The first StreamingRecognizeRequest message must not contain audio_content data and all subsequent StreamingRecognizeRequest messages must contain audio_content data. The audio bytes must be encoded as specified in RecognitionConfig. Note: as with all bytes fields, proto buffers use a pure binary representation (not base64). See content limits.

bytes audio_content = 2;

Parameter
Name Description
value ByteString

The audioContent to set.

Returns
Type Description
StreamingRecognizeRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setStreamingConfig(StreamingRecognitionConfig value)

public StreamingRecognizeRequest.Builder setStreamingConfig(StreamingRecognitionConfig value)

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Parameter
Name Description
value StreamingRecognitionConfig
Returns
Type Description
StreamingRecognizeRequest.Builder

setStreamingConfig(StreamingRecognitionConfig.Builder builderForValue)

public StreamingRecognizeRequest.Builder setStreamingConfig(StreamingRecognitionConfig.Builder builderForValue)

Provides information to the recognizer that specifies how to process the request. The first StreamingRecognizeRequest message must contain a streaming_config message.

.google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;

Parameter
Name Description
builderForValue StreamingRecognitionConfig.Builder
Returns
Type Description
StreamingRecognizeRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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