public static final class SpeechRecognitionAlternative.Builder extends GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder> implements SpeechRecognitionAlternativeOrBuilder
Alternative hypotheses (a.k.a. n-best list).Protobuf type
google.cloud.speech.v1.SpeechRecognitionAlternative
Modifier and Type | Method and Description |
---|---|
SpeechRecognitionAlternative.Builder |
addAllWords(java.lang.Iterable<? extends WordInfo> values)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
SpeechRecognitionAlternative.Builder |
addWords(int index,
WordInfo.Builder builderForValue)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addWords(int index,
WordInfo value)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addWords(WordInfo.Builder builderForValue)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addWords(WordInfo value)
*Output-only* A list of word-specific information for each recognized word.
|
WordInfo.Builder |
addWordsBuilder()
*Output-only* A list of word-specific information for each recognized word.
|
WordInfo.Builder |
addWordsBuilder(int index)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative |
build() |
SpeechRecognitionAlternative |
buildPartial() |
SpeechRecognitionAlternative.Builder |
clear() |
SpeechRecognitionAlternative.Builder |
clearConfidence()
*Output-only* The confidence estimate between 0.0 and 1.0.
|
SpeechRecognitionAlternative.Builder |
clearField(Descriptors.FieldDescriptor field) |
SpeechRecognitionAlternative.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
SpeechRecognitionAlternative.Builder |
clearTranscript()
*Output-only* Transcript text representing the words that the user spoke.
|
SpeechRecognitionAlternative.Builder |
clearWords()
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
clone() |
float |
getConfidence()
*Output-only* The confidence estimate between 0.0 and 1.0.
|
SpeechRecognitionAlternative |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.lang.String |
getTranscript()
*Output-only* Transcript text representing the words that the user spoke.
|
ByteString |
getTranscriptBytes()
*Output-only* Transcript text representing the words that the user spoke.
|
WordInfo |
getWords(int index)
*Output-only* A list of word-specific information for each recognized word.
|
WordInfo.Builder |
getWordsBuilder(int index)
*Output-only* A list of word-specific information for each recognized word.
|
java.util.List<WordInfo.Builder> |
getWordsBuilderList()
*Output-only* A list of word-specific information for each recognized word.
|
int |
getWordsCount()
*Output-only* A list of word-specific information for each recognized word.
|
java.util.List<WordInfo> |
getWordsList()
*Output-only* A list of word-specific information for each recognized word.
|
WordInfoOrBuilder |
getWordsOrBuilder(int index)
*Output-only* A list of word-specific information for each recognized word.
|
java.util.List<? extends WordInfoOrBuilder> |
getWordsOrBuilderList()
*Output-only* A list of word-specific information for each recognized word.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
SpeechRecognitionAlternative.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
SpeechRecognitionAlternative.Builder |
mergeFrom(Message other) |
SpeechRecognitionAlternative.Builder |
mergeFrom(SpeechRecognitionAlternative other) |
SpeechRecognitionAlternative.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
SpeechRecognitionAlternative.Builder |
removeWords(int index)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
setConfidence(float value)
*Output-only* The confidence estimate between 0.0 and 1.0.
|
SpeechRecognitionAlternative.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
SpeechRecognitionAlternative.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
SpeechRecognitionAlternative.Builder |
setTranscript(java.lang.String value)
*Output-only* Transcript text representing the words that the user spoke.
|
SpeechRecognitionAlternative.Builder |
setTranscriptBytes(ByteString value)
*Output-only* Transcript text representing the words that the user spoke.
|
SpeechRecognitionAlternative.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
SpeechRecognitionAlternative.Builder |
setWords(int index,
WordInfo.Builder builderForValue)
*Output-only* A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
setWords(int index,
WordInfo value)
*Output-only* A list of word-specific information for each recognized word.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public SpeechRecognitionAlternative build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public SpeechRecognitionAlternative buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public SpeechRecognitionAlternative.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder mergeFrom(SpeechRecognitionAlternative other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public SpeechRecognitionAlternative.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<SpeechRecognitionAlternative.Builder>
java.io.IOException
public java.lang.String getTranscript()
*Output-only* Transcript text representing the words that the user spoke.
string transcript = 1;
getTranscript
in interface SpeechRecognitionAlternativeOrBuilder
public ByteString getTranscriptBytes()
*Output-only* Transcript text representing the words that the user spoke.
string transcript = 1;
getTranscriptBytes
in interface SpeechRecognitionAlternativeOrBuilder
public SpeechRecognitionAlternative.Builder setTranscript(java.lang.String value)
*Output-only* Transcript text representing the words that the user spoke.
string transcript = 1;
public SpeechRecognitionAlternative.Builder clearTranscript()
*Output-only* Transcript text representing the words that the user spoke.
string transcript = 1;
public SpeechRecognitionAlternative.Builder setTranscriptBytes(ByteString value)
*Output-only* Transcript text representing the words that the user spoke.
string transcript = 1;
public float getConfidence()
*Output-only* The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for `is_final=true` results. Clients should not rely on the `confidence` field as it is not guaranteed to be accurate or consistent. The default of 0.0 is a sentinel value indicating `confidence` was not set.
float confidence = 2;
getConfidence
in interface SpeechRecognitionAlternativeOrBuilder
public SpeechRecognitionAlternative.Builder setConfidence(float value)
*Output-only* The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for `is_final=true` results. Clients should not rely on the `confidence` field as it is not guaranteed to be accurate or consistent. The default of 0.0 is a sentinel value indicating `confidence` was not set.
float confidence = 2;
public SpeechRecognitionAlternative.Builder clearConfidence()
*Output-only* The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is typically provided only for the top hypothesis, and only for `is_final=true` results. Clients should not rely on the `confidence` field as it is not guaranteed to be accurate or consistent. The default of 0.0 is a sentinel value indicating `confidence` was not set.
float confidence = 2;
public java.util.List<WordInfo> getWordsList()
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
getWordsList
in interface SpeechRecognitionAlternativeOrBuilder
public int getWordsCount()
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
getWordsCount
in interface SpeechRecognitionAlternativeOrBuilder
public WordInfo getWords(int index)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
getWords
in interface SpeechRecognitionAlternativeOrBuilder
public SpeechRecognitionAlternative.Builder setWords(int index, WordInfo value)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder setWords(int index, WordInfo.Builder builderForValue)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder addWords(WordInfo value)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder addWords(int index, WordInfo value)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder addWords(WordInfo.Builder builderForValue)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder addWords(int index, WordInfo.Builder builderForValue)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder addAllWords(java.lang.Iterable<? extends WordInfo> values)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder clearWords()
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public SpeechRecognitionAlternative.Builder removeWords(int index)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public WordInfo.Builder getWordsBuilder(int index)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public WordInfoOrBuilder getWordsOrBuilder(int index)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
getWordsOrBuilder
in interface SpeechRecognitionAlternativeOrBuilder
public java.util.List<? extends WordInfoOrBuilder> getWordsOrBuilderList()
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
getWordsOrBuilderList
in interface SpeechRecognitionAlternativeOrBuilder
public WordInfo.Builder addWordsBuilder()
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public WordInfo.Builder addWordsBuilder(int index)
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public java.util.List<WordInfo.Builder> getWordsBuilderList()
*Output-only* A list of word-specific information for each recognized word.
repeated .google.cloud.speech.v1.WordInfo words = 3;
public final SpeechRecognitionAlternative.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>
public final SpeechRecognitionAlternative.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>