Class BargeInConfig.Builder (4.48.0)

public static final class BargeInConfig.Builder extends GeneratedMessageV3.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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BargeInConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BargeInConfig.Builder
Overrides

build()

public BargeInConfig build()
Returns
Type Description
BargeInConfig

buildPartial()

public BargeInConfig buildPartial()
Returns
Type Description
BargeInConfig

clear()

public BargeInConfig.Builder clear()
Returns
Type Description
BargeInConfig.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public BargeInConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BargeInConfig.Builder
Overrides

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;

Returns
Type Description
BargeInConfig.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BargeInConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BargeInConfig.Builder
Overrides

clearTotalDuration()

public BargeInConfig.Builder clearTotalDuration()

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Returns
Type Description
BargeInConfig.Builder

clone()

public BargeInConfig.Builder clone()
Returns
Type Description
BargeInConfig.Builder
Overrides

getDefaultInstanceForType()

public BargeInConfig getDefaultInstanceForType()
Returns
Type Description
BargeInConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNoBargeInDuration()

public 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;

Returns
Type Description
Duration

The noBargeInDuration.

getNoBargeInDurationBuilder()

public 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;

Returns
Type Description
Builder

getNoBargeInDurationOrBuilder()

public 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;

Returns
Type Description
DurationOrBuilder

getTotalDuration()

public Duration getTotalDuration()

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Returns
Type Description
Duration

The totalDuration.

getTotalDurationBuilder()

public Duration.Builder getTotalDurationBuilder()

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Returns
Type Description
Builder

getTotalDurationOrBuilder()

public DurationOrBuilder getTotalDurationOrBuilder()

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Returns
Type Description
DurationOrBuilder

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;

Returns
Type Description
boolean

Whether the noBargeInDuration field is set.

hasTotalDuration()

public boolean hasTotalDuration()

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Returns
Type Description
boolean

Whether the totalDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BargeInConfig other)

public BargeInConfig.Builder mergeFrom(BargeInConfig other)
Parameter
Name Description
other BargeInConfig
Returns
Type Description
BargeInConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BargeInConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BargeInConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BargeInConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BargeInConfig.Builder
Overrides

mergeNoBargeInDuration(Duration value)

public BargeInConfig.Builder mergeNoBargeInDuration(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;

Parameter
Name Description
value Duration
Returns
Type Description
BargeInConfig.Builder

mergeTotalDuration(Duration value)

public BargeInConfig.Builder mergeTotalDuration(Duration value)

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Parameter
Name Description
value Duration
Returns
Type Description
BargeInConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BargeInConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BargeInConfig.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public BargeInConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BargeInConfig.Builder
Overrides

setNoBargeInDuration(Duration value)

public BargeInConfig.Builder setNoBargeInDuration(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;

Parameter
Name Description
value Duration
Returns
Type Description
BargeInConfig.Builder

setNoBargeInDuration(Duration.Builder builderForValue)

public BargeInConfig.Builder setNoBargeInDuration(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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BargeInConfig.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BargeInConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BargeInConfig.Builder
Overrides

setTotalDuration(Duration value)

public BargeInConfig.Builder setTotalDuration(Duration value)

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Parameter
Name Description
value Duration
Returns
Type Description
BargeInConfig.Builder

setTotalDuration(Duration.Builder builderForValue)

public BargeInConfig.Builder setTotalDuration(Duration.Builder builderForValue)

Total duration for the playback at the beginning of the input audio.

.google.protobuf.Duration total_duration = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
BargeInConfig.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final BargeInConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BargeInConfig.Builder
Overrides