Class StreamingRecognizeRequest.Builder (4.12.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StreamingRecognizeRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StreamingRecognizeRequest.Builder
Overrides

build()

public StreamingRecognizeRequest build()
Returns
TypeDescription
StreamingRecognizeRequest

buildPartial()

public StreamingRecognizeRequest buildPartial()
Returns
TypeDescription
StreamingRecognizeRequest

clear()

public StreamingRecognizeRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
StreamingRecognizeRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public StreamingRecognizeRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
StreamingRecognizeRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public StreamingRecognizeRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
StreamingRecognizeRequest.Builder

clearStreamingRequest()

public StreamingRecognizeRequest.Builder clearStreamingRequest()
Returns
TypeDescription
StreamingRecognizeRequest.Builder

clone()

public StreamingRecognizeRequest.Builder clone()
Returns
TypeDescription
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
TypeDescription
ByteString

The audioContent.

getDefaultInstanceForType()

public StreamingRecognizeRequest getDefaultInstanceForType()
Returns
TypeDescription
StreamingRecognizeRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
StreamingRecognitionConfigOrBuilder

getStreamingRequestCase()

public StreamingRecognizeRequest.StreamingRequestCase getStreamingRequestCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the streamingConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(StreamingRecognizeRequest other)

public StreamingRecognizeRequest.Builder mergeFrom(StreamingRecognizeRequest other)
Parameter
NameDescription
otherStreamingRecognizeRequest
Returns
TypeDescription
StreamingRecognizeRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public StreamingRecognizeRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingRecognizeRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public StreamingRecognizeRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueStreamingRecognitionConfig
Returns
TypeDescription
StreamingRecognizeRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamingRecognizeRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueByteString

The audioContent to set.

Returns
TypeDescription
StreamingRecognizeRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public StreamingRecognizeRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StreamingRecognizeRequest.Builder
Overrides

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

public StreamingRecognizeRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueStreamingRecognitionConfig
Returns
TypeDescription
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
NameDescription
builderForValueStreamingRecognitionConfig.Builder
Returns
TypeDescription
StreamingRecognizeRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final StreamingRecognizeRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
StreamingRecognizeRequest.Builder
Overrides