Class SpeechTranscription.Builder

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

public static final class SpeechTranscription.Builder extends com.google.protobuf.GeneratedMessage.Builder<SpeechTranscription.Builder> implements SpeechTranscriptionOrBuilder
 A speech recognition result corresponding to a portion of the audio.
 
Protobuf type google.cloud.videointelligence.v1.SpeechTranscription
  • 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<SpeechTranscription.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<SpeechTranscription.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<SpeechTranscription.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

      public SpeechTranscription.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<SpeechTranscription.Builder>
      Throws:
      IOException
    • getAlternativesList

      public List<SpeechRecognitionAlternative> getAlternativesList()
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
      Specified by:
      getAlternativesList in interface SpeechTranscriptionOrBuilder
    • getAlternativesCount

      public int getAlternativesCount()
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
      Specified by:
      getAlternativesCount in interface SpeechTranscriptionOrBuilder
    • getAlternatives

      public SpeechRecognitionAlternative getAlternatives(int index)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
      Specified by:
      getAlternatives in interface SpeechTranscriptionOrBuilder
    • setAlternatives

      public SpeechTranscription.Builder setAlternatives(int index, SpeechRecognitionAlternative value)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • setAlternatives

      public SpeechTranscription.Builder setAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • addAlternatives

       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • addAlternatives

      public SpeechTranscription.Builder addAlternatives(int index, SpeechRecognitionAlternative value)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • addAlternatives

      public SpeechTranscription.Builder addAlternatives(SpeechRecognitionAlternative.Builder builderForValue)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • addAlternatives

      public SpeechTranscription.Builder addAlternatives(int index, SpeechRecognitionAlternative.Builder builderForValue)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • addAllAlternatives

      public SpeechTranscription.Builder addAllAlternatives(Iterable<? extends SpeechRecognitionAlternative> values)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • clearAlternatives

      public SpeechTranscription.Builder clearAlternatives()
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • removeAlternatives

      public SpeechTranscription.Builder removeAlternatives(int index)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • getAlternativesBuilder

      public SpeechRecognitionAlternative.Builder getAlternativesBuilder(int index)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • getAlternativesOrBuilder

      public SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
      Specified by:
      getAlternativesOrBuilder in interface SpeechTranscriptionOrBuilder
    • getAlternativesOrBuilderList

      public List<? extends SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList()
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
      Specified by:
      getAlternativesOrBuilderList in interface SpeechTranscriptionOrBuilder
    • addAlternativesBuilder

      public SpeechRecognitionAlternative.Builder addAlternativesBuilder()
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • addAlternativesBuilder

      public SpeechRecognitionAlternative.Builder addAlternativesBuilder(int index)
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • getAlternativesBuilderList

      public List<SpeechRecognitionAlternative.Builder> getAlternativesBuilderList()
       May contain one or more recognition hypotheses (up to the maximum specified
       in `max_alternatives`).  These alternatives are ordered in terms of
       accuracy, with the top (first) alternative being the most probable, as
       ranked by the recognizer.
       
      repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1;
    • getLanguageCode

      public String getLanguageCode()
       Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
       language tag of the language in this result. This language code was
       detected to have the most likelihood of being spoken in the audio.
       
      string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLanguageCode in interface SpeechTranscriptionOrBuilder
      Returns:
      The languageCode.
    • getLanguageCodeBytes

      public com.google.protobuf.ByteString getLanguageCodeBytes()
       Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
       language tag of the language in this result. This language code was
       detected to have the most likelihood of being spoken in the audio.
       
      string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getLanguageCodeBytes in interface SpeechTranscriptionOrBuilder
      Returns:
      The bytes for languageCode.
    • setLanguageCode

      public SpeechTranscription.Builder setLanguageCode(String value)
       Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
       language tag of the language in this result. This language code was
       detected to have the most likelihood of being spoken in the audio.
       
      string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The languageCode to set.
      Returns:
      This builder for chaining.
    • clearLanguageCode

      public SpeechTranscription.Builder clearLanguageCode()
       Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
       language tag of the language in this result. This language code was
       detected to have the most likelihood of being spoken in the audio.
       
      string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setLanguageCodeBytes

      public SpeechTranscription.Builder setLanguageCodeBytes(com.google.protobuf.ByteString value)
       Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
       language tag of the language in this result. This language code was
       detected to have the most likelihood of being spoken in the audio.
       
      string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for languageCode to set.
      Returns:
      This builder for chaining.