Package com.google.cloud.speech.v2
Class StreamingRecognitionFeatures.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
- com.google.cloud.speech.v2.StreamingRecognitionFeatures.Builder
-
- All Implemented Interfaces:
StreamingRecognitionFeaturesOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- StreamingRecognitionFeatures
public static final class StreamingRecognitionFeatures.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder> implements StreamingRecognitionFeaturesOrBuilder
Available recognition features specific to streaming recognition requests.
Protobuf typegoogle.cloud.speech.v2.StreamingRecognitionFeatures
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamingRecognitionFeatures.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)StreamingRecognitionFeaturesbuild()StreamingRecognitionFeaturesbuildPartial()StreamingRecognitionFeatures.Builderclear()StreamingRecognitionFeatures.BuilderclearEnableVoiceActivityEvents()If `true`, responses with voice activity speech events will be returned as they are detected.StreamingRecognitionFeatures.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)StreamingRecognitionFeatures.BuilderclearInterimResults()Whether or not to stream interim results to the client.StreamingRecognitionFeatures.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)StreamingRecognitionFeatures.BuilderclearVoiceActivityTimeout()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.StreamingRecognitionFeatures.Builderclone()StreamingRecognitionFeaturesgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()booleangetEnableVoiceActivityEvents()If `true`, responses with voice activity speech events will be returned as they are detected.booleangetInterimResults()Whether or not to stream interim results to the client.StreamingRecognitionFeatures.VoiceActivityTimeoutgetVoiceActivityTimeout()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.StreamingRecognitionFeatures.VoiceActivityTimeout.BuildergetVoiceActivityTimeoutBuilder()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.StreamingRecognitionFeatures.VoiceActivityTimeoutOrBuildergetVoiceActivityTimeoutOrBuilder()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.booleanhasVoiceActivityTimeout()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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()StreamingRecognitionFeatures.BuildermergeFrom(StreamingRecognitionFeatures other)StreamingRecognitionFeatures.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)StreamingRecognitionFeatures.BuildermergeFrom(com.google.protobuf.Message other)StreamingRecognitionFeatures.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)StreamingRecognitionFeatures.BuildermergeVoiceActivityTimeout(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.StreamingRecognitionFeatures.BuildersetEnableVoiceActivityEvents(boolean value)If `true`, responses with voice activity speech events will be returned as they are detected.StreamingRecognitionFeatures.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)StreamingRecognitionFeatures.BuildersetInterimResults(boolean value)Whether or not to stream interim results to the client.StreamingRecognitionFeatures.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)StreamingRecognitionFeatures.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)StreamingRecognitionFeatures.BuildersetVoiceActivityTimeout(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.StreamingRecognitionFeatures.BuildersetVoiceActivityTimeout(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.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
clear
public StreamingRecognitionFeatures.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
getDefaultInstanceForType
public StreamingRecognitionFeatures getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public StreamingRecognitionFeatures build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public StreamingRecognitionFeatures buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public StreamingRecognitionFeatures.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
setField
public StreamingRecognitionFeatures.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
clearField
public StreamingRecognitionFeatures.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
clearOneof
public StreamingRecognitionFeatures.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
setRepeatedField
public StreamingRecognitionFeatures.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
addRepeatedField
public StreamingRecognitionFeatures.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
mergeFrom
public StreamingRecognitionFeatures.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StreamingRecognitionFeatures.Builder>
-
mergeFrom
public StreamingRecognitionFeatures.Builder mergeFrom(StreamingRecognitionFeatures other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
mergeFrom
public StreamingRecognitionFeatures.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StreamingRecognitionFeatures.Builder>- Throws:
IOException
-
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;- Specified by:
getEnableVoiceActivityEventsin interfaceStreamingRecognitionFeaturesOrBuilder- Returns:
- The enableVoiceActivityEvents.
-
setEnableVoiceActivityEvents
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;- Parameters:
value- The enableVoiceActivityEvents to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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;- Specified by:
getInterimResultsin interfaceStreamingRecognitionFeaturesOrBuilder- Returns:
- The interimResults.
-
setInterimResults
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;- Parameters:
value- The interimResults to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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;- Specified by:
hasVoiceActivityTimeoutin interfaceStreamingRecognitionFeaturesOrBuilder- Returns:
- Whether the voiceActivityTimeout field is set.
-
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;- Specified by:
getVoiceActivityTimeoutin interfaceStreamingRecognitionFeaturesOrBuilder- Returns:
- The voiceActivityTimeout.
-
setVoiceActivityTimeout
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
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;
-
mergeVoiceActivityTimeout
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;
-
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;
-
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;- Specified by:
getVoiceActivityTimeoutOrBuilderin interfaceStreamingRecognitionFeaturesOrBuilder
-
setUnknownFields
public final StreamingRecognitionFeatures.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
mergeUnknownFields
public final StreamingRecognitionFeatures.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
-