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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public BargeInConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public BargeInConfig build()
buildPartial()
public BargeInConfig buildPartial()
clear()
public BargeInConfig.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public BargeInConfig.Builder clearField(Descriptors.FieldDescriptor field)
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;
clearOneof(Descriptors.OneofDescriptor oneof)
public BargeInConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearTotalDuration()
public BargeInConfig.Builder clearTotalDuration()
Total duration for the playback at the beginning of the input audio.
.google.protobuf.Duration total_duration = 2;
clone()
public BargeInConfig.Builder clone()
Overrides
getDefaultInstanceForType()
public BargeInConfig getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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;
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;
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;
getTotalDurationOrBuilder()
public DurationOrBuilder getTotalDurationOrBuilder()
Total duration for the playback at the beginning of the input audio.
.google.protobuf.Duration total_duration = 2;
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(BargeInConfig other)
public BargeInConfig.Builder mergeFrom(BargeInConfig other)
public BargeInConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public BargeInConfig.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
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
|
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
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final BargeInConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public BargeInConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
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
|
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
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public BargeInConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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
|
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
|
setUnknownFields(UnknownFieldSet unknownFields)
public final BargeInConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides