Package com.google.cloud.speech.v1
Class RecognizeResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>
com.google.cloud.speech.v1.RecognizeResponse.Builder
- All Implemented Interfaces:
RecognizeResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- RecognizeResponse
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllResults(Iterable<? extends SpeechRecognitionResult> values) Sequential list of transcription results corresponding to sequential portions of audio.addResults(int index, SpeechRecognitionResult value) Sequential list of transcription results corresponding to sequential portions of audio.addResults(int index, SpeechRecognitionResult.Builder builderForValue) Sequential list of transcription results corresponding to sequential portions of audio.Sequential list of transcription results corresponding to sequential portions of audio.addResults(SpeechRecognitionResult.Builder builderForValue) Sequential list of transcription results corresponding to sequential portions of audio.Sequential list of transcription results corresponding to sequential portions of audio.addResultsBuilder(int index) Sequential list of transcription results corresponding to sequential portions of audio.build()clear()The ID associated with the request.Sequential list of transcription results corresponding to sequential portions of audio.Provides information on adaptation behavior in responseWhen available, billed audio seconds for the corresponding request.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorlongThe ID associated with the request.getResults(int index) Sequential list of transcription results corresponding to sequential portions of audio.getResultsBuilder(int index) Sequential list of transcription results corresponding to sequential portions of audio.Sequential list of transcription results corresponding to sequential portions of audio.intSequential list of transcription results corresponding to sequential portions of audio.Sequential list of transcription results corresponding to sequential portions of audio.getResultsOrBuilder(int index) Sequential list of transcription results corresponding to sequential portions of audio.List<? extends SpeechRecognitionResultOrBuilder>Sequential list of transcription results corresponding to sequential portions of audio.Provides information on adaptation behavior in responseProvides information on adaptation behavior in responseProvides information on adaptation behavior in responsecom.google.protobuf.DurationWhen available, billed audio seconds for the corresponding request.com.google.protobuf.Duration.BuilderWhen available, billed audio seconds for the corresponding request.com.google.protobuf.DurationOrBuilderWhen available, billed audio seconds for the corresponding request.booleanProvides information on adaptation behavior in responsebooleanWhen available, billed audio seconds for the corresponding request.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(RecognizeResponse other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Provides information on adaptation behavior in responsemergeTotalBilledTime(com.google.protobuf.Duration value) When available, billed audio seconds for the corresponding request.removeResults(int index) Sequential list of transcription results corresponding to sequential portions of audio.setRequestId(long value) The ID associated with the request.setResults(int index, SpeechRecognitionResult value) Sequential list of transcription results corresponding to sequential portions of audio.setResults(int index, SpeechRecognitionResult.Builder builderForValue) Sequential list of transcription results corresponding to sequential portions of audio.Provides information on adaptation behavior in responsesetSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue) Provides information on adaptation behavior in responsesetTotalBilledTime(com.google.protobuf.Duration value) When available, billed audio seconds for the corresponding request.setTotalBilledTime(com.google.protobuf.Duration.Builder builderForValue) When available, billed audio seconds for the corresponding request.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RecognizeResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<RecognizeResponse.Builder>
-
mergeFrom
public RecognizeResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RecognizeResponse.Builder>- Throws:
IOException
-
getResultsList
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;- Specified by:
getResultsListin interfaceRecognizeResponseOrBuilder
-
getResultsCount
public int getResultsCount()Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;- Specified by:
getResultsCountin interfaceRecognizeResponseOrBuilder
-
getResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;- Specified by:
getResultsin interfaceRecognizeResponseOrBuilder
-
setResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
setResults
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; -
addResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
addResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
addResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
addResults
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; -
addAllResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
clearResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
removeResults
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
getResultsBuilder
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
getResultsOrBuilder
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;- Specified by:
getResultsOrBuilderin interfaceRecognizeResponseOrBuilder
-
getResultsOrBuilderList
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;- Specified by:
getResultsOrBuilderListin interfaceRecognizeResponseOrBuilder
-
addResultsBuilder
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
addResultsBuilder
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
getResultsBuilderList
Sequential list of transcription results corresponding to sequential portions of audio.
repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2; -
hasTotalBilledTime
public boolean hasTotalBilledTime()When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;- Specified by:
hasTotalBilledTimein interfaceRecognizeResponseOrBuilder- Returns:
- Whether the totalBilledTime field is set.
-
getTotalBilledTime
public com.google.protobuf.Duration getTotalBilledTime()When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;- Specified by:
getTotalBilledTimein interfaceRecognizeResponseOrBuilder- Returns:
- The totalBilledTime.
-
setTotalBilledTime
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3; -
setTotalBilledTime
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; -
mergeTotalBilledTime
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3; -
clearTotalBilledTime
When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3; -
getTotalBilledTimeBuilder
public com.google.protobuf.Duration.Builder getTotalBilledTimeBuilder()When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3; -
getTotalBilledTimeOrBuilder
public com.google.protobuf.DurationOrBuilder getTotalBilledTimeOrBuilder()When available, billed audio seconds for the corresponding request.
.google.protobuf.Duration total_billed_time = 3;- Specified by:
getTotalBilledTimeOrBuilderin interfaceRecognizeResponseOrBuilder
-
hasSpeechAdaptationInfo
public boolean hasSpeechAdaptationInfo()Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;- Specified by:
hasSpeechAdaptationInfoin interfaceRecognizeResponseOrBuilder- Returns:
- Whether the speechAdaptationInfo field is set.
-
getSpeechAdaptationInfo
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;- Specified by:
getSpeechAdaptationInfoin interfaceRecognizeResponseOrBuilder- Returns:
- The speechAdaptationInfo.
-
setSpeechAdaptationInfo
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; -
setSpeechAdaptationInfo
public RecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue) Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; -
mergeSpeechAdaptationInfo
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; -
clearSpeechAdaptationInfo
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; -
getSpeechAdaptationInfoBuilder
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7; -
getSpeechAdaptationInfoOrBuilder
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;- Specified by:
getSpeechAdaptationInfoOrBuilderin interfaceRecognizeResponseOrBuilder
-
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;- Specified by:
getRequestIdin interfaceRecognizeResponseOrBuilder- Returns:
- The requestId.
-
setRequestId
The ID associated with the request. This is a unique ID specific only to the given request.
int64 request_id = 8;- Parameters:
value- The requestId to set.- Returns:
- This builder for chaining.
-
clearRequestId
The ID associated with the request. This is a unique ID specific only to the given request.
int64 request_id = 8;- Returns:
- This builder for chaining.
-