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.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
StreamingRecognitionFeatures
build()
StreamingRecognitionFeatures
buildPartial()
StreamingRecognitionFeatures.Builder
clear()
StreamingRecognitionFeatures.Builder
clearEnableVoiceActivityEvents()
If `true`, responses with voice activity speech events will be returned as they are detected.StreamingRecognitionFeatures.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
StreamingRecognitionFeatures.Builder
clearInterimResults()
Whether or not to stream interim results to the client.StreamingRecognitionFeatures.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
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.StreamingRecognitionFeatures.Builder
clone()
StreamingRecognitionFeatures
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
boolean
getEnableVoiceActivityEvents()
If `true`, responses with voice activity speech events will be returned as they are detected.boolean
getInterimResults()
Whether or not to stream interim results to the client.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.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.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.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
StreamingRecognitionFeatures.Builder
mergeFrom(StreamingRecognitionFeatures other)
StreamingRecognitionFeatures.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
StreamingRecognitionFeatures.Builder
mergeFrom(com.google.protobuf.Message other)
StreamingRecognitionFeatures.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
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.StreamingRecognitionFeatures.Builder
setEnableVoiceActivityEvents(boolean value)
If `true`, responses with voice activity speech events will be returned as they are detected.StreamingRecognitionFeatures.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
StreamingRecognitionFeatures.Builder
setInterimResults(boolean value)
Whether or not to stream interim results to the client.StreamingRecognitionFeatures.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
StreamingRecognitionFeatures.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
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.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.-
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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
clear
public StreamingRecognitionFeatures.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
getDefaultInstanceForType
public StreamingRecognitionFeatures getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public StreamingRecognitionFeatures build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public StreamingRecognitionFeatures buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public StreamingRecognitionFeatures.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
setField
public StreamingRecognitionFeatures.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
clearField
public StreamingRecognitionFeatures.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
clearOneof
public StreamingRecognitionFeatures.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
setRepeatedField
public StreamingRecognitionFeatures.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
addRepeatedField
public StreamingRecognitionFeatures.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
mergeFrom
public StreamingRecognitionFeatures.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<StreamingRecognitionFeatures.Builder>
-
mergeFrom
public StreamingRecognitionFeatures.Builder mergeFrom(StreamingRecognitionFeatures other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getEnableVoiceActivityEvents
in 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:
getInterimResults
in 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:
hasVoiceActivityTimeout
in 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:
getVoiceActivityTimeout
in 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:
getVoiceActivityTimeoutOrBuilder
in interfaceStreamingRecognitionFeaturesOrBuilder
-
setUnknownFields
public final StreamingRecognitionFeatures.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
mergeUnknownFields
public final StreamingRecognitionFeatures.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<StreamingRecognitionFeatures.Builder>
-
-