Class SpeechRecognitionResult.Builder (2.2.15)

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
TypeDescription
Descriptor

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
NameDescription
valuesIterable<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternative>
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
NameDescription
valueSpeechRecognitionAlternative
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
NameDescription
builderForValueSpeechRecognitionAlternative.Builder
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
NameDescription
indexint
valueSpeechRecognitionAlternative
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
NameDescription
indexint
builderForValueSpeechRecognitionAlternative.Builder
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
TypeDescription
SpeechRecognitionAlternative.Builder

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
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternative.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SpeechRecognitionResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides

build()

public SpeechRecognitionResult build()
Returns
TypeDescription
SpeechRecognitionResult

buildPartial()

public SpeechRecognitionResult buildPartial()
Returns
TypeDescription
SpeechRecognitionResult

clear()

public SpeechRecognitionResult.Builder clear()
Returns
TypeDescription
SpeechRecognitionResult.Builder
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
TypeDescription
SpeechRecognitionResult.Builder

clearField(Descriptors.FieldDescriptor field)

public SpeechRecognitionResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SpeechRecognitionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides

clone()

public SpeechRecognitionResult.Builder clone()
Returns
TypeDescription
SpeechRecognitionResult.Builder
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
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternative

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
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternative.Builder

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
TypeDescription
List<Builder>

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
TypeDescription
int

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
TypeDescription
List<SpeechRecognitionAlternative>

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
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternativeOrBuilder

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
TypeDescription
List<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder>

getDefaultInstanceForType()

public SpeechRecognitionResult getDefaultInstanceForType()
Returns
TypeDescription
SpeechRecognitionResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SpeechRecognitionResult other)

public SpeechRecognitionResult.Builder mergeFrom(SpeechRecognitionResult other)
Parameter
NameDescription
otherSpeechRecognitionResult
Returns
TypeDescription
SpeechRecognitionResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SpeechRecognitionResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SpeechRecognitionResult.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SpeechRecognitionResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SpeechRecognitionResult.Builder
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
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
NameDescription
indexint
valueSpeechRecognitionAlternative
Returns
TypeDescription
SpeechRecognitionResult.Builder

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
NameDescription
indexint
builderForValueSpeechRecognitionAlternative.Builder
Returns
TypeDescription
SpeechRecognitionResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SpeechRecognitionResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SpeechRecognitionResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SpeechRecognitionResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SpeechRecognitionResult.Builder
Overrides