Class RecognizeResponse.Builder (4.47.0)

public static final class RecognizeResponse.Builder extends GeneratedMessageV3.Builder<RecognizeResponse.Builder> implements RecognizeResponseOrBuilder

Response message for the Recognize method.

Protobuf type google.cloud.speech.v2.RecognizeResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllResults(Iterable<? extends SpeechRecognitionResult> values)

public RecognizeResponse.Builder addAllResults(Iterable<? extends SpeechRecognitionResult> values)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.speech.v2.SpeechRecognitionResult>
Returns
Type Description
RecognizeResponse.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RecognizeResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RecognizeResponse.Builder
Overrides

addResults(SpeechRecognitionResult value)

public RecognizeResponse.Builder addResults(SpeechRecognitionResult value)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
value SpeechRecognitionResult
Returns
Type Description
RecognizeResponse.Builder

addResults(SpeechRecognitionResult.Builder builderForValue)

public RecognizeResponse.Builder addResults(SpeechRecognitionResult.Builder builderForValue)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
builderForValue SpeechRecognitionResult.Builder
Returns
Type Description
RecognizeResponse.Builder

addResults(int index, SpeechRecognitionResult value)

public RecognizeResponse.Builder addResults(int index, SpeechRecognitionResult value)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameters
Name Description
index int
value SpeechRecognitionResult
Returns
Type Description
RecognizeResponse.Builder

addResults(int index, SpeechRecognitionResult.Builder builderForValue)

public RecognizeResponse.Builder addResults(int index, SpeechRecognitionResult.Builder builderForValue)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameters
Name Description
index int
builderForValue SpeechRecognitionResult.Builder
Returns
Type Description
RecognizeResponse.Builder

addResultsBuilder()

public SpeechRecognitionResult.Builder addResultsBuilder()

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Returns
Type Description
SpeechRecognitionResult.Builder

addResultsBuilder(int index)

public SpeechRecognitionResult.Builder addResultsBuilder(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
index int
Returns
Type Description
SpeechRecognitionResult.Builder

build()

public RecognizeResponse build()
Returns
Type Description
RecognizeResponse

buildPartial()

public RecognizeResponse buildPartial()
Returns
Type Description
RecognizeResponse

clear()

public RecognizeResponse.Builder clear()
Returns
Type Description
RecognizeResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public RecognizeResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
RecognizeResponse.Builder
Overrides

clearMetadata()

public RecognizeResponse.Builder clearMetadata()

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Returns
Type Description
RecognizeResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public RecognizeResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
RecognizeResponse.Builder
Overrides

clearResults()

public RecognizeResponse.Builder clearResults()

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Returns
Type Description
RecognizeResponse.Builder

clone()

public RecognizeResponse.Builder clone()
Returns
Type Description
RecognizeResponse.Builder
Overrides

getDefaultInstanceForType()

public RecognizeResponse getDefaultInstanceForType()
Returns
Type Description
RecognizeResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMetadata()

public RecognitionResponseMetadata getMetadata()

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Returns
Type Description
RecognitionResponseMetadata

The metadata.

getMetadataBuilder()

public RecognitionResponseMetadata.Builder getMetadataBuilder()

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Returns
Type Description
RecognitionResponseMetadata.Builder

getMetadataOrBuilder()

public RecognitionResponseMetadataOrBuilder getMetadataOrBuilder()

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Returns
Type Description
RecognitionResponseMetadataOrBuilder

getResults(int index)

public SpeechRecognitionResult getResults(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
index int
Returns
Type Description
SpeechRecognitionResult

getResultsBuilder(int index)

public SpeechRecognitionResult.Builder getResultsBuilder(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
index int
Returns
Type Description
SpeechRecognitionResult.Builder

getResultsBuilderList()

public List<SpeechRecognitionResult.Builder> getResultsBuilderList()

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Returns
Type Description
List<Builder>

getResultsCount()

public int getResultsCount()

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Returns
Type Description
int

getResultsList()

public List<SpeechRecognitionResult> getResultsList()

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Returns
Type Description
List<SpeechRecognitionResult>

getResultsOrBuilder(int index)

public SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
index int
Returns
Type Description
SpeechRecognitionResultOrBuilder

getResultsOrBuilderList()

public List<? extends SpeechRecognitionResultOrBuilder> getResultsOrBuilderList()

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Returns
Type Description
List<? extends com.google.cloud.speech.v2.SpeechRecognitionResultOrBuilder>

hasMetadata()

public boolean hasMetadata()

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Returns
Type Description
boolean

Whether the metadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RecognizeResponse other)

public RecognizeResponse.Builder mergeFrom(RecognizeResponse other)
Parameter
Name Description
other RecognizeResponse
Returns
Type Description
RecognizeResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RecognizeResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RecognizeResponse.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RecognizeResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RecognizeResponse.Builder
Overrides

mergeMetadata(RecognitionResponseMetadata value)

public RecognizeResponse.Builder mergeMetadata(RecognitionResponseMetadata value)

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Parameter
Name Description
value RecognitionResponseMetadata
Returns
Type Description
RecognizeResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RecognizeResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RecognizeResponse.Builder
Overrides

removeResults(int index)

public RecognizeResponse.Builder removeResults(int index)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameter
Name Description
index int
Returns
Type Description
RecognizeResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public RecognizeResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RecognizeResponse.Builder
Overrides

setMetadata(RecognitionResponseMetadata value)

public RecognizeResponse.Builder setMetadata(RecognitionResponseMetadata value)

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Parameter
Name Description
value RecognitionResponseMetadata
Returns
Type Description
RecognizeResponse.Builder

setMetadata(RecognitionResponseMetadata.Builder builderForValue)

public RecognizeResponse.Builder setMetadata(RecognitionResponseMetadata.Builder builderForValue)

Metadata about the recognition.

.google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;

Parameter
Name Description
builderForValue RecognitionResponseMetadata.Builder
Returns
Type Description
RecognizeResponse.Builder

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

public RecognizeResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RecognizeResponse.Builder
Overrides

setResults(int index, SpeechRecognitionResult value)

public RecognizeResponse.Builder setResults(int index, SpeechRecognitionResult value)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameters
Name Description
index int
value SpeechRecognitionResult
Returns
Type Description
RecognizeResponse.Builder

setResults(int index, SpeechRecognitionResult.Builder builderForValue)

public RecognizeResponse.Builder setResults(int index, SpeechRecognitionResult.Builder builderForValue)

Sequential list of transcription results corresponding to sequential portions of audio.

repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;

Parameters
Name Description
index int
builderForValue SpeechRecognitionResult.Builder
Returns
Type Description
RecognizeResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final RecognizeResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RecognizeResponse.Builder
Overrides