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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
    • clear

      public PhraseSet.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<PhraseSet.Builder>
    • getDefaultInstanceForType

      public PhraseSet getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public PhraseSet build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PhraseSet buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public PhraseSet.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PhraseSet.Builder>
    • mergeFrom

      public PhraseSet.Builder mergeFrom(PhraseSet other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PhraseSet.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The resource name of the phrase set.
       
      string name = 1;
      Specified by:
      getName in interface PhraseSetOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The resource name of the phrase set.
       
      string name = 1;
      Specified by:
      getNameBytes in interface PhraseSetOrBuilder
      Returns:
      The bytes for name.
    • setName

      public PhraseSet.Builder setName(String value)
       The resource name of the phrase set.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public PhraseSet.Builder clearName()
       The resource name of the phrase set.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public PhraseSet.Builder setNameBytes(com.google.protobuf.ByteString value)
       The resource name of the phrase set.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getPhrasesList

      public List<PhraseSet.Phrase> getPhrasesList()
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
      Specified by:
      getPhrasesList in interface PhraseSetOrBuilder
    • getPhrasesCount

      public int getPhrasesCount()
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
      Specified by:
      getPhrasesCount in interface PhraseSetOrBuilder
    • getPhrases

      public PhraseSet.Phrase getPhrases(int index)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
      Specified by:
      getPhrases in interface PhraseSetOrBuilder
    • setPhrases

      public PhraseSet.Builder setPhrases(int index, PhraseSet.Phrase value)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • setPhrases

      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;
    • addPhrases

      public PhraseSet.Builder addPhrases(PhraseSet.Phrase value)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • addPhrases

      public PhraseSet.Builder addPhrases(int index, PhraseSet.Phrase value)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • addPhrases

      public PhraseSet.Builder addPhrases(PhraseSet.Phrase.Builder builderForValue)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • addPhrases

      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;
    • addAllPhrases

      public PhraseSet.Builder addAllPhrases(Iterable<? extends PhraseSet.Phrase> values)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • clearPhrases

      public PhraseSet.Builder clearPhrases()
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • removePhrases

      public PhraseSet.Builder removePhrases(int index)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • getPhrasesBuilder

      public PhraseSet.Phrase.Builder getPhrasesBuilder(int index)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • getPhrasesOrBuilder

      public PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
      Specified by:
      getPhrasesOrBuilder in interface PhraseSetOrBuilder
    • getPhrasesOrBuilderList

      public List<? extends PhraseSet.PhraseOrBuilder> getPhrasesOrBuilderList()
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
      Specified by:
      getPhrasesOrBuilderList in interface PhraseSetOrBuilder
    • addPhrasesBuilder

      public PhraseSet.Phrase.Builder addPhrasesBuilder()
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • addPhrasesBuilder

      public PhraseSet.Phrase.Builder addPhrasesBuilder(int index)
       A list of word and phrases.
       
      repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
    • getPhrasesBuilderList

      public List<PhraseSet.Phrase.Builder> 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:
      getBoost in interface PhraseSetOrBuilder
      Returns:
      The boost.
    • setBoost

      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;
      Parameters:
      value - The boost to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.