Class StreamingRecognitionFeatures.Builder (4.29.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingRecognitionFeatures build()
Returns
TypeDescription
StreamingRecognitionFeatures

buildPartial()

public StreamingRecognitionFeatures buildPartial()
Returns
TypeDescription
StreamingRecognitionFeatures

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public StreamingRecognitionFeatures.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
StreamingRecognitionFeatures.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public StreamingRecognitionFeatures.Builder clone()
Returns
TypeDescription
StreamingRecognitionFeatures.Builder
Overrides

getDefaultInstanceForType()

public StreamingRecognitionFeatures getDefaultInstanceForType()
Returns
TypeDescription
StreamingRecognitionFeatures

getDescriptorForType()

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

Whether the voiceActivityTimeout field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(StreamingRecognitionFeatures other)

public StreamingRecognitionFeatures.Builder mergeFrom(StreamingRecognitionFeatures other)
Parameter
NameDescription
otherStreamingRecognitionFeatures
Returns
TypeDescription
StreamingRecognitionFeatures.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public StreamingRecognitionFeatures.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
StreamingRecognitionFeatures.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamingRecognitionFeatures.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueStreamingRecognitionFeatures.VoiceActivityTimeout
Returns
TypeDescription
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
NameDescription
valueboolean

The enableVoiceActivityEvents to set.

Returns
TypeDescription
StreamingRecognitionFeatures.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public StreamingRecognitionFeatures.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The interimResults to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
StreamingRecognitionFeatures.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final StreamingRecognitionFeatures.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueStreamingRecognitionFeatures.VoiceActivityTimeout
Returns
TypeDescription
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
NameDescription
builderForValueStreamingRecognitionFeatures.VoiceActivityTimeout.Builder
Returns
TypeDescription
StreamingRecognitionFeatures.Builder