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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public StreamingRecognitionFeatures.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public StreamingRecognitionFeatures build()
buildPartial()
public StreamingRecognitionFeatures buildPartial()
clear()
public StreamingRecognitionFeatures.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public StreamingRecognitionFeatures.Builder clearField(Descriptors.FieldDescriptor field)
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public StreamingRecognitionFeatures.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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;
clone()
public StreamingRecognitionFeatures.Builder clone()
Overrides
getDefaultInstanceForType()
public StreamingRecognitionFeatures getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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;
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;
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;
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(StreamingRecognitionFeatures other)
public StreamingRecognitionFeatures.Builder mergeFrom(StreamingRecognitionFeatures other)
public StreamingRecognitionFeatures.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public StreamingRecognitionFeatures.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final StreamingRecognitionFeatures.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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.
|
setField(Descriptors.FieldDescriptor field, Object value)
public StreamingRecognitionFeatures.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public StreamingRecognitionFeatures.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final StreamingRecognitionFeatures.Builder setUnknownFields(UnknownFieldSet unknownFields)
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;
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;