Class RecognizeResponse.Builder (4.50.0)

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

The only message returned to the client by the Recognize method. It contains the result as zero or more sequential SpeechRecognitionResult messages.

Protobuf type google.cloud.speech.v1p1beta1.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.v1p1beta1.SpeechRecognitionResult results = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.speech.v1p1beta1.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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRequestId()

public RecognizeResponse.Builder clearRequestId()

The ID associated with the request. This is a unique ID specific only to the given request.

int64 request_id = 8;

Returns
Type Description
RecognizeResponse.Builder

This builder for chaining.

clearResults()

public RecognizeResponse.Builder clearResults()

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

repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;

Returns
Type Description
RecognizeResponse.Builder

clearSpeechAdaptationInfo()

public RecognizeResponse.Builder clearSpeechAdaptationInfo()

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Returns
Type Description
RecognizeResponse.Builder

clearTotalBilledTime()

public RecognizeResponse.Builder clearTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 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

getRequestId()

public long getRequestId()

The ID associated with the request. This is a unique ID specific only to the given request.

int64 request_id = 8;

Returns
Type Description
long

The requestId.

getResults(int index)

public SpeechRecognitionResult getResults(int index)

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

repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

Returns
Type Description
List<Builder>

getResultsCount()

public int getResultsCount()

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

repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;

Returns
Type Description
int

getResultsList()

public List<SpeechRecognitionResult> getResultsList()

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

repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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

getSpeechAdaptationInfo()

public SpeechAdaptationInfo getSpeechAdaptationInfo()

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Returns
Type Description
SpeechAdaptationInfo

The speechAdaptationInfo.

getSpeechAdaptationInfoBuilder()

public SpeechAdaptationInfo.Builder getSpeechAdaptationInfoBuilder()

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Returns
Type Description
SpeechAdaptationInfo.Builder

getSpeechAdaptationInfoOrBuilder()

public SpeechAdaptationInfoOrBuilder getSpeechAdaptationInfoOrBuilder()

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Returns
Type Description
SpeechAdaptationInfoOrBuilder

getTotalBilledTime()

public Duration getTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
Type Description
Duration

The totalBilledTime.

getTotalBilledTimeBuilder()

public Duration.Builder getTotalBilledTimeBuilder()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
Type Description
Builder

getTotalBilledTimeOrBuilder()

public DurationOrBuilder getTotalBilledTimeOrBuilder()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
Type Description
DurationOrBuilder

hasSpeechAdaptationInfo()

public boolean hasSpeechAdaptationInfo()

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Returns
Type Description
boolean

Whether the speechAdaptationInfo field is set.

hasTotalBilledTime()

public boolean hasTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
Type Description
boolean

Whether the totalBilledTime 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

mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)

public RecognizeResponse.Builder mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Parameter
Name Description
value SpeechAdaptationInfo
Returns
Type Description
RecognizeResponse.Builder

mergeTotalBilledTime(Duration value)

public RecognizeResponse.Builder mergeTotalBilledTime(Duration value)

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Parameter
Name Description
value Duration
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.v1p1beta1.SpeechRecognitionResult results = 2;

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

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

setRequestId(long value)

public RecognizeResponse.Builder setRequestId(long value)

The ID associated with the request. This is a unique ID specific only to the given request.

int64 request_id = 8;

Parameter
Name Description
value long

The requestId to set.

Returns
Type Description
RecognizeResponse.Builder

This builder for chaining.

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.v1p1beta1.SpeechRecognitionResult results = 2;

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.v1p1beta1.SpeechRecognitionResult results = 2;

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

setSpeechAdaptationInfo(SpeechAdaptationInfo value)

public RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo value)

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

Parameter
Name Description
value SpeechAdaptationInfo
Returns
Type Description
RecognizeResponse.Builder

setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)

public RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)

Provides information on adaptation behavior in response

.google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;

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

setTotalBilledTime(Duration value)

public RecognizeResponse.Builder setTotalBilledTime(Duration value)

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Parameter
Name Description
value Duration
Returns
Type Description
RecognizeResponse.Builder

setTotalBilledTime(Duration.Builder builderForValue)

public RecognizeResponse.Builder setTotalBilledTime(Duration.Builder builderForValue)

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Parameter
Name Description
builderForValue 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