- 4.50.0 (latest)
- 4.49.0
- 4.48.0
- 4.47.0
- 4.46.0
- 4.44.0
- 4.43.0
- 4.42.0
- 4.41.0
- 4.40.0
- 4.39.0
- 4.38.0
- 4.37.0
- 4.36.0
- 4.35.0
- 4.34.0
- 4.32.0
- 4.31.0
- 4.30.0
- 4.29.0
- 4.28.0
- 4.27.0
- 4.26.0
- 4.25.0
- 4.24.0
- 4.23.0
- 4.22.0
- 4.19.0
- 4.18.0
- 4.17.0
- 4.16.0
- 4.15.0
- 4.14.0
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.0
- 4.8.0
- 4.7.0
- 4.6.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.0.0
- 2.6.1
- 2.5.9
- 2.4.0
- 2.3.0
- 2.2.15
public static final class SpeechRecognitionResult.Builder extends GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder> implements SpeechRecognitionResultOrBuilder
A speech recognition result corresponding to a portion of the audio.
Protobuf type google.cloud.speech.v2.SpeechRecognitionResult
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > SpeechRecognitionResult.BuilderImplements
SpeechRecognitionResultOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)
public SpeechRecognitionResult.Builder addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
values | Iterable<? extends com.google.cloud.speech.v2.SpeechRecognitionAlternative> |
Type | Description |
SpeechRecognitionResult.Builder |
addAlternatives(SpeechRecognitionAlternative value)
public SpeechRecognitionResult.Builder addAlternatives(SpeechRecognitionAlternative value)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
value | SpeechRecognitionAlternative |
Type | Description |
SpeechRecognitionResult.Builder |
addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)
public SpeechRecognitionResult.Builder addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
builderForValue | SpeechRecognitionAlternative.Builder |
Type | Description |
SpeechRecognitionResult.Builder |
addAlternatives(int index, SpeechRecognitionAlternative value)
public SpeechRecognitionResult.Builder addAlternatives(int index, SpeechRecognitionAlternative value)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
value | SpeechRecognitionAlternative |
Type | Description |
SpeechRecognitionResult.Builder |
addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
public SpeechRecognitionResult.Builder addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
builderForValue | SpeechRecognitionAlternative.Builder |
Type | Description |
SpeechRecognitionResult.Builder |
addAlternativesBuilder()
public SpeechRecognitionAlternative.Builder addAlternativesBuilder()
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Type | Description |
SpeechRecognitionAlternative.Builder |
addAlternativesBuilder(int index)
public SpeechRecognitionAlternative.Builder addAlternativesBuilder(int index)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
Type | Description |
SpeechRecognitionAlternative.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SpeechRecognitionResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
SpeechRecognitionResult.Builder |
build()
public SpeechRecognitionResult build()
Type | Description |
SpeechRecognitionResult |
buildPartial()
public SpeechRecognitionResult buildPartial()
Type | Description |
SpeechRecognitionResult |
clear()
public SpeechRecognitionResult.Builder clear()
Type | Description |
SpeechRecognitionResult.Builder |
clearAlternatives()
public SpeechRecognitionResult.Builder clearAlternatives()
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Type | Description |
SpeechRecognitionResult.Builder |
clearChannelTag()
public SpeechRecognitionResult.Builder clearChannelTag()
For multi-channel audio, this is the channel number corresponding to the
recognized result for the audio from that channel.
For audio_channel_count
= N
, its output values can range from 1
to
N
.
int32 channel_tag = 2;
Type | Description |
SpeechRecognitionResult.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public SpeechRecognitionResult.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
SpeechRecognitionResult.Builder |
clearLanguageCode()
public SpeechRecognitionResult.Builder clearLanguageCode()
Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
SpeechRecognitionResult.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public SpeechRecognitionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
SpeechRecognitionResult.Builder |
clearResultEndOffset()
public SpeechRecognitionResult.Builder clearResultEndOffset()
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Type | Description |
SpeechRecognitionResult.Builder |
clone()
public SpeechRecognitionResult.Builder clone()
Type | Description |
SpeechRecognitionResult.Builder |
getAlternatives(int index)
public SpeechRecognitionAlternative getAlternatives(int index)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
Type | Description |
SpeechRecognitionAlternative |
getAlternativesBuilder(int index)
public SpeechRecognitionAlternative.Builder getAlternativesBuilder(int index)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
Type | Description |
SpeechRecognitionAlternative.Builder |
getAlternativesBuilderList()
public List<SpeechRecognitionAlternative.Builder> getAlternativesBuilderList()
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Type | Description |
List<Builder> |
getAlternativesCount()
public int getAlternativesCount()
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Type | Description |
int |
getAlternativesList()
public List<SpeechRecognitionAlternative> getAlternativesList()
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Type | Description |
List<SpeechRecognitionAlternative> |
getAlternativesOrBuilder(int index)
public SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
Type | Description |
SpeechRecognitionAlternativeOrBuilder |
getAlternativesOrBuilderList()
public List<? extends SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList()
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Type | Description |
List<? extends com.google.cloud.speech.v2.SpeechRecognitionAlternativeOrBuilder> |
getChannelTag()
public int getChannelTag()
For multi-channel audio, this is the channel number corresponding to the
recognized result for the audio from that channel.
For audio_channel_count
= N
, its output values can range from 1
to
N
.
int32 channel_tag = 2;
Type | Description |
int | The channelTag. |
getDefaultInstanceForType()
public SpeechRecognitionResult getDefaultInstanceForType()
Type | Description |
SpeechRecognitionResult |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getLanguageCode()
public String getLanguageCode()
Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
String | The languageCode. |
getLanguageCodeBytes()
public ByteString getLanguageCodeBytes()
Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Type | Description |
ByteString | The bytes for languageCode. |
getResultEndOffset()
public Duration getResultEndOffset()
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Type | Description |
Duration | The resultEndOffset. |
getResultEndOffsetBuilder()
public Duration.Builder getResultEndOffsetBuilder()
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Type | Description |
Builder |
getResultEndOffsetOrBuilder()
public DurationOrBuilder getResultEndOffsetOrBuilder()
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Type | Description |
DurationOrBuilder |
hasResultEndOffset()
public boolean hasResultEndOffset()
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Type | Description |
boolean | Whether the resultEndOffset field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(SpeechRecognitionResult other)
public SpeechRecognitionResult.Builder mergeFrom(SpeechRecognitionResult other)
Name | Description |
other | SpeechRecognitionResult |
Type | Description |
SpeechRecognitionResult.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SpeechRecognitionResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
SpeechRecognitionResult.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public SpeechRecognitionResult.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
SpeechRecognitionResult.Builder |
mergeResultEndOffset(Duration value)
public SpeechRecognitionResult.Builder mergeResultEndOffset(Duration value)
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Name | Description |
value | Duration |
Type | Description |
SpeechRecognitionResult.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SpeechRecognitionResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
SpeechRecognitionResult.Builder |
removeAlternatives(int index)
public SpeechRecognitionResult.Builder removeAlternatives(int index)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
Type | Description |
SpeechRecognitionResult.Builder |
setAlternatives(int index, SpeechRecognitionAlternative value)
public SpeechRecognitionResult.Builder setAlternatives(int index, SpeechRecognitionAlternative value)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
value | SpeechRecognitionAlternative |
Type | Description |
SpeechRecognitionResult.Builder |
setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
public SpeechRecognitionResult.Builder setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
May contain one or more recognition hypotheses. These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.
repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
Name | Description |
index | int |
builderForValue | SpeechRecognitionAlternative.Builder |
Type | Description |
SpeechRecognitionResult.Builder |
setChannelTag(int value)
public SpeechRecognitionResult.Builder setChannelTag(int value)
For multi-channel audio, this is the channel number corresponding to the
recognized result for the audio from that channel.
For audio_channel_count
= N
, its output values can range from 1
to
N
.
int32 channel_tag = 2;
Name | Description |
value | int The channelTag to set. |
Type | Description |
SpeechRecognitionResult.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public SpeechRecognitionResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
SpeechRecognitionResult.Builder |
setLanguageCode(String value)
public SpeechRecognitionResult.Builder setLanguageCode(String value)
Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | String The languageCode to set. |
Type | Description |
SpeechRecognitionResult.Builder | This builder for chaining. |
setLanguageCodeBytes(ByteString value)
public SpeechRecognitionResult.Builder setLanguageCodeBytes(ByteString value)
Output only. The BCP-47 language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.
string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Name | Description |
value | ByteString The bytes for languageCode to set. |
Type | Description |
SpeechRecognitionResult.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SpeechRecognitionResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
SpeechRecognitionResult.Builder |
setResultEndOffset(Duration value)
public SpeechRecognitionResult.Builder setResultEndOffset(Duration value)
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Name | Description |
value | Duration |
Type | Description |
SpeechRecognitionResult.Builder |
setResultEndOffset(Duration.Builder builderForValue)
public SpeechRecognitionResult.Builder setResultEndOffset(Duration.Builder builderForValue)
Time offset of the end of this result relative to the beginning of the audio.
.google.protobuf.Duration result_end_offset = 4;
Name | Description |
builderForValue | Builder |
Type | Description |
SpeechRecognitionResult.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final SpeechRecognitionResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
SpeechRecognitionResult.Builder |