Package com.google.cloud.speech.v1
Class PhraseSet.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
com.google.cloud.speech.v1.PhraseSet.Builder
- All Implemented Interfaces:
PhraseSetOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- PhraseSet
public static final class PhraseSet.Builder
extends com.google.protobuf.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionaddAllPhrases(Iterable<? extends PhraseSet.Phrase> values) A list of word and phrases.addPhrases(int index, PhraseSet.Phrase value) A list of word and phrases.addPhrases(int index, PhraseSet.Phrase.Builder builderForValue) A list of word and phrases.addPhrases(PhraseSet.Phrase value) A list of word and phrases.addPhrases(PhraseSet.Phrase.Builder builderForValue) A list of word and phrases.A list of word and phrases.addPhrasesBuilder(int index) A list of word and phrases.build()clear()Hint Boost.The resource name of the phrase set.A list of word and phrases.floatgetBoost()Hint Boost.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetName()The resource name of the phrase set.com.google.protobuf.ByteStringThe resource name of the phrase set.getPhrases(int index) A list of word and phrases.getPhrasesBuilder(int index) A list of word and phrases.A list of word and phrases.intA list of word and phrases.A list of word and phrases.getPhrasesOrBuilder(int index) A list of word and phrases.List<? extends PhraseSet.PhraseOrBuilder>A list of word and phrases.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removePhrases(int index) A list of word and phrases.setBoost(float value) Hint Boost.The resource name of the phrase set.setNameBytes(com.google.protobuf.ByteString value) The resource name of the phrase set.setPhrases(int index, PhraseSet.Phrase value) A list of word and phrases.setPhrases(int index, PhraseSet.Phrase.Builder builderForValue) A list of word and phrases.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PhraseSet.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
-
mergeFrom
public PhraseSet.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PhraseSet.Builder>- Throws:
IOException
-
getName
The resource name of the phrase set.
string name = 1;- Specified by:
getNamein interfacePhraseSetOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The resource name of the phrase set.
string name = 1;- Specified by:
getNameBytesin interfacePhraseSetOrBuilder- Returns:
- The bytes for name.
-
setName
The resource name of the phrase set.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The resource name of the phrase set.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The resource name of the phrase set.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getPhrasesList
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;- Specified by:
getPhrasesListin interfacePhraseSetOrBuilder
-
getPhrasesCount
public int getPhrasesCount()A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;- Specified by:
getPhrasesCountin interfacePhraseSetOrBuilder
-
getPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;- Specified by:
getPhrasesin interfacePhraseSetOrBuilder
-
setPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
setPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
addPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
addPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
addPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
addPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
addAllPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
clearPhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
removePhrases
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
getPhrasesBuilder
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
getPhrasesOrBuilder
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;- Specified by:
getPhrasesOrBuilderin interfacePhraseSetOrBuilder
-
getPhrasesOrBuilderList
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;- Specified by:
getPhrasesOrBuilderListin interfacePhraseSetOrBuilder
-
addPhrasesBuilder
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
addPhrasesBuilder
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
getPhrasesBuilderList
A list of word and phrases.
repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2; -
getBoost
public float 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;- Specified by:
getBoostin interfacePhraseSetOrBuilder- Returns:
- The boost.
-
setBoost
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;- Parameters:
value- The boost to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-