public static final class StreamingRecognitionFeatures.Builder extends com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder> implements StreamingRecognitionFeaturesOrBuilder
Available recognition features specific to streaming recognition requests.Protobuf type
google.cloud.speech.v2.StreamingRecognitionFeatures| Modifier and Type | Method and Description |
|---|---|
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 |
clearInterimResults()
Whether or not to stream interim results to the client.
|
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 |
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.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
StreamingRecognitionFeatures.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
StreamingRecognitionFeatures.Builder |
mergeFrom(com.google.protobuf.Message other) |
StreamingRecognitionFeatures.Builder |
mergeFrom(StreamingRecognitionFeatures other) |
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 |
setInterimResults(boolean value)
Whether or not to stream interim results to the client.
|
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.
|
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.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder>public StreamingRecognitionFeatures.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder>public StreamingRecognitionFeatures getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic StreamingRecognitionFeatures build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic StreamingRecognitionFeatures buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic StreamingRecognitionFeatures.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamingRecognitionFeatures.Builder>public StreamingRecognitionFeatures.Builder mergeFrom(StreamingRecognitionFeatures other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder>public StreamingRecognitionFeatures.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<StreamingRecognitionFeatures.Builder>IOExceptionpublic boolean getEnableVoiceActivityEvents()
If `true`, responses with voice activity speech events will be returned as they are detected.
bool enable_voice_activity_events = 1;getEnableVoiceActivityEvents in interface StreamingRecognitionFeaturesOrBuilderpublic 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;value - The enableVoiceActivityEvents to set.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;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;getInterimResults in interface StreamingRecognitionFeaturesOrBuilderpublic 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;value - The interimResults to set.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;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;
hasVoiceActivityTimeout in interface StreamingRecognitionFeaturesOrBuilderpublic 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;
getVoiceActivityTimeout in interface StreamingRecognitionFeaturesOrBuilderpublic 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;
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;
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;
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;
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;
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;
getVoiceActivityTimeoutOrBuilder in interface StreamingRecognitionFeaturesOrBuilderCopyright © 2026 Google LLC. All rights reserved.