Class StreamingRecognitionFeatures.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder>
com.google.cloud.speech.v2.StreamingRecognitionFeatures.Builder
All Implemented Interfaces:
StreamingRecognitionFeaturesOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StreamingRecognitionFeatures

public static final class StreamingRecognitionFeatures.Builder extends com.google.protobuf.GeneratedMessage.Builder<StreamingRecognitionFeatures.Builder> implements StreamingRecognitionFeaturesOrBuilder
 Available recognition features specific to streaming recognition requests.
 
Protobuf type google.cloud.speech.v2.StreamingRecognitionFeatures
  • 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<StreamingRecognitionFeatures.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<StreamingRecognitionFeatures.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<StreamingRecognitionFeatures.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

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

      public StreamingRecognitionFeatures.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<StreamingRecognitionFeatures.Builder>
      Throws:
      IOException
    • getEnableVoiceActivityEvents

      public boolean getEnableVoiceActivityEvents()
       If `true`, responses with voice activity speech events will be returned as
       they are detected.
       
      bool enable_voice_activity_events = 1;
      Specified by:
      getEnableVoiceActivityEvents in interface StreamingRecognitionFeaturesOrBuilder
      Returns:
      The enableVoiceActivityEvents.
    • setEnableVoiceActivityEvents

      public StreamingRecognitionFeatures.Builder setEnableVoiceActivityEvents(boolean value)
       If `true`, responses with voice activity speech events will be returned as
       they are detected.
       
      bool enable_voice_activity_events = 1;
      Parameters:
      value - The enableVoiceActivityEvents to set.
      Returns:
      This builder for chaining.
    • clearEnableVoiceActivityEvents

      public StreamingRecognitionFeatures.Builder clearEnableVoiceActivityEvents()
       If `true`, responses with voice activity speech events will be returned as
       they are detected.
       
      bool enable_voice_activity_events = 1;
      Returns:
      This builder for chaining.
    • getInterimResults

      public boolean getInterimResults()
       Whether or not to stream interim results to the client. If set to true,
       interim results will be streamed to the client. Otherwise, only the final
       response will be streamed back.
       
      bool interim_results = 2;
      Specified by:
      getInterimResults in interface StreamingRecognitionFeaturesOrBuilder
      Returns:
      The interimResults.
    • setInterimResults

      public StreamingRecognitionFeatures.Builder setInterimResults(boolean value)
       Whether or not to stream interim results to the client. If set to true,
       interim results will be streamed to the client. Otherwise, only the final
       response will be streamed back.
       
      bool interim_results = 2;
      Parameters:
      value - The interimResults to set.
      Returns:
      This builder for chaining.
    • clearInterimResults

      public StreamingRecognitionFeatures.Builder clearInterimResults()
       Whether or not to stream interim results to the client. If set to true,
       interim results will be streamed to the client. Otherwise, only the final
       response will be streamed back.
       
      bool interim_results = 2;
      Returns:
      This builder for chaining.
    • hasVoiceActivityTimeout

      public boolean hasVoiceActivityTimeout()
       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
      Specified by:
      hasVoiceActivityTimeout in interface StreamingRecognitionFeaturesOrBuilder
      Returns:
      Whether the voiceActivityTimeout field is set.
    • getVoiceActivityTimeout

      public StreamingRecognitionFeatures.VoiceActivityTimeout getVoiceActivityTimeout()
       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
      Specified by:
      getVoiceActivityTimeout in interface StreamingRecognitionFeaturesOrBuilder
      Returns:
      The voiceActivityTimeout.
    • setVoiceActivityTimeout

       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
    • setVoiceActivityTimeout

       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
    • mergeVoiceActivityTimeout

       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
    • clearVoiceActivityTimeout

      public StreamingRecognitionFeatures.Builder clearVoiceActivityTimeout()
       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
    • getVoiceActivityTimeoutBuilder

      public StreamingRecognitionFeatures.VoiceActivityTimeout.Builder getVoiceActivityTimeoutBuilder()
       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
    • getVoiceActivityTimeoutOrBuilder

      public StreamingRecognitionFeatures.VoiceActivityTimeoutOrBuilder getVoiceActivityTimeoutOrBuilder()
       If set, the server will automatically close the stream after the specified
       duration has elapsed after the last VOICE_ACTIVITY speech event has been
       sent. The field `voice_activity_events` must also be set to true.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
      Specified by:
      getVoiceActivityTimeoutOrBuilder in interface StreamingRecognitionFeaturesOrBuilder
    • getEndpointingSensitivityValue

      public int getEndpointingSensitivityValue()
       Optional. Endpointing sensitivity for this stream.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity endpointing_sensitivity = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEndpointingSensitivityValue in interface StreamingRecognitionFeaturesOrBuilder
      Returns:
      The enum numeric value on the wire for endpointingSensitivity.
    • setEndpointingSensitivityValue

      public StreamingRecognitionFeatures.Builder setEndpointingSensitivityValue(int value)
       Optional. Endpointing sensitivity for this stream.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity endpointing_sensitivity = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for endpointingSensitivity to set.
      Returns:
      This builder for chaining.
    • getEndpointingSensitivity

      public StreamingRecognitionFeatures.EndpointingSensitivity getEndpointingSensitivity()
       Optional. Endpointing sensitivity for this stream.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity endpointing_sensitivity = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEndpointingSensitivity in interface StreamingRecognitionFeaturesOrBuilder
      Returns:
      The endpointingSensitivity.
    • setEndpointingSensitivity

       Optional. Endpointing sensitivity for this stream.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity endpointing_sensitivity = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The endpointingSensitivity to set.
      Returns:
      This builder for chaining.
    • clearEndpointingSensitivity

      public StreamingRecognitionFeatures.Builder clearEndpointingSensitivity()
       Optional. Endpointing sensitivity for this stream.
       
      .google.cloud.speech.v2.StreamingRecognitionFeatures.EndpointingSensitivity endpointing_sensitivity = 8 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.