public static final class StreamingRecognitionResult.Builder extends GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder> implements StreamingRecognitionResultOrBuilder
A streaming speech recognition result corresponding to a portion of the audio that is currently being processed.Protobuf type
google.cloud.speech.v1p1beta1.StreamingRecognitionResultgetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder clear()
clear in interface Message.Builderclear in interface MessageLite.Builderclear in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic StreamingRecognitionResult build()
build in interface Message.Builderbuild in interface MessageLite.Builderpublic StreamingRecognitionResult buildPartial()
buildPartial in interface Message.BuilderbuildPartial in interface MessageLite.Builderpublic StreamingRecognitionResult.Builder clone()
clone in interface Message.Builderclone in interface MessageLite.Builderclone in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface Message.BuildersetField in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder clearField(Descriptors.FieldDescriptor field)
clearField in interface Message.BuilderclearField in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof in interface Message.BuilderclearOneof in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface Message.BuildersetRepeatedField in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface Message.BuilderaddRepeatedField in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder mergeFrom(Message other)
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder mergeFrom(StreamingRecognitionResult other)
public final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public StreamingRecognitionResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface Message.BuildermergeFrom in interface MessageLite.BuildermergeFrom in class AbstractMessage.Builder<StreamingRecognitionResult.Builder>java.io.IOExceptionpublic java.util.List<SpeechRecognitionAlternative> getAlternativesList()
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;getAlternativesList in interface StreamingRecognitionResultOrBuilderpublic int getAlternativesCount()
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;getAlternativesCount in interface StreamingRecognitionResultOrBuilderpublic SpeechRecognitionAlternative getAlternatives(int index)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;getAlternatives in interface StreamingRecognitionResultOrBuilderpublic StreamingRecognitionResult.Builder setAlternatives(int index, SpeechRecognitionAlternative value)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder addAlternatives(SpeechRecognitionAlternative value)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder addAlternatives(int index, SpeechRecognitionAlternative value)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder addAllAlternatives(java.lang.Iterable<? extends SpeechRecognitionAlternative> values)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder clearAlternatives()
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public StreamingRecognitionResult.Builder removeAlternatives(int index)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public SpeechRecognitionAlternative.Builder getAlternativesBuilder(int index)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;getAlternativesOrBuilder in interface StreamingRecognitionResultOrBuilderpublic java.util.List<? extends SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList()
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;getAlternativesOrBuilderList in interface StreamingRecognitionResultOrBuilderpublic SpeechRecognitionAlternative.Builder addAlternativesBuilder()
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public SpeechRecognitionAlternative.Builder addAlternativesBuilder(int index)
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public java.util.List<SpeechRecognitionAlternative.Builder> getAlternativesBuilderList()
Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;public boolean getIsFinal()
Output only. If `false`, this `StreamingRecognitionResult` represents an interim result that may change. If `true`, this is the final time the speech service will return this particular `StreamingRecognitionResult`, the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.
bool is_final = 2;getIsFinal in interface StreamingRecognitionResultOrBuilderpublic StreamingRecognitionResult.Builder setIsFinal(boolean value)
Output only. If `false`, this `StreamingRecognitionResult` represents an interim result that may change. If `true`, this is the final time the speech service will return this particular `StreamingRecognitionResult`, the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.
bool is_final = 2;public StreamingRecognitionResult.Builder clearIsFinal()
Output only. If `false`, this `StreamingRecognitionResult` represents an interim result that may change. If `true`, this is the final time the speech service will return this particular `StreamingRecognitionResult`, the recognizer will not return any further hypotheses for this portion of the transcript and corresponding audio.
bool is_final = 2;public float getStability()
Output only. An estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results (`is_final=false`). The default of 0.0 is a sentinel value indicating `stability` was not set.
float stability = 3;getStability in interface StreamingRecognitionResultOrBuilderpublic StreamingRecognitionResult.Builder setStability(float value)
Output only. An estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results (`is_final=false`). The default of 0.0 is a sentinel value indicating `stability` was not set.
float stability = 3;public StreamingRecognitionResult.Builder clearStability()
Output only. An estimate of the likelihood that the recognizer will not change its guess about this interim result. Values range from 0.0 (completely unstable) to 1.0 (completely stable). This field is only provided for interim results (`is_final=false`). The default of 0.0 is a sentinel value indicating `stability` was not set.
float stability = 3;public final StreamingRecognitionResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields in interface Message.BuildersetUnknownFields in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>public final StreamingRecognitionResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields in interface Message.BuildermergeUnknownFields in class GeneratedMessageV3.Builder<StreamingRecognitionResult.Builder>