public static final class RecognizeResponse.Builder extends com.google.protobuf.GeneratedMessage.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.v1.RecognizeResponse| Modifier and Type | Method and Description |
|---|---|
RecognizeResponse.Builder |
addAllResults(Iterable<? extends SpeechRecognitionResult> values)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
addResults(int index,
SpeechRecognitionResult.Builder builderForValue)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
addResults(int index,
SpeechRecognitionResult value)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
addResults(SpeechRecognitionResult.Builder builderForValue)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
addResults(SpeechRecognitionResult value)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
SpeechRecognitionResult.Builder |
addResultsBuilder()
Sequential list of transcription results corresponding to
sequential portions of audio.
|
SpeechRecognitionResult.Builder |
addResultsBuilder(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse |
build() |
RecognizeResponse |
buildPartial() |
RecognizeResponse.Builder |
clear() |
RecognizeResponse.Builder |
clearRequestId()
The ID associated with the request.
|
RecognizeResponse.Builder |
clearResults()
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
clearSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
RecognizeResponse.Builder |
clearTotalBilledTime()
When available, billed audio seconds for the corresponding request.
|
RecognizeResponse |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
long |
getRequestId()
The ID associated with the request.
|
SpeechRecognitionResult |
getResults(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
SpeechRecognitionResult.Builder |
getResultsBuilder(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
List<SpeechRecognitionResult.Builder> |
getResultsBuilderList()
Sequential list of transcription results corresponding to
sequential portions of audio.
|
int |
getResultsCount()
Sequential list of transcription results corresponding to
sequential portions of audio.
|
List<SpeechRecognitionResult> |
getResultsList()
Sequential list of transcription results corresponding to
sequential portions of audio.
|
SpeechRecognitionResultOrBuilder |
getResultsOrBuilder(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
List<? extends SpeechRecognitionResultOrBuilder> |
getResultsOrBuilderList()
Sequential list of transcription results corresponding to
sequential portions of audio.
|
SpeechAdaptationInfo |
getSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
SpeechAdaptationInfo.Builder |
getSpeechAdaptationInfoBuilder()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
SpeechAdaptationInfoOrBuilder |
getSpeechAdaptationInfoOrBuilder()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
com.google.protobuf.Duration |
getTotalBilledTime()
When available, billed audio seconds for the corresponding request.
|
com.google.protobuf.Duration.Builder |
getTotalBilledTimeBuilder()
When available, billed audio seconds for the corresponding request.
|
com.google.protobuf.DurationOrBuilder |
getTotalBilledTimeOrBuilder()
When available, billed audio seconds for the corresponding request.
|
boolean |
hasSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
boolean |
hasTotalBilledTime()
When available, billed audio seconds for the corresponding request.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
RecognizeResponse.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
RecognizeResponse.Builder |
mergeFrom(com.google.protobuf.Message other) |
RecognizeResponse.Builder |
mergeFrom(RecognizeResponse other) |
RecognizeResponse.Builder |
mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
RecognizeResponse.Builder |
mergeTotalBilledTime(com.google.protobuf.Duration value)
When available, billed audio seconds for the corresponding request.
|
RecognizeResponse.Builder |
removeResults(int index)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
setRequestId(long value)
The ID associated with the request.
|
RecognizeResponse.Builder |
setResults(int index,
SpeechRecognitionResult.Builder builderForValue)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
setResults(int index,
SpeechRecognitionResult value)
Sequential list of transcription results corresponding to
sequential portions of audio.
|
RecognizeResponse.Builder |
setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
RecognizeResponse.Builder |
setSpeechAdaptationInfo(SpeechAdaptationInfo value)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; |
RecognizeResponse.Builder |
setTotalBilledTime(com.google.protobuf.Duration.Builder builderForValue)
When available, billed audio seconds for the corresponding request.
|
RecognizeResponse.Builder |
setTotalBilledTime(com.google.protobuf.Duration value)
When available, billed audio seconds for the corresponding request.
|
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>public RecognizeResponse.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>public RecognizeResponse getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic RecognizeResponse build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic RecognizeResponse buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic RecognizeResponse.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RecognizeResponse.Builder>public RecognizeResponse.Builder mergeFrom(RecognizeResponse other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>public RecognizeResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RecognizeResponse.Builder>IOExceptionpublic List<SpeechRecognitionResult> getResultsList()
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;getResultsList in interface RecognizeResponseOrBuilderpublic int getResultsCount()
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;getResultsCount in interface RecognizeResponseOrBuilderpublic SpeechRecognitionResult getResults(int index)
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;getResults in interface RecognizeResponseOrBuilderpublic RecognizeResponse.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;public RecognizeResponse.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;public RecognizeResponse.Builder addResults(SpeechRecognitionResult value)
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;public RecognizeResponse.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;public RecognizeResponse.Builder addResults(SpeechRecognitionResult.Builder builderForValue)
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;public RecognizeResponse.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;public RecognizeResponse.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;public RecognizeResponse.Builder clearResults()
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;public RecognizeResponse.Builder removeResults(int index)
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;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;public SpeechRecognitionResultOrBuilder getResultsOrBuilder(int index)
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;getResultsOrBuilder in interface RecognizeResponseOrBuilderpublic List<? extends SpeechRecognitionResultOrBuilder> getResultsOrBuilderList()
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;getResultsOrBuilderList in interface RecognizeResponseOrBuilderpublic SpeechRecognitionResult.Builder addResultsBuilder()
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;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;public List<SpeechRecognitionResult.Builder> getResultsBuilderList()
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;public boolean hasTotalBilledTime()
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;hasTotalBilledTime in interface RecognizeResponseOrBuilderpublic com.google.protobuf.Duration getTotalBilledTime()
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;getTotalBilledTime in interface RecognizeResponseOrBuilderpublic RecognizeResponse.Builder setTotalBilledTime(com.google.protobuf.Duration value)
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;public RecognizeResponse.Builder setTotalBilledTime(com.google.protobuf.Duration.Builder builderForValue)
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;public RecognizeResponse.Builder mergeTotalBilledTime(com.google.protobuf.Duration value)
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;public RecognizeResponse.Builder clearTotalBilledTime()
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;public com.google.protobuf.Duration.Builder getTotalBilledTimeBuilder()
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;public com.google.protobuf.DurationOrBuilder getTotalBilledTimeOrBuilder()
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;getTotalBilledTimeOrBuilder in interface RecognizeResponseOrBuilderpublic boolean hasSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;hasSpeechAdaptationInfo in interface RecognizeResponseOrBuilderpublic SpeechAdaptationInfo getSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;getSpeechAdaptationInfo in interface RecognizeResponseOrBuilderpublic RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo value)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;public RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;public RecognizeResponse.Builder mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;public RecognizeResponse.Builder clearSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;public SpeechAdaptationInfo.Builder getSpeechAdaptationInfoBuilder()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;public SpeechAdaptationInfoOrBuilder getSpeechAdaptationInfoOrBuilder()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;getSpeechAdaptationInfoOrBuilder in interface RecognizeResponseOrBuilderpublic long getRequestId()
The ID associated with the request. This is a unique ID specific only to the given request.
int64 request_id = 8;getRequestId in interface RecognizeResponseOrBuilderpublic 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;value - The requestId to set.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;Copyright © 2026 Google LLC. All rights reserved.