Class StreamingRecognitionFeatures.Builder (4.48.0)

public static final class StreamingRecognitionFeatures.Builder extends GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder> implements StreamingRecognitionFeaturesOrBuilder

Available recognition features specific to streaming recognition requests.

Protobuf type google.cloud.speech.v2.StreamingRecognitionFeatures

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingRecognitionFeatures build()
Returns
Type Description
StreamingRecognitionFeatures

buildPartial()

public StreamingRecognitionFeatures buildPartial()
Returns
Type Description
StreamingRecognitionFeatures

clear()

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

clearEnableVoiceActivityEvents()

public StreamingRecognitionFeatures.Builder clearEnableVoiceActivityEvents()

If true, responses with voice activity speech events will be returned as they are detected.

bool enable_voice_activity_events = 1;

Returns
Type Description
StreamingRecognitionFeatures.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearInterimResults()

public StreamingRecognitionFeatures.Builder clearInterimResults()

Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

bool interim_results = 2;

Returns
Type Description
StreamingRecognitionFeatures.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearVoiceActivityTimeout()

public StreamingRecognitionFeatures.Builder clearVoiceActivityTimeout()

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Returns
Type Description
StreamingRecognitionFeatures.Builder

clone()

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

getDefaultInstanceForType()

public StreamingRecognitionFeatures getDefaultInstanceForType()
Returns
Type Description
StreamingRecognitionFeatures

getDescriptorForType()

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

getEnableVoiceActivityEvents()

public boolean getEnableVoiceActivityEvents()

If true, responses with voice activity speech events will be returned as they are detected.

bool enable_voice_activity_events = 1;

Returns
Type Description
boolean

The enableVoiceActivityEvents.

getInterimResults()

public boolean getInterimResults()

Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

bool interim_results = 2;

Returns
Type Description
boolean

The interimResults.

getVoiceActivityTimeout()

public StreamingRecognitionFeatures.VoiceActivityTimeout getVoiceActivityTimeout()

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Returns
Type Description
StreamingRecognitionFeatures.VoiceActivityTimeout

The voiceActivityTimeout.

getVoiceActivityTimeoutBuilder()

public StreamingRecognitionFeatures.VoiceActivityTimeout.Builder getVoiceActivityTimeoutBuilder()

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Returns
Type Description
StreamingRecognitionFeatures.VoiceActivityTimeout.Builder

getVoiceActivityTimeoutOrBuilder()

public StreamingRecognitionFeatures.VoiceActivityTimeoutOrBuilder getVoiceActivityTimeoutOrBuilder()

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Returns
Type Description
StreamingRecognitionFeatures.VoiceActivityTimeoutOrBuilder

hasVoiceActivityTimeout()

public boolean hasVoiceActivityTimeout()

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Returns
Type Description
boolean

Whether the voiceActivityTimeout field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StreamingRecognitionFeatures other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeVoiceActivityTimeout(StreamingRecognitionFeatures.VoiceActivityTimeout value)

public StreamingRecognitionFeatures.Builder mergeVoiceActivityTimeout(StreamingRecognitionFeatures.VoiceActivityTimeout value)

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Parameter
Name Description
value StreamingRecognitionFeatures.VoiceActivityTimeout
Returns
Type Description
StreamingRecognitionFeatures.Builder

setEnableVoiceActivityEvents(boolean value)

public StreamingRecognitionFeatures.Builder setEnableVoiceActivityEvents(boolean value)

If true, responses with voice activity speech events will be returned as they are detected.

bool enable_voice_activity_events = 1;

Parameter
Name Description
value boolean

The enableVoiceActivityEvents to set.

Returns
Type Description
StreamingRecognitionFeatures.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setInterimResults(boolean value)

public StreamingRecognitionFeatures.Builder setInterimResults(boolean value)

Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

bool interim_results = 2;

Parameter
Name Description
value boolean

The interimResults to set.

Returns
Type Description
StreamingRecognitionFeatures.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setVoiceActivityTimeout(StreamingRecognitionFeatures.VoiceActivityTimeout value)

public StreamingRecognitionFeatures.Builder setVoiceActivityTimeout(StreamingRecognitionFeatures.VoiceActivityTimeout value)

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Parameter
Name Description
value StreamingRecognitionFeatures.VoiceActivityTimeout
Returns
Type Description
StreamingRecognitionFeatures.Builder

setVoiceActivityTimeout(StreamingRecognitionFeatures.VoiceActivityTimeout.Builder builderForValue)

public StreamingRecognitionFeatures.Builder setVoiceActivityTimeout(StreamingRecognitionFeatures.VoiceActivityTimeout.Builder builderForValue)

If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

.google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;

Parameter
Name Description
builderForValue StreamingRecognitionFeatures.VoiceActivityTimeout.Builder
Returns
Type Description
StreamingRecognitionFeatures.Builder