Class SpeechContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SpeechContext.Builder>
com.google.cloud.videointelligence.v1.SpeechContext.Builder
All Implemented Interfaces:
SpeechContextOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SpeechContext

public static final class SpeechContext.Builder extends com.google.protobuf.GeneratedMessage.Builder<SpeechContext.Builder> implements SpeechContextOrBuilder
 Provides "hints" to the speech recognizer to favor specific words and phrases
 in the results.
 
Protobuf type google.cloud.videointelligence.v1.SpeechContext
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional.
    Optional.
    addPhrasesBytes(com.google.protobuf.ByteString value)
    Optional.
     
     
     
    Optional.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    getPhrases(int index)
    Optional.
    com.google.protobuf.ByteString
    getPhrasesBytes(int index)
    Optional.
    int
    Optional.
    com.google.protobuf.ProtocolStringList
    Optional.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setPhrases(int index, String value)
    Optional.

    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SpeechContext.Builder>
    • clear

      public SpeechContext.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<SpeechContext.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<SpeechContext.Builder>
    • getDefaultInstanceForType

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

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

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

      public SpeechContext.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<SpeechContext.Builder>
    • mergeFrom

      public SpeechContext.Builder mergeFrom(SpeechContext other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SpeechContext.Builder>
    • mergeFrom

      public SpeechContext.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<SpeechContext.Builder>
      Throws:
      IOException
    • getPhrasesList

      public com.google.protobuf.ProtocolStringList getPhrasesList()
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPhrasesList in interface SpeechContextOrBuilder
      Returns:
      A list containing the phrases.
    • getPhrasesCount

      public int getPhrasesCount()
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPhrasesCount in interface SpeechContextOrBuilder
      Returns:
      The count of phrases.
    • getPhrases

      public String getPhrases(int index)
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPhrases in interface SpeechContextOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The phrases at the given index.
    • getPhrasesBytes

      public com.google.protobuf.ByteString getPhrasesBytes(int index)
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPhrasesBytes in interface SpeechContextOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the phrases at the given index.
    • setPhrases

      public SpeechContext.Builder setPhrases(int index, String value)
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      index - The index to set the value at.
      value - The phrases to set.
      Returns:
      This builder for chaining.
    • addPhrases

      public SpeechContext.Builder addPhrases(String value)
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The phrases to add.
      Returns:
      This builder for chaining.
    • addAllPhrases

      public SpeechContext.Builder addAllPhrases(Iterable<String> values)
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      values - The phrases to add.
      Returns:
      This builder for chaining.
    • clearPhrases

      public SpeechContext.Builder clearPhrases()
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • addPhrasesBytes

      public SpeechContext.Builder addPhrasesBytes(com.google.protobuf.ByteString value)
       Optional. A list of strings containing words and phrases "hints" so that
       the speech recognition is more likely to recognize them. This can be used
       to improve the accuracy for specific words and phrases, for example, if
       specific commands are typically spoken by the user. This can also be used
       to add additional words to the vocabulary of the recognizer. See
       [usage limits](https://cloud.google.com/speech/limits#content).
       
      repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes of the phrases to add.
      Returns:
      This builder for chaining.