Class SpeechRecognitionResult.Builder

    • Method Detail

      • getDescriptor

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

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

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

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

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

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

        public SpeechRecognitionResult.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>
      • clearField

        public SpeechRecognitionResult.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>
      • clearOneof

        public SpeechRecognitionResult.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>
      • setRepeatedField

        public SpeechRecognitionResult.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                int index,
                                                                Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>
      • addRepeatedField

        public SpeechRecognitionResult.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>
      • isInitialized

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

        public SpeechRecognitionResult.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<SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
        Specified by:
        getAlternativesList in interface SpeechRecognitionResultOrBuilder
      • 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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
        Specified by:
        getAlternativesCount in interface SpeechRecognitionResultOrBuilder
      • 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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
        Specified by:
        getAlternatives in interface SpeechRecognitionResultOrBuilder
      • setAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • setAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternatives

        public SpeechRecognitionResult.Builder addAlternatives​(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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAllAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • clearAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • removeAlternatives

        public SpeechRecognitionResult.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.speech.v1p1beta1.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.speech.v1p1beta1.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
        Specified by:
        getAlternativesOrBuilder in interface SpeechRecognitionResultOrBuilder
      • 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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
        Specified by:
        getAlternativesOrBuilderList in interface SpeechRecognitionResultOrBuilder
      • 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.speech.v1p1beta1.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.speech.v1p1beta1.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.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
      • getChannelTag

        public int getChannelTag()
         For multi-channel audio, this is the channel number corresponding to the
         recognized result for the audio from that channel.
         For audio_channel_count = N, its output values can range from '1' to 'N'.
         
        int32 channel_tag = 2;
        Specified by:
        getChannelTag in interface SpeechRecognitionResultOrBuilder
        Returns:
        The channelTag.
      • setChannelTag

        public SpeechRecognitionResult.Builder setChannelTag​(int value)
         For multi-channel audio, this is the channel number corresponding to the
         recognized result for the audio from that channel.
         For audio_channel_count = N, its output values can range from '1' to 'N'.
         
        int32 channel_tag = 2;
        Parameters:
        value - The channelTag to set.
        Returns:
        This builder for chaining.
      • clearChannelTag

        public SpeechRecognitionResult.Builder clearChannelTag()
         For multi-channel audio, this is the channel number corresponding to the
         recognized result for the audio from that channel.
         For audio_channel_count = N, its output values can range from '1' to 'N'.
         
        int32 channel_tag = 2;
        Returns:
        This builder for chaining.
      • hasResultEndTime

        public boolean hasResultEndTime()
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
        Specified by:
        hasResultEndTime in interface SpeechRecognitionResultOrBuilder
        Returns:
        Whether the resultEndTime field is set.
      • getResultEndTime

        public com.google.protobuf.Duration getResultEndTime()
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
        Specified by:
        getResultEndTime in interface SpeechRecognitionResultOrBuilder
        Returns:
        The resultEndTime.
      • setResultEndTime

        public SpeechRecognitionResult.Builder setResultEndTime​(com.google.protobuf.Duration value)
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
      • setResultEndTime

        public SpeechRecognitionResult.Builder setResultEndTime​(com.google.protobuf.Duration.Builder builderForValue)
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
      • mergeResultEndTime

        public SpeechRecognitionResult.Builder mergeResultEndTime​(com.google.protobuf.Duration value)
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
      • clearResultEndTime

        public SpeechRecognitionResult.Builder clearResultEndTime()
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
      • getResultEndTimeBuilder

        public com.google.protobuf.Duration.Builder getResultEndTimeBuilder()
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
      • getResultEndTimeOrBuilder

        public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder()
         Time offset of the end of this result relative to the
         beginning of the audio.
         
        .google.protobuf.Duration result_end_time = 4;
        Specified by:
        getResultEndTimeOrBuilder in interface SpeechRecognitionResultOrBuilder
      • 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 = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLanguageCode in interface SpeechRecognitionResultOrBuilder
        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 = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getLanguageCodeBytes in interface SpeechRecognitionResultOrBuilder
        Returns:
        The bytes for languageCode.
      • setLanguageCode

        public SpeechRecognitionResult.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 = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The languageCode to set.
        Returns:
        This builder for chaining.
      • clearLanguageCode

        public SpeechRecognitionResult.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 = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setLanguageCodeBytes

        public SpeechRecognitionResult.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 = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The bytes for languageCode to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final SpeechRecognitionResult.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>
      • mergeUnknownFields

        public final SpeechRecognitionResult.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<SpeechRecognitionResult.Builder>