public static final class SpeechRecognitionResult.Builder extends GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder> implements SpeechRecognitionResultOrBuilder
A speech recognition result corresponding to a portion of the audio.
Protobuf type google.cloud.speech.v1beta1.SpeechRecognitionResult
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)
public SpeechRecognitionResult.Builder addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative>
|
Returns
addAlternatives(SpeechRecognitionAlternative value)
public SpeechRecognitionResult.Builder addAlternatives(SpeechRecognitionAlternative value)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)
public SpeechRecognitionResult.Builder addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
addAlternatives(int index, SpeechRecognitionAlternative value)
public SpeechRecognitionResult.Builder addAlternatives(int index, SpeechRecognitionAlternative value)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameters
Returns
addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
public SpeechRecognitionResult.Builder addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameters
Returns
addAlternativesBuilder()
public SpeechRecognitionAlternative.Builder addAlternativesBuilder()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Returns
addAlternativesBuilder(int index)
public SpeechRecognitionAlternative.Builder addAlternativesBuilder(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SpeechRecognitionResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public SpeechRecognitionResult build()
Returns
buildPartial()
public SpeechRecognitionResult buildPartial()
Returns
clear()
public SpeechRecognitionResult.Builder clear()
Returns
Overrides
clearAlternatives()
public SpeechRecognitionResult.Builder clearAlternatives()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Returns
clearField(Descriptors.FieldDescriptor field)
public SpeechRecognitionResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public SpeechRecognitionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public SpeechRecognitionResult.Builder clone()
Returns
Overrides
getAlternatives(int index)
public SpeechRecognitionAlternative getAlternatives(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
getAlternativesBuilder(int index)
public SpeechRecognitionAlternative.Builder getAlternativesBuilder(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
getAlternativesBuilderList()
public List<SpeechRecognitionAlternative.Builder> getAlternativesBuilderList()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Returns
getAlternativesCount()
public int getAlternativesCount()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Returns
getAlternativesList()
public List<SpeechRecognitionAlternative> getAlternativesList()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Returns
getAlternativesOrBuilder(int index)
public SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
getAlternativesOrBuilderList()
public List<? extends SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Returns
Type | Description |
List<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> | |
getDefaultInstanceForType()
public SpeechRecognitionResult getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(SpeechRecognitionResult other)
public SpeechRecognitionResult.Builder mergeFrom(SpeechRecognitionResult other)
Parameter
Returns
public SpeechRecognitionResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public SpeechRecognitionResult.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SpeechRecognitionResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeAlternatives(int index)
public SpeechRecognitionResult.Builder removeAlternatives(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameter
Returns
setAlternatives(int index, SpeechRecognitionAlternative value)
public SpeechRecognitionResult.Builder setAlternatives(int index, SpeechRecognitionAlternative value)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameters
Returns
setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
public SpeechRecognitionResult.Builder setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
Parameters
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public SpeechRecognitionResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SpeechRecognitionResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final SpeechRecognitionResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides