public static final class PhraseSet.Builder extends GeneratedMessageV3.Builder<PhraseSet.Builder> implements PhraseSetOrBuilder
Provides "hints" to the speech recognizer to favor specific words and phrases
in the results.
Protobuf type google.cloud.speech.v1.PhraseSet
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllPhrases(Iterable<? extends PhraseSet.Phrase> values)
public PhraseSet.Builder addAllPhrases(Iterable<? extends PhraseSet.Phrase> values)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Name | Description |
values | Iterable<? extends com.google.cloud.speech.v1.PhraseSet.Phrase>
|
Returns
addPhrases(PhraseSet.Phrase value)
public PhraseSet.Builder addPhrases(PhraseSet.Phrase value)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
addPhrases(PhraseSet.Phrase.Builder builderForValue)
public PhraseSet.Builder addPhrases(PhraseSet.Phrase.Builder builderForValue)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
addPhrases(int index, PhraseSet.Phrase value)
public PhraseSet.Builder addPhrases(int index, PhraseSet.Phrase value)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameters
Returns
addPhrases(int index, PhraseSet.Phrase.Builder builderForValue)
public PhraseSet.Builder addPhrases(int index, PhraseSet.Phrase.Builder builderForValue)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameters
Returns
addPhrasesBuilder()
public PhraseSet.Phrase.Builder addPhrasesBuilder()
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Returns
addPhrasesBuilder(int index)
public PhraseSet.Phrase.Builder addPhrasesBuilder(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PhraseSet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public PhraseSet buildPartial()
Returns
clear()
public PhraseSet.Builder clear()
Returns
Overrides
clearBoost()
public PhraseSet.Builder clearBoost()
Hint Boost. Positive value will increase the probability that a specific
phrase will be recognized over other similar sounding phrases. The higher
the boost, the higher the chance of false positive recognition as well.
Negative boost values would correspond to anti-biasing. Anti-biasing is not
enabled, so negative boost will simply be ignored. Though boost
can
accept a wide range of positive values, most use cases are best served with
values between 0 (exclusive) and 20. We recommend using a binary search
approach to finding the optimal value for your use case as well as adding
phrases both with and without boost to your requests.
float boost = 4;
Returns
clearField(Descriptors.FieldDescriptor field)
public PhraseSet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearName()
public PhraseSet.Builder clearName()
The resource name of the phrase set.
string name = 1;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public PhraseSet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearPhrases()
public PhraseSet.Builder clearPhrases()
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Returns
clone()
public PhraseSet.Builder clone()
Returns
Overrides
getBoost()
Hint Boost. Positive value will increase the probability that a specific
phrase will be recognized over other similar sounding phrases. The higher
the boost, the higher the chance of false positive recognition as well.
Negative boost values would correspond to anti-biasing. Anti-biasing is not
enabled, so negative boost will simply be ignored. Though boost
can
accept a wide range of positive values, most use cases are best served with
values between 0 (exclusive) and 20. We recommend using a binary search
approach to finding the optimal value for your use case as well as adding
phrases both with and without boost to your requests.
float boost = 4;
Returns
Type | Description |
float | The boost.
|
getDefaultInstanceForType()
public PhraseSet getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getName()
The resource name of the phrase set.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
The resource name of the phrase set.
string name = 1;
Returns
getPhrases(int index)
public PhraseSet.Phrase getPhrases(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
getPhrasesBuilder(int index)
public PhraseSet.Phrase.Builder getPhrasesBuilder(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
getPhrasesBuilderList()
public List<PhraseSet.Phrase.Builder> getPhrasesBuilderList()
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Returns
getPhrasesCount()
public int getPhrasesCount()
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Returns
getPhrasesList()
public List<PhraseSet.Phrase> getPhrasesList()
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Returns
getPhrasesOrBuilder(int index)
public PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
getPhrasesOrBuilderList()
public List<? extends PhraseSet.PhraseOrBuilder> getPhrasesOrBuilderList()
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Returns
Type | Description |
List<? extends com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder> | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(PhraseSet other)
public PhraseSet.Builder mergeFrom(PhraseSet other)
Parameter
Returns
public PhraseSet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PhraseSet.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PhraseSet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removePhrases(int index)
public PhraseSet.Builder removePhrases(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameter
Returns
setBoost(float value)
public PhraseSet.Builder setBoost(float value)
Hint Boost. Positive value will increase the probability that a specific
phrase will be recognized over other similar sounding phrases. The higher
the boost, the higher the chance of false positive recognition as well.
Negative boost values would correspond to anti-biasing. Anti-biasing is not
enabled, so negative boost will simply be ignored. Though boost
can
accept a wide range of positive values, most use cases are best served with
values between 0 (exclusive) and 20. We recommend using a binary search
approach to finding the optimal value for your use case as well as adding
phrases both with and without boost to your requests.
float boost = 4;
Parameter
Name | Description |
value | float
The boost to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public PhraseSet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
public PhraseSet.Builder setName(String value)
The resource name of the phrase set.
string name = 1;
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public PhraseSet.Builder setNameBytes(ByteString value)
The resource name of the phrase set.
string name = 1;
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setPhrases(int index, PhraseSet.Phrase value)
public PhraseSet.Builder setPhrases(int index, PhraseSet.Phrase value)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameters
Returns
setPhrases(int index, PhraseSet.Phrase.Builder builderForValue)
public PhraseSet.Builder setPhrases(int index, PhraseSet.Phrase.Builder builderForValue)
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
Parameters
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PhraseSet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PhraseSet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides