Class BargeInConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<BargeInConfig.Builder>
com.google.cloud.dialogflow.v2beta1.BargeInConfig.Builder
All Implemented Interfaces:
BargeInConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
BargeInConfig

public static final class BargeInConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<BargeInConfig.Builder> implements BargeInConfigOrBuilder
 Configuration of the barge-in behavior. Barge-in instructs the API to return
 a detected utterance at a proper time while the client is playing back the
 response audio from a previous request. When the client sees the
 utterance, it should stop the playback and immediately get ready for
 receiving the responses for the current request.

 The barge-in handling requires the client to start streaming audio input
 as soon as it starts playing back the audio from the previous response. The
 playback is modeled into two phases:

 * No barge-in phase: which goes first and during which speech detection
 should not be carried out.

 * Barge-in phase: which follows the no barge-in phase and during which
 the API starts speech detection and may inform the client that an utterance
 has been detected. Note that no-speech event is not expected in this
 phase.

 The client provides this configuration in terms of the durations of those
 two phases. The durations are measured in terms of the audio length from the
 start of the input audio.

 The flow goes like below:

 ```
 --> Time

 without speech detection  | utterance only | utterance or no-speech event
 |                |
 +-------------+ | +------------+ | +---------------+
 ----------+ no barge-in +-|-+  barge-in  +-|-+ normal period +-----------
 +-------------+ | +------------+ | +---------------+
 ```

 No-speech event is a response with END_OF_UTTERANCE without any transcript
 following up.
 
Protobuf type google.cloud.dialogflow.v2beta1.BargeInConfig
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Duration that is not eligible for barge-in at the beginning of the input audio.
    Total duration for the playback at the beginning of the input audio.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Duration
    Duration that is not eligible for barge-in at the beginning of the input audio.
    com.google.protobuf.Duration.Builder
    Duration that is not eligible for barge-in at the beginning of the input audio.
    com.google.protobuf.DurationOrBuilder
    Duration that is not eligible for barge-in at the beginning of the input audio.
    com.google.protobuf.Duration
    Total duration for the playback at the beginning of the input audio.
    com.google.protobuf.Duration.Builder
    Total duration for the playback at the beginning of the input audio.
    com.google.protobuf.DurationOrBuilder
    Total duration for the playback at the beginning of the input audio.
    boolean
    Duration that is not eligible for barge-in at the beginning of the input audio.
    boolean
    Total duration for the playback at the beginning of the input audio.
    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)
     
    mergeNoBargeInDuration(com.google.protobuf.Duration value)
    Duration that is not eligible for barge-in at the beginning of the input audio.
    mergeTotalDuration(com.google.protobuf.Duration value)
    Total duration for the playback at the beginning of the input audio.
    setNoBargeInDuration(com.google.protobuf.Duration value)
    Duration that is not eligible for barge-in at the beginning of the input audio.
    setNoBargeInDuration(com.google.protobuf.Duration.Builder builderForValue)
    Duration that is not eligible for barge-in at the beginning of the input audio.
    setTotalDuration(com.google.protobuf.Duration value)
    Total duration for the playback at the beginning of the input audio.
    setTotalDuration(com.google.protobuf.Duration.Builder builderForValue)
    Total duration for the playback at the beginning of the input audio.

    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<BargeInConfig.Builder>
    • clear

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

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

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

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

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

      public BargeInConfig.Builder mergeFrom(BargeInConfig other)
    • isInitialized

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

      public BargeInConfig.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<BargeInConfig.Builder>
      Throws:
      IOException
    • hasNoBargeInDuration

      public boolean hasNoBargeInDuration()
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
      Specified by:
      hasNoBargeInDuration in interface BargeInConfigOrBuilder
      Returns:
      Whether the noBargeInDuration field is set.
    • getNoBargeInDuration

      public com.google.protobuf.Duration getNoBargeInDuration()
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
      Specified by:
      getNoBargeInDuration in interface BargeInConfigOrBuilder
      Returns:
      The noBargeInDuration.
    • setNoBargeInDuration

      public BargeInConfig.Builder setNoBargeInDuration(com.google.protobuf.Duration value)
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
    • setNoBargeInDuration

      public BargeInConfig.Builder setNoBargeInDuration(com.google.protobuf.Duration.Builder builderForValue)
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
    • mergeNoBargeInDuration

      public BargeInConfig.Builder mergeNoBargeInDuration(com.google.protobuf.Duration value)
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
    • clearNoBargeInDuration

      public BargeInConfig.Builder clearNoBargeInDuration()
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
    • getNoBargeInDurationBuilder

      public com.google.protobuf.Duration.Builder getNoBargeInDurationBuilder()
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
    • getNoBargeInDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getNoBargeInDurationOrBuilder()
       Duration that is not eligible for barge-in at the beginning of the input
       audio.
       
      .google.protobuf.Duration no_barge_in_duration = 1;
      Specified by:
      getNoBargeInDurationOrBuilder in interface BargeInConfigOrBuilder
    • hasTotalDuration

      public boolean hasTotalDuration()
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
      Specified by:
      hasTotalDuration in interface BargeInConfigOrBuilder
      Returns:
      Whether the totalDuration field is set.
    • getTotalDuration

      public com.google.protobuf.Duration getTotalDuration()
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
      Specified by:
      getTotalDuration in interface BargeInConfigOrBuilder
      Returns:
      The totalDuration.
    • setTotalDuration

      public BargeInConfig.Builder setTotalDuration(com.google.protobuf.Duration value)
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
    • setTotalDuration

      public BargeInConfig.Builder setTotalDuration(com.google.protobuf.Duration.Builder builderForValue)
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
    • mergeTotalDuration

      public BargeInConfig.Builder mergeTotalDuration(com.google.protobuf.Duration value)
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
    • clearTotalDuration

      public BargeInConfig.Builder clearTotalDuration()
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
    • getTotalDurationBuilder

      public com.google.protobuf.Duration.Builder getTotalDurationBuilder()
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
    • getTotalDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getTotalDurationOrBuilder()
       Total duration for the playback at the beginning of the input audio.
       
      .google.protobuf.Duration total_duration = 2;
      Specified by:
      getTotalDurationOrBuilder in interface BargeInConfigOrBuilder