Class LongRunningRecognizeResponse.Builder (4.47.0)

public static final class LongRunningRecognizeResponse.Builder extends GeneratedMessageV3.Builder<LongRunningRecognizeResponse.Builder> implements LongRunningRecognizeResponseOrBuilder

The only message returned to the client by the LongRunningRecognize method. It contains the result as zero or more sequential SpeechRecognitionResult messages. It is included in the result.response field of the Operation returned by the GetOperation call of the google::longrunning::Operations service.

Protobuf type google.cloud.speech.v1.LongRunningRecognizeResponse

Static Methods

getDescriptor()

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

Methods

addAllResults(Iterable<? extends SpeechRecognitionResult> values)

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

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

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

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addResults(SpeechRecognitionResult value)

public LongRunningRecognizeResponse.Builder addResults(SpeechRecognitionResult value)

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

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

Parameter
Name Description
value SpeechRecognitionResult
Returns
Type Description
LongRunningRecognizeResponse.Builder

addResults(SpeechRecognitionResult.Builder builderForValue)

public LongRunningRecognizeResponse.Builder addResults(SpeechRecognitionResult.Builder builderForValue)

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

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

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

addResults(int index, SpeechRecognitionResult value)

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

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

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

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

addResults(int index, SpeechRecognitionResult.Builder builderForValue)

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

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

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

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

addResultsBuilder()

public SpeechRecognitionResult.Builder addResultsBuilder()

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

repeated .google.cloud.speech.v1.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.v1.SpeechRecognitionResult results = 2;

Parameter
Name Description
index int
Returns
Type Description
SpeechRecognitionResult.Builder

build()

public LongRunningRecognizeResponse build()
Returns
Type Description
LongRunningRecognizeResponse

buildPartial()

public LongRunningRecognizeResponse buildPartial()
Returns
Type Description
LongRunningRecognizeResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOutputConfig()

public LongRunningRecognizeResponse.Builder clearOutputConfig()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
Type Description
LongRunningRecognizeResponse.Builder

clearOutputError()

public LongRunningRecognizeResponse.Builder clearOutputError()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
Type Description
LongRunningRecognizeResponse.Builder

clearRequestId()

public LongRunningRecognizeResponse.Builder clearRequestId()

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

int64 request_id = 9;

Returns
Type Description
LongRunningRecognizeResponse.Builder

This builder for chaining.

clearResults()

public LongRunningRecognizeResponse.Builder clearResults()

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

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

Returns
Type Description
LongRunningRecognizeResponse.Builder

clearSpeechAdaptationInfo()

public LongRunningRecognizeResponse.Builder clearSpeechAdaptationInfo()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
Type Description
LongRunningRecognizeResponse.Builder

clearTotalBilledTime()

public LongRunningRecognizeResponse.Builder clearTotalBilledTime()

When available, billed audio seconds for the corresponding request.

.google.protobuf.Duration total_billed_time = 3;

Returns
Type Description
LongRunningRecognizeResponse.Builder

clone()

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

getDefaultInstanceForType()

public LongRunningRecognizeResponse getDefaultInstanceForType()
Returns
Type Description
LongRunningRecognizeResponse

getDescriptorForType()

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

getOutputConfig()

public TranscriptOutputConfig getOutputConfig()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
Type Description
TranscriptOutputConfig

The outputConfig.

getOutputConfigBuilder()

public TranscriptOutputConfig.Builder getOutputConfigBuilder()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
Type Description
TranscriptOutputConfig.Builder

getOutputConfigOrBuilder()

public TranscriptOutputConfigOrBuilder getOutputConfigOrBuilder()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
Type Description
TranscriptOutputConfigOrBuilder

getOutputError()

public Status getOutputError()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
Type Description
com.google.rpc.Status

The outputError.

getOutputErrorBuilder()

public Status.Builder getOutputErrorBuilder()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
Type Description
com.google.rpc.Status.Builder

getOutputErrorOrBuilder()

public StatusOrBuilder getOutputErrorOrBuilder()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
Type Description
com.google.rpc.StatusOrBuilder

getRequestId()

public long getRequestId()

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

int64 request_id = 9;

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

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

getSpeechAdaptationInfo()

public SpeechAdaptationInfo getSpeechAdaptationInfo()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
Type Description
SpeechAdaptationInfo

The speechAdaptationInfo.

getSpeechAdaptationInfoBuilder()

public SpeechAdaptationInfo.Builder getSpeechAdaptationInfoBuilder()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Returns
Type Description
SpeechAdaptationInfo.Builder

getSpeechAdaptationInfoOrBuilder()

public SpeechAdaptationInfoOrBuilder getSpeechAdaptationInfoOrBuilder()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

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

hasOutputConfig()

public boolean hasOutputConfig()

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Returns
Type Description
boolean

Whether the outputConfig field is set.

hasOutputError()

public boolean hasOutputError()

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Returns
Type Description
boolean

Whether the outputError field is set.

hasSpeechAdaptationInfo()

public boolean hasSpeechAdaptationInfo()

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

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

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeOutputConfig(TranscriptOutputConfig value)

public LongRunningRecognizeResponse.Builder mergeOutputConfig(TranscriptOutputConfig value)

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Parameter
Name Description
value TranscriptOutputConfig
Returns
Type Description
LongRunningRecognizeResponse.Builder

mergeOutputError(Status value)

public LongRunningRecognizeResponse.Builder mergeOutputError(Status value)

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
LongRunningRecognizeResponse.Builder

mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)

public LongRunningRecognizeResponse.Builder mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Parameter
Name Description
value SpeechAdaptationInfo
Returns
Type Description
LongRunningRecognizeResponse.Builder

mergeTotalBilledTime(Duration value)

public LongRunningRecognizeResponse.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
LongRunningRecognizeResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeResults(int index)

public LongRunningRecognizeResponse.Builder removeResults(int index)

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

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

Parameter
Name Description
index int
Returns
Type Description
LongRunningRecognizeResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setOutputConfig(TranscriptOutputConfig value)

public LongRunningRecognizeResponse.Builder setOutputConfig(TranscriptOutputConfig value)

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Parameter
Name Description
value TranscriptOutputConfig
Returns
Type Description
LongRunningRecognizeResponse.Builder

setOutputConfig(TranscriptOutputConfig.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setOutputConfig(TranscriptOutputConfig.Builder builderForValue)

Original output config if present in the request.

.google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;

Parameter
Name Description
builderForValue TranscriptOutputConfig.Builder
Returns
Type Description
LongRunningRecognizeResponse.Builder

setOutputError(Status value)

public LongRunningRecognizeResponse.Builder setOutputError(Status value)

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
LongRunningRecognizeResponse.Builder

setOutputError(Status.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setOutputError(Status.Builder builderForValue)

If the transcript output fails this field contains the relevant error.

.google.rpc.Status output_error = 7;

Parameter
Name Description
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
LongRunningRecognizeResponse.Builder

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

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

setRequestId(long value)

public LongRunningRecognizeResponse.Builder setRequestId(long value)

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

int64 request_id = 9;

Parameter
Name Description
value long

The requestId to set.

Returns
Type Description
LongRunningRecognizeResponse.Builder

This builder for chaining.

setResults(int index, SpeechRecognitionResult value)

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

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

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

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

setResults(int index, SpeechRecognitionResult.Builder builderForValue)

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

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

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

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

setSpeechAdaptationInfo(SpeechAdaptationInfo value)

public LongRunningRecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo value)

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

Parameter
Name Description
value SpeechAdaptationInfo
Returns
Type Description
LongRunningRecognizeResponse.Builder

setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)

public LongRunningRecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)

Provides information on speech adaptation behavior in response

.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;

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

setTotalBilledTime(Duration value)

public LongRunningRecognizeResponse.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
LongRunningRecognizeResponse.Builder

setTotalBilledTime(Duration.Builder builderForValue)

public LongRunningRecognizeResponse.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
LongRunningRecognizeResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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