Class WordInfo.Builder (4.49.0)

public static final class WordInfo.Builder extends GeneratedMessageV3.Builder<WordInfo.Builder> implements WordInfoOrBuilder

Word-specific information for recognized words.

Protobuf type google.cloud.speech.v1.WordInfo

Implements

WordInfoOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WordInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WordInfo.Builder
Overrides

build()

public WordInfo build()
Returns
Type Description
WordInfo

buildPartial()

public WordInfo buildPartial()
Returns
Type Description
WordInfo

clear()

public WordInfo.Builder clear()
Returns
Type Description
WordInfo.Builder
Overrides

clearConfidence()

public WordInfo.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 = 4;

Returns
Type Description
WordInfo.Builder

This builder for chaining.

clearEndTime()

public WordInfo.Builder clearEndTime()

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Returns
Type Description
WordInfo.Builder

clearField(Descriptors.FieldDescriptor field)

public WordInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
WordInfo.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public WordInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
WordInfo.Builder
Overrides

clearSpeakerLabel()

public WordInfo.Builder clearSpeakerLabel()

Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example "patient" or "provider", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.

string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WordInfo.Builder

This builder for chaining.

clearSpeakerTag() (deprecated)

public WordInfo.Builder clearSpeakerTag()

Deprecated. google.cloud.speech.v1.WordInfo.speaker_tag is deprecated. See google/cloud/speech/v1/cloud_speech.proto;l=974

Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only for the top alternative. Note: Use speaker_label instead.

int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
WordInfo.Builder

This builder for chaining.

clearStartTime()

public WordInfo.Builder clearStartTime()

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Returns
Type Description
WordInfo.Builder

clearWord()

public WordInfo.Builder clearWord()

The word corresponding to this set of information.

string word = 3;

Returns
Type Description
WordInfo.Builder

This builder for chaining.

clone()

public WordInfo.Builder clone()
Returns
Type Description
WordInfo.Builder
Overrides

getConfidence()

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 = 4;

Returns
Type Description
float

The confidence.

getDefaultInstanceForType()

public WordInfo getDefaultInstanceForType()
Returns
Type Description
WordInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndTime()

public Duration getEndTime()

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Returns
Type Description
Duration

The endTime.

getEndTimeBuilder()

public Duration.Builder getEndTimeBuilder()

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Returns
Type Description
Builder

getEndTimeOrBuilder()

public DurationOrBuilder getEndTimeOrBuilder()

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Returns
Type Description
DurationOrBuilder

getSpeakerLabel()

public String getSpeakerLabel()

Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example "patient" or "provider", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.

string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The speakerLabel.

getSpeakerLabelBytes()

public ByteString getSpeakerLabelBytes()

Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example "patient" or "provider", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.

string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for speakerLabel.

getSpeakerTag() (deprecated)

public int getSpeakerTag()

Deprecated. google.cloud.speech.v1.WordInfo.speaker_tag is deprecated. See google/cloud/speech/v1/cloud_speech.proto;l=974

Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only for the top alternative. Note: Use speaker_label instead.

int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The speakerTag.

getStartTime()

public Duration getStartTime()

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Returns
Type Description
Duration

The startTime.

getStartTimeBuilder()

public Duration.Builder getStartTimeBuilder()

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Returns
Type Description
Builder

getStartTimeOrBuilder()

public DurationOrBuilder getStartTimeOrBuilder()

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Returns
Type Description
DurationOrBuilder

getWord()

public String getWord()

The word corresponding to this set of information.

string word = 3;

Returns
Type Description
String

The word.

getWordBytes()

public ByteString getWordBytes()

The word corresponding to this set of information.

string word = 3;

Returns
Type Description
ByteString

The bytes for word.

hasEndTime()

public boolean hasEndTime()

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Returns
Type Description
boolean

Whether the endTime field is set.

hasStartTime()

public boolean hasStartTime()

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeEndTime(Duration value)

public WordInfo.Builder mergeEndTime(Duration value)

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Parameter
Name Description
value Duration
Returns
Type Description
WordInfo.Builder

mergeFrom(WordInfo other)

public WordInfo.Builder mergeFrom(WordInfo other)
Parameter
Name Description
other WordInfo
Returns
Type Description
WordInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public WordInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
WordInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public WordInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
WordInfo.Builder
Overrides

mergeStartTime(Duration value)

public WordInfo.Builder mergeStartTime(Duration value)

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Parameter
Name Description
value Duration
Returns
Type Description
WordInfo.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WordInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WordInfo.Builder
Overrides

setConfidence(float value)

public WordInfo.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 = 4;

Parameter
Name Description
value float

The confidence to set.

Returns
Type Description
WordInfo.Builder

This builder for chaining.

setEndTime(Duration value)

public WordInfo.Builder setEndTime(Duration value)

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Parameter
Name Description
value Duration
Returns
Type Description
WordInfo.Builder

setEndTime(Duration.Builder builderForValue)

public WordInfo.Builder setEndTime(Duration.Builder builderForValue)

Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration end_time = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
WordInfo.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public WordInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WordInfo.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public WordInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
WordInfo.Builder
Overrides

setSpeakerLabel(String value)

public WordInfo.Builder setSpeakerLabel(String value)

Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example "patient" or "provider", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.

string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The speakerLabel to set.

Returns
Type Description
WordInfo.Builder

This builder for chaining.

setSpeakerLabelBytes(ByteString value)

public WordInfo.Builder setSpeakerLabelBytes(ByteString value)

Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example "patient" or "provider", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.

string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for speakerLabel to set.

Returns
Type Description
WordInfo.Builder

This builder for chaining.

setSpeakerTag(int value) (deprecated)

public WordInfo.Builder setSpeakerTag(int value)

Deprecated. google.cloud.speech.v1.WordInfo.speaker_tag is deprecated. See google/cloud/speech/v1/cloud_speech.proto;l=974

Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only for the top alternative. Note: Use speaker_label instead.

int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The speakerTag to set.

Returns
Type Description
WordInfo.Builder

This builder for chaining.

setStartTime(Duration value)

public WordInfo.Builder setStartTime(Duration value)

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Parameter
Name Description
value Duration
Returns
Type Description
WordInfo.Builder

setStartTime(Duration.Builder builderForValue)

public WordInfo.Builder setStartTime(Duration.Builder builderForValue)

Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if enable_word_time_offsets=true and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.

.google.protobuf.Duration start_time = 1;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
WordInfo.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final WordInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WordInfo.Builder
Overrides

setWord(String value)

public WordInfo.Builder setWord(String value)

The word corresponding to this set of information.

string word = 3;

Parameter
Name Description
value String

The word to set.

Returns
Type Description
WordInfo.Builder

This builder for chaining.

setWordBytes(ByteString value)

public WordInfo.Builder setWordBytes(ByteString value)

The word corresponding to this set of information.

string word = 3;

Parameter
Name Description
value ByteString

The bytes for word to set.

Returns
Type Description
WordInfo.Builder

This builder for chaining.