Class SpeechTranscription.Builder (2.2.0)

public static final class SpeechTranscription.Builder extends GeneratedMessageV3.Builder<SpeechTranscription.Builder> implements SpeechTranscriptionOrBuilder

A speech recognition result corresponding to a portion of the audio.

Protobuf type google.cloud.videointelligence.v1p1beta1.SpeechTranscription

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)

public SpeechTranscription.Builder addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternative>
Returns
TypeDescription
SpeechTranscription.Builder

addAlternatives(SpeechRecognitionAlternative value)

public SpeechTranscription.Builder addAlternatives(SpeechRecognitionAlternative value)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
valueSpeechRecognitionAlternative
Returns
TypeDescription
SpeechTranscription.Builder

addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)

public SpeechTranscription.Builder addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
builderForValueSpeechRecognitionAlternative.Builder
Returns
TypeDescription
SpeechTranscription.Builder

addAlternatives(int index, SpeechRecognitionAlternative value)

public SpeechTranscription.Builder addAlternatives(int index, SpeechRecognitionAlternative value)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameters
NameDescription
indexint
valueSpeechRecognitionAlternative
Returns
TypeDescription
SpeechTranscription.Builder

addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)

public SpeechTranscription.Builder addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameters
NameDescription
indexint
builderForValueSpeechRecognitionAlternative.Builder
Returns
TypeDescription
SpeechTranscription.Builder

addAlternativesBuilder()

public SpeechRecognitionAlternative.Builder addAlternativesBuilder()

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Returns
TypeDescription
SpeechRecognitionAlternative.Builder

addAlternativesBuilder(int index)

public SpeechRecognitionAlternative.Builder addAlternativesBuilder(int index)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternative.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SpeechTranscription build()
Returns
TypeDescription
SpeechTranscription

buildPartial()

public SpeechTranscription buildPartial()
Returns
TypeDescription
SpeechTranscription

clear()

public SpeechTranscription.Builder clear()
Returns
TypeDescription
SpeechTranscription.Builder
Overrides

clearAlternatives()

public SpeechTranscription.Builder clearAlternatives()

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Returns
TypeDescription
SpeechTranscription.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public SpeechTranscription.Builder clone()
Returns
TypeDescription
SpeechTranscription.Builder
Overrides

getAlternatives(int index)

public SpeechRecognitionAlternative getAlternatives(int index)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternative

getAlternativesBuilder(int index)

public SpeechRecognitionAlternative.Builder getAlternativesBuilder(int index)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternative.Builder

getAlternativesBuilderList()

public List<SpeechRecognitionAlternative.Builder> getAlternativesBuilderList()

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Returns
TypeDescription
List<Builder>

getAlternativesCount()

public int getAlternativesCount()

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Returns
TypeDescription
int

getAlternativesList()

public List<SpeechRecognitionAlternative> getAlternativesList()

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Returns
TypeDescription
List<SpeechRecognitionAlternative>

getAlternativesOrBuilder(int index)

public SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechRecognitionAlternativeOrBuilder

getAlternativesOrBuilderList()

public List<? extends SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList()

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Returns
TypeDescription
List<? extends com.google.cloud.videointelligence.v1p1beta1.SpeechRecognitionAlternativeOrBuilder>

getDefaultInstanceForType()

public SpeechTranscription getDefaultInstanceForType()
Returns
TypeDescription
SpeechTranscription

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(SpeechTranscription other)

public SpeechTranscription.Builder mergeFrom(SpeechTranscription other)
Parameter
NameDescription
otherSpeechTranscription
Returns
TypeDescription
SpeechTranscription.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SpeechTranscription.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SpeechTranscription.Builder
Overrides

removeAlternatives(int index)

public SpeechTranscription.Builder removeAlternatives(int index)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
SpeechTranscription.Builder

setAlternatives(int index, SpeechRecognitionAlternative value)

public SpeechTranscription.Builder setAlternatives(int index, SpeechRecognitionAlternative value)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameters
NameDescription
indexint
valueSpeechRecognitionAlternative
Returns
TypeDescription
SpeechTranscription.Builder

setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)

public SpeechTranscription.Builder setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)

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.videointelligence.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;

Parameters
NameDescription
indexint
builderForValueSpeechRecognitionAlternative.Builder
Returns
TypeDescription
SpeechTranscription.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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