public static final class SpeechRecognitionAlternative.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder> implements SpeechRecognitionAlternativeOrBuilder
Alternative hypotheses (a.k.a. n-best list).Protobuf type
google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative| Modifier and Type | Method and Description |
|---|---|
SpeechRecognitionAlternative.Builder |
addAllWords(Iterable<? extends WordInfo> values)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
SpeechRecognitionAlternative.Builder |
addWords(int index,
WordInfo.Builder builderForValue)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addWords(int index,
WordInfo value)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addWords(WordInfo.Builder builderForValue)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
addWords(WordInfo value)
A list of word-specific information for each recognized word.
|
WordInfo.Builder |
addWordsBuilder()
A list of word-specific information for each recognized word.
|
WordInfo.Builder |
addWordsBuilder(int index)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative |
build() |
SpeechRecognitionAlternative |
buildPartial() |
SpeechRecognitionAlternative.Builder |
clear() |
SpeechRecognitionAlternative.Builder |
clearConfidence()
The confidence estimate between 0.0 and 1.0.
|
SpeechRecognitionAlternative.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
SpeechRecognitionAlternative.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
SpeechRecognitionAlternative.Builder |
clearTranscript()
Transcript text representing the words that the user spoke.
|
SpeechRecognitionAlternative.Builder |
clearWords()
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
clone() |
float |
getConfidence()
The confidence estimate between 0.0 and 1.0.
|
SpeechRecognitionAlternative |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getTranscript()
Transcript text representing the words that the user spoke.
|
com.google.protobuf.ByteString |
getTranscriptBytes()
Transcript text representing the words that the user spoke.
|
WordInfo |
getWords(int index)
A list of word-specific information for each recognized word.
|
WordInfo.Builder |
getWordsBuilder(int index)
A list of word-specific information for each recognized word.
|
List<WordInfo.Builder> |
getWordsBuilderList()
A list of word-specific information for each recognized word.
|
int |
getWordsCount()
A list of word-specific information for each recognized word.
|
List<WordInfo> |
getWordsList()
A list of word-specific information for each recognized word.
|
WordInfoOrBuilder |
getWordsOrBuilder(int index)
A list of word-specific information for each recognized word.
|
List<? extends WordInfoOrBuilder> |
getWordsOrBuilderList()
A list of word-specific information for each recognized word.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
SpeechRecognitionAlternative.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
SpeechRecognitionAlternative.Builder |
mergeFrom(com.google.protobuf.Message other) |
SpeechRecognitionAlternative.Builder |
mergeFrom(SpeechRecognitionAlternative other) |
SpeechRecognitionAlternative.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
SpeechRecognitionAlternative.Builder |
removeWords(int index)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
setConfidence(float value)
The confidence estimate between 0.0 and 1.0.
|
SpeechRecognitionAlternative.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
SpeechRecognitionAlternative.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
SpeechRecognitionAlternative.Builder |
setTranscript(String value)
Transcript text representing the words that the user spoke.
|
SpeechRecognitionAlternative.Builder |
setTranscriptBytes(com.google.protobuf.ByteString value)
Transcript text representing the words that the user spoke.
|
SpeechRecognitionAlternative.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
SpeechRecognitionAlternative.Builder |
setWords(int index,
WordInfo.Builder builderForValue)
A list of word-specific information for each recognized word.
|
SpeechRecognitionAlternative.Builder |
setWords(int index,
WordInfo value)
A list of word-specific information for each recognized word.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.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.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic SpeechRecognitionAlternative build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic SpeechRecognitionAlternative buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic SpeechRecognitionAlternative.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.Builder mergeFrom(SpeechRecognitionAlternative other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public SpeechRecognitionAlternative.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<SpeechRecognitionAlternative.Builder>IOExceptionpublic String getTranscript()
Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.
string transcript = 1;getTranscript in interface SpeechRecognitionAlternativeOrBuilderpublic com.google.protobuf.ByteString getTranscriptBytes()
Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.
string transcript = 1;getTranscriptBytes in interface SpeechRecognitionAlternativeOrBuilderpublic SpeechRecognitionAlternative.Builder setTranscript(String value)
Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.
string transcript = 1;value - The transcript to set.public SpeechRecognitionAlternative.Builder clearTranscript()
Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.
string transcript = 1;public SpeechRecognitionAlternative.Builder setTranscriptBytes(com.google.protobuf.ByteString value)
Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.
string transcript = 1;value - The bytes for transcript to set.public float getConfidence()
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 set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
float confidence = 2;getConfidence in interface SpeechRecognitionAlternativeOrBuilderpublic SpeechRecognitionAlternative.Builder setConfidence(float value)
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 set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
float confidence = 2;value - The confidence to set.public SpeechRecognitionAlternative.Builder clearConfidence()
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 set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.
float confidence = 2;public List<WordInfo> getWordsList()
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;getWordsList in interface SpeechRecognitionAlternativeOrBuilderpublic int getWordsCount()
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;getWordsCount in interface SpeechRecognitionAlternativeOrBuilderpublic WordInfo getWords(int index)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;getWords in interface SpeechRecognitionAlternativeOrBuilderpublic SpeechRecognitionAlternative.Builder setWords(int index, WordInfo value)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder setWords(int index, WordInfo.Builder builderForValue)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder addWords(WordInfo value)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder addWords(int index, WordInfo value)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder addWords(WordInfo.Builder builderForValue)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder addWords(int index, WordInfo.Builder builderForValue)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder addAllWords(Iterable<? extends WordInfo> values)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder clearWords()
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public SpeechRecognitionAlternative.Builder removeWords(int index)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public WordInfo.Builder getWordsBuilder(int index)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public WordInfoOrBuilder getWordsOrBuilder(int index)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;getWordsOrBuilder in interface SpeechRecognitionAlternativeOrBuilderpublic List<? extends WordInfoOrBuilder> getWordsOrBuilderList()
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;getWordsOrBuilderList in interface SpeechRecognitionAlternativeOrBuilderpublic WordInfo.Builder addWordsBuilder()
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public WordInfo.Builder addWordsBuilder(int index)
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public List<WordInfo.Builder> getWordsBuilderList()
A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.
repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;public final SpeechRecognitionAlternative.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>public final SpeechRecognitionAlternative.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionAlternative.Builder>Copyright © 2024 Google LLC. All rights reserved.