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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public StreamingRecognitionFeatures.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public StreamingRecognitionFeatures build()
Returns
buildPartial()
public StreamingRecognitionFeatures buildPartial()
Returns
clear()
public StreamingRecognitionFeatures.Builder clear()
Returns
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
clearField(Descriptors.FieldDescriptor field)
public StreamingRecognitionFeatures.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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
clearOneof(Descriptors.OneofDescriptor oneof)
public StreamingRecognitionFeatures.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
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
clone()
public StreamingRecognitionFeatures.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public StreamingRecognitionFeatures getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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
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
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
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
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(StreamingRecognitionFeatures other)
public StreamingRecognitionFeatures.Builder mergeFrom(StreamingRecognitionFeatures other)
Parameter
Returns
public StreamingRecognitionFeatures.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public StreamingRecognitionFeatures.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final StreamingRecognitionFeatures.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
Returns
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
setField(Descriptors.FieldDescriptor field, Object value)
public StreamingRecognitionFeatures.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public StreamingRecognitionFeatures.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final StreamingRecognitionFeatures.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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
Returns
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
Returns