Class StreamingRecognitionResult.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<StreamingRecognitionResult.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<StreamingRecognitionResult.Builder>
      • getDefaultInstanceForType

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

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

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

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

        public StreamingRecognitionResult.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<StreamingRecognitionResult.Builder>
        Throws:
        IOException
      • getAlternativesCount

        public int getAlternativesCount()
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
        Specified by:
        getAlternativesCount in interface StreamingRecognitionResultOrBuilder
      • setAlternatives

        public StreamingRecognitionResult.Builder setAlternatives​(int index,
                                                                  SpeechRecognitionAlternative value)
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternatives

        public StreamingRecognitionResult.Builder addAlternatives​(SpeechRecognitionAlternative value)
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternatives

        public StreamingRecognitionResult.Builder addAlternatives​(int index,
                                                                  SpeechRecognitionAlternative value)
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • clearAlternatives

        public StreamingRecognitionResult.Builder clearAlternatives()
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • removeAlternatives

        public StreamingRecognitionResult.Builder removeAlternatives​(int index)
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • getAlternativesBuilder

        public SpeechRecognitionAlternative.Builder getAlternativesBuilder​(int index)
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternativesBuilder

        public SpeechRecognitionAlternative.Builder addAlternativesBuilder()
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • addAlternativesBuilder

        public SpeechRecognitionAlternative.Builder addAlternativesBuilder​(int index)
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • getAlternativesBuilderList

        public List<SpeechRecognitionAlternative.Builder> getAlternativesBuilderList()
         *Output-only* May contain one or more recognition hypotheses (up to the
         maximum specified in `max_alternatives`).
         
        repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
      • getIsFinal

        public boolean getIsFinal()
         *Output-only* If `false`, this `StreamingRecognitionResult` represents an
         interim result that may change. If `true`, this is the final time the
         speech service will return this particular `StreamingRecognitionResult`,
         the recognizer will not return any further hypotheses for this portion of
         the transcript and corresponding audio.
         
        bool is_final = 2;
        Specified by:
        getIsFinal in interface StreamingRecognitionResultOrBuilder
      • setIsFinal

        public StreamingRecognitionResult.Builder setIsFinal​(boolean value)
         *Output-only* If `false`, this `StreamingRecognitionResult` represents an
         interim result that may change. If `true`, this is the final time the
         speech service will return this particular `StreamingRecognitionResult`,
         the recognizer will not return any further hypotheses for this portion of
         the transcript and corresponding audio.
         
        bool is_final = 2;
      • clearIsFinal

        public StreamingRecognitionResult.Builder clearIsFinal()
         *Output-only* If `false`, this `StreamingRecognitionResult` represents an
         interim result that may change. If `true`, this is the final time the
         speech service will return this particular `StreamingRecognitionResult`,
         the recognizer will not return any further hypotheses for this portion of
         the transcript and corresponding audio.
         
        bool is_final = 2;
      • getStability

        public float getStability()
         *Output-only* An estimate of the likelihood that the recognizer will not
         change its guess about this interim result. Values range from 0.0
         (completely unstable) to 1.0 (completely stable).
         This field is only provided for interim results (`is_final=false`).
         The default of 0.0 is a sentinel value indicating `stability` was not set.
         
        float stability = 3;
        Specified by:
        getStability in interface StreamingRecognitionResultOrBuilder
      • setStability

        public StreamingRecognitionResult.Builder setStability​(float value)
         *Output-only* An estimate of the likelihood that the recognizer will not
         change its guess about this interim result. Values range from 0.0
         (completely unstable) to 1.0 (completely stable).
         This field is only provided for interim results (`is_final=false`).
         The default of 0.0 is a sentinel value indicating `stability` was not set.
         
        float stability = 3;
      • clearStability

        public StreamingRecognitionResult.Builder clearStability()
         *Output-only* An estimate of the likelihood that the recognizer will not
         change its guess about this interim result. Values range from 0.0
         (completely unstable) to 1.0 (completely stable).
         This field is only provided for interim results (`is_final=false`).
         The default of 0.0 is a sentinel value indicating `stability` was not set.
         
        float stability = 3;
      • setUnknownFields

        public final StreamingRecognitionResult.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<StreamingRecognitionResult.Builder>
      • mergeUnknownFields

        public final StreamingRecognitionResult.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<StreamingRecognitionResult.Builder>