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.v1p1beta1.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()
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.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter |
---|
Name | Description |
values | Iterable<? extends com.google.cloud.speech.v1p1beta1.PhraseSet.Phrase>
|
addPhrases(PhraseSet.Phrase value)
public PhraseSet.Builder addPhrases(PhraseSet.Phrase value)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
addPhrases(PhraseSet.Phrase.Builder builderForValue)
public PhraseSet.Builder addPhrases(PhraseSet.Phrase.Builder builderForValue)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
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.v1p1beta1.PhraseSet.Phrase phrases = 2;
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.v1p1beta1.PhraseSet.Phrase phrases = 2;
addPhrasesBuilder()
public PhraseSet.Phrase.Builder addPhrasesBuilder()
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
addPhrasesBuilder(int index)
public PhraseSet.Phrase.Builder addPhrasesBuilder(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter |
---|
Name | Description |
index | int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PhraseSet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
buildPartial()
public PhraseSet buildPartial()
clear()
public PhraseSet.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public PhraseSet.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearName()
public PhraseSet.Builder clearName()
The resource name of the phrase set.
string name = 1;
clearOneof(Descriptors.OneofDescriptor oneof)
public PhraseSet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearPhrases()
public PhraseSet.Builder clearPhrases()
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
clone()
public PhraseSet.Builder clone()
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()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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 |
---|
Type | Description |
ByteString | The bytes for name.
|
getPhrases(int index)
public PhraseSet.Phrase getPhrases(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter |
---|
Name | Description |
index | int
|
getPhrasesBuilder(int index)
public PhraseSet.Phrase.Builder getPhrasesBuilder(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter |
---|
Name | Description |
index | int
|
getPhrasesBuilderList()
public List<PhraseSet.Phrase.Builder> getPhrasesBuilderList()
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
getPhrasesCount()
public int getPhrasesCount()
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Returns |
---|
Type | Description |
int | |
getPhrasesList()
public List<PhraseSet.Phrase> getPhrasesList()
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
getPhrasesOrBuilder(int index)
public PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter |
---|
Name | Description |
index | int
|
getPhrasesOrBuilderList()
public List<? extends PhraseSet.PhraseOrBuilder> getPhrasesOrBuilderList()
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Returns |
---|
Type | Description |
List<? extends com.google.cloud.speech.v1p1beta1.PhraseSet.PhraseOrBuilder> | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(PhraseSet other)
public PhraseSet.Builder mergeFrom(PhraseSet other)
public PhraseSet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public PhraseSet.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PhraseSet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removePhrases(int index)
public PhraseSet.Builder removePhrases(int index)
A list of word and phrases.
repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
Parameter |
---|
Name | Description |
index | int
|
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.
|
setField(Descriptors.FieldDescriptor field, Object value)
public PhraseSet.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
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.v1p1beta1.PhraseSet.Phrase phrases = 2;
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.v1p1beta1.PhraseSet.Phrase phrases = 2;
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PhraseSet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PhraseSet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides