public final class PhraseSet extends GeneratedMessageV3 implements PhraseSetOrBuilder
Provides "hints" to the speech recognizer to favor specific words and phrases
in the results.
Protobuf type google.cloud.speech.v1.PhraseSet
Static Fields
BOOST_FIELD_NUMBER
public static final int BOOST_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PHRASES_FIELD_NUMBER
public static final int PHRASES_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static PhraseSet getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static PhraseSet.Builder newBuilder()
Returns
newBuilder(PhraseSet prototype)
public static PhraseSet.Builder newBuilder(PhraseSet prototype)
Parameter
Returns
public static PhraseSet parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static PhraseSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static PhraseSet parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PhraseSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static PhraseSet parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PhraseSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static PhraseSet parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static PhraseSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static PhraseSet parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static PhraseSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static PhraseSet parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PhraseSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<PhraseSet> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
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. Speech recognition
will skip PhraseSets with a boost value of 0.
float boost = 4;
Returns
Type | Description |
float | The boost.
|
getDefaultInstanceForType()
public PhraseSet getDefaultInstanceForType()
Returns
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
getParserForType()
public Parser<PhraseSet> getParserForType()
Returns
Overrides
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
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> | |
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public PhraseSet.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected PhraseSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public PhraseSet.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions