Class SpeechAdaptation.Builder (4.37.0)

public static final class SpeechAdaptation.Builder extends GeneratedMessageV3.Builder<SpeechAdaptation.Builder> implements SpeechAdaptationOrBuilder

Provides "hints" to the speech recognizer to favor specific words and phrases in the results. PhraseSets can be specified as an inline resource, or a reference to an existing PhraseSet resource.

Protobuf type google.cloud.speech.v2.SpeechAdaptation

Static Methods

getDescriptor()

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

Methods

addAllCustomClasses(Iterable<? extends CustomClass> values)

public SpeechAdaptation.Builder addAllCustomClasses(Iterable<? extends CustomClass> values)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.speech.v2.CustomClass>
Returns
Type Description
SpeechAdaptation.Builder

addAllPhraseSets(Iterable<? extends SpeechAdaptation.AdaptationPhraseSet> values)

public SpeechAdaptation.Builder addAllPhraseSets(Iterable<? extends SpeechAdaptation.AdaptationPhraseSet> values)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet>
Returns
Type Description
SpeechAdaptation.Builder

addCustomClasses(CustomClass value)

public SpeechAdaptation.Builder addCustomClasses(CustomClass value)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
value CustomClass
Returns
Type Description
SpeechAdaptation.Builder

addCustomClasses(CustomClass.Builder builderForValue)

public SpeechAdaptation.Builder addCustomClasses(CustomClass.Builder builderForValue)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
builderForValue CustomClass.Builder
Returns
Type Description
SpeechAdaptation.Builder

addCustomClasses(int index, CustomClass value)

public SpeechAdaptation.Builder addCustomClasses(int index, CustomClass value)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
Name Description
index int
value CustomClass
Returns
Type Description
SpeechAdaptation.Builder

addCustomClasses(int index, CustomClass.Builder builderForValue)

public SpeechAdaptation.Builder addCustomClasses(int index, CustomClass.Builder builderForValue)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
Name Description
index int
builderForValue CustomClass.Builder
Returns
Type Description
SpeechAdaptation.Builder

addCustomClassesBuilder()

public CustomClass.Builder addCustomClassesBuilder()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
Type Description
CustomClass.Builder

addCustomClassesBuilder(int index)

public CustomClass.Builder addCustomClassesBuilder(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
index int
Returns
Type Description
CustomClass.Builder

addPhraseSets(SpeechAdaptation.AdaptationPhraseSet value)

public SpeechAdaptation.Builder addPhraseSets(SpeechAdaptation.AdaptationPhraseSet value)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
value SpeechAdaptation.AdaptationPhraseSet
Returns
Type Description
SpeechAdaptation.Builder

addPhraseSets(SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

public SpeechAdaptation.Builder addPhraseSets(SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
builderForValue SpeechAdaptation.AdaptationPhraseSet.Builder
Returns
Type Description
SpeechAdaptation.Builder

addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

public SpeechAdaptation.Builder addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
Name Description
index int
value SpeechAdaptation.AdaptationPhraseSet
Returns
Type Description
SpeechAdaptation.Builder

addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

public SpeechAdaptation.Builder addPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
Name Description
index int
builderForValue SpeechAdaptation.AdaptationPhraseSet.Builder
Returns
Type Description
SpeechAdaptation.Builder

addPhraseSetsBuilder()

public SpeechAdaptation.AdaptationPhraseSet.Builder addPhraseSetsBuilder()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
Type Description
SpeechAdaptation.AdaptationPhraseSet.Builder

addPhraseSetsBuilder(int index)

public SpeechAdaptation.AdaptationPhraseSet.Builder addPhraseSetsBuilder(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
index int
Returns
Type Description
SpeechAdaptation.AdaptationPhraseSet.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SpeechAdaptation build()
Returns
Type Description
SpeechAdaptation

buildPartial()

public SpeechAdaptation buildPartial()
Returns
Type Description
SpeechAdaptation

clear()

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

clearCustomClasses()

public SpeechAdaptation.Builder clearCustomClasses()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
Type Description
SpeechAdaptation.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPhraseSets()

public SpeechAdaptation.Builder clearPhraseSets()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
Type Description
SpeechAdaptation.Builder

clone()

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

getCustomClasses(int index)

public CustomClass getCustomClasses(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
index int
Returns
Type Description
CustomClass

getCustomClassesBuilder(int index)

public CustomClass.Builder getCustomClassesBuilder(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
index int
Returns
Type Description
CustomClass.Builder

getCustomClassesBuilderList()

public List<CustomClass.Builder> getCustomClassesBuilderList()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
Type Description
List<Builder>

getCustomClassesCount()

public int getCustomClassesCount()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
Type Description
int

getCustomClassesList()

public List<CustomClass> getCustomClassesList()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
Type Description
List<CustomClass>

getCustomClassesOrBuilder(int index)

public CustomClassOrBuilder getCustomClassesOrBuilder(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
index int
Returns
Type Description
CustomClassOrBuilder

getCustomClassesOrBuilderList()

public List<? extends CustomClassOrBuilder> getCustomClassesOrBuilderList()

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Returns
Type Description
List<? extends com.google.cloud.speech.v2.CustomClassOrBuilder>

getDefaultInstanceForType()

public SpeechAdaptation getDefaultInstanceForType()
Returns
Type Description
SpeechAdaptation

getDescriptorForType()

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

getPhraseSets(int index)

public SpeechAdaptation.AdaptationPhraseSet getPhraseSets(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
index int
Returns
Type Description
SpeechAdaptation.AdaptationPhraseSet

getPhraseSetsBuilder(int index)

public SpeechAdaptation.AdaptationPhraseSet.Builder getPhraseSetsBuilder(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
index int
Returns
Type Description
SpeechAdaptation.AdaptationPhraseSet.Builder

getPhraseSetsBuilderList()

public List<SpeechAdaptation.AdaptationPhraseSet.Builder> getPhraseSetsBuilderList()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
Type Description
List<Builder>

getPhraseSetsCount()

public int getPhraseSetsCount()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
Type Description
int

getPhraseSetsList()

public List<SpeechAdaptation.AdaptationPhraseSet> getPhraseSetsList()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
Type Description
List<AdaptationPhraseSet>

getPhraseSetsOrBuilder(int index)

public SpeechAdaptation.AdaptationPhraseSetOrBuilder getPhraseSetsOrBuilder(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
index int
Returns
Type Description
SpeechAdaptation.AdaptationPhraseSetOrBuilder

getPhraseSetsOrBuilderList()

public List<? extends SpeechAdaptation.AdaptationPhraseSetOrBuilder> getPhraseSetsOrBuilderList()

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Returns
Type Description
List<? extends com.google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSetOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SpeechAdaptation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeCustomClasses(int index)

public SpeechAdaptation.Builder removeCustomClasses(int index)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameter
Name Description
index int
Returns
Type Description
SpeechAdaptation.Builder

removePhraseSets(int index)

public SpeechAdaptation.Builder removePhraseSets(int index)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameter
Name Description
index int
Returns
Type Description
SpeechAdaptation.Builder

setCustomClasses(int index, CustomClass value)

public SpeechAdaptation.Builder setCustomClasses(int index, CustomClass value)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
Name Description
index int
value CustomClass
Returns
Type Description
SpeechAdaptation.Builder

setCustomClasses(int index, CustomClass.Builder builderForValue)

public SpeechAdaptation.Builder setCustomClasses(int index, CustomClass.Builder builderForValue)

A list of inline CustomClasses. Existing CustomClass resources can be referenced directly in a PhraseSet.

repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;

Parameters
Name Description
index int
builderForValue CustomClass.Builder
Returns
Type Description
SpeechAdaptation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

public SpeechAdaptation.Builder setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet value)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
Name Description
index int
value SpeechAdaptation.AdaptationPhraseSet
Returns
Type Description
SpeechAdaptation.Builder

setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

public SpeechAdaptation.Builder setPhraseSets(int index, SpeechAdaptation.AdaptationPhraseSet.Builder builderForValue)

A list of inline or referenced PhraseSets.

repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;

Parameters
Name Description
index int
builderForValue SpeechAdaptation.AdaptationPhraseSet.Builder
Returns
Type Description
SpeechAdaptation.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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