Class AmbientSoundConfig.Builder (0.1.0)

public static final class AmbientSoundConfig.Builder extends GeneratedMessage.Builder<AmbientSoundConfig.Builder> implements AmbientSoundConfigOrBuilder

Configuration for the ambient sound to be played with the synthesized agent response, to enhance the naturalness of the conversation.

Protobuf type google.cloud.ces.v1.AmbientSoundConfig

Static Methods

getDescriptor()

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

Methods

build()

public AmbientSoundConfig build()
Returns
Type Description
AmbientSoundConfig

buildPartial()

public AmbientSoundConfig buildPartial()
Returns
Type Description
AmbientSoundConfig

clear()

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

clearGcsUri()

public AmbientSoundConfig.Builder clearGcsUri()

Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in Cloud Storage.

Note: Please make sure the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com has storage.objects.get permission to the Cloud Storage object.

string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

clearPrebuiltAmbientNoise() (deprecated)

public AmbientSoundConfig.Builder clearPrebuiltAmbientNoise()

Deprecated. google.cloud.ces.v1.AmbientSoundConfig.prebuilt_ambient_noise is deprecated. See google/cloud/ces/v1/app.proto;l=285

Optional. Deprecated: prebuilt_ambient_noise is deprecated in favor of prebuilt_ambient_sound.

.google.cloud.ces.v1.AmbientSoundConfig.PrebuiltAmbientNoise prebuilt_ambient_noise = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

clearPrebuiltAmbientSound()

public AmbientSoundConfig.Builder clearPrebuiltAmbientSound()

Optional. Name of the prebuilt ambient sound. Valid values are:

  • "coffee_shop"
  • "keyboard"
  • "keypad"
  • "hum"
  • "office_1"
  • "office_2"
  • "office_3"
  • "room_1"
  • "room_2"
  • "room_3"
  • "room_4"
  • "room_5"
  • "air_conditioner"

string prebuilt_ambient_sound = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

clearSource()

public AmbientSoundConfig.Builder clearSource()
Returns
Type Description
AmbientSoundConfig.Builder

clearVolumeGainDb()

public AmbientSoundConfig.Builder clearVolumeGainDb()

Optional. Volume gain (in dB) of the normal native volume supported by ambient noise, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.

double volume_gain_db = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

getDefaultInstanceForType()

public AmbientSoundConfig getDefaultInstanceForType()
Returns
Type Description
AmbientSoundConfig

getDescriptorForType()

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

getGcsUri()

public String getGcsUri()

Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in Cloud Storage.

Note: Please make sure the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com has storage.objects.get permission to the Cloud Storage object.

string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The gcsUri.

getGcsUriBytes()

public ByteString getGcsUriBytes()

Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in Cloud Storage.

Note: Please make sure the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com has storage.objects.get permission to the Cloud Storage object.

string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for gcsUri.

getPrebuiltAmbientNoise() (deprecated)

public AmbientSoundConfig.PrebuiltAmbientNoise getPrebuiltAmbientNoise()

Deprecated. google.cloud.ces.v1.AmbientSoundConfig.prebuilt_ambient_noise is deprecated. See google/cloud/ces/v1/app.proto;l=285

Optional. Deprecated: prebuilt_ambient_noise is deprecated in favor of prebuilt_ambient_sound.

.google.cloud.ces.v1.AmbientSoundConfig.PrebuiltAmbientNoise prebuilt_ambient_noise = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AmbientSoundConfig.PrebuiltAmbientNoise

The prebuiltAmbientNoise.

getPrebuiltAmbientNoiseValue() (deprecated)

public int getPrebuiltAmbientNoiseValue()

Deprecated. google.cloud.ces.v1.AmbientSoundConfig.prebuilt_ambient_noise is deprecated. See google/cloud/ces/v1/app.proto;l=285

Optional. Deprecated: prebuilt_ambient_noise is deprecated in favor of prebuilt_ambient_sound.

.google.cloud.ces.v1.AmbientSoundConfig.PrebuiltAmbientNoise prebuilt_ambient_noise = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for prebuiltAmbientNoise.

getPrebuiltAmbientSound()

public String getPrebuiltAmbientSound()

Optional. Name of the prebuilt ambient sound. Valid values are:

  • "coffee_shop"
  • "keyboard"
  • "keypad"
  • "hum"
  • "office_1"
  • "office_2"
  • "office_3"
  • "room_1"
  • "room_2"
  • "room_3"
  • "room_4"
  • "room_5"
  • "air_conditioner"

string prebuilt_ambient_sound = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The prebuiltAmbientSound.

getPrebuiltAmbientSoundBytes()

public ByteString getPrebuiltAmbientSoundBytes()

Optional. Name of the prebuilt ambient sound. Valid values are:

  • "coffee_shop"
  • "keyboard"
  • "keypad"
  • "hum"
  • "office_1"
  • "office_2"
  • "office_3"
  • "room_1"
  • "room_2"
  • "room_3"
  • "room_4"
  • "room_5"
  • "air_conditioner"

string prebuilt_ambient_sound = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for prebuiltAmbientSound.

getSourceCase()

public AmbientSoundConfig.SourceCase getSourceCase()
Returns
Type Description
AmbientSoundConfig.SourceCase

getVolumeGainDb()

public double getVolumeGainDb()

Optional. Volume gain (in dB) of the normal native volume supported by ambient noise, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.

double volume_gain_db = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
double

The volumeGainDb.

hasGcsUri()

public boolean hasGcsUri()

Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in Cloud Storage.

Note: Please make sure the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com has storage.objects.get permission to the Cloud Storage object.

string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the gcsUri field is set.

hasPrebuiltAmbientNoise() (deprecated)

public boolean hasPrebuiltAmbientNoise()

Deprecated. google.cloud.ces.v1.AmbientSoundConfig.prebuilt_ambient_noise is deprecated. See google/cloud/ces/v1/app.proto;l=285

Optional. Deprecated: prebuilt_ambient_noise is deprecated in favor of prebuilt_ambient_sound.

.google.cloud.ces.v1.AmbientSoundConfig.PrebuiltAmbientNoise prebuilt_ambient_noise = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the prebuiltAmbientNoise field is set.

hasPrebuiltAmbientSound()

public boolean hasPrebuiltAmbientSound()

Optional. Name of the prebuilt ambient sound. Valid values are:

  • "coffee_shop"
  • "keyboard"
  • "keypad"
  • "hum"
  • "office_1"
  • "office_2"
  • "office_3"
  • "room_1"
  • "room_2"
  • "room_3"
  • "room_4"
  • "room_5"
  • "air_conditioner"

string prebuilt_ambient_sound = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the prebuiltAmbientSound field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AmbientSoundConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setGcsUri(String value)

public AmbientSoundConfig.Builder setGcsUri(String value)

Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in Cloud Storage.

Note: Please make sure the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com has storage.objects.get permission to the Cloud Storage object.

string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The gcsUri to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

setGcsUriBytes(ByteString value)

public AmbientSoundConfig.Builder setGcsUriBytes(ByteString value)

Optional. Ambient noise as a mono-channel, 16kHz WAV file stored in Cloud Storage.

Note: Please make sure the CES service agent service-<PROJECT-NUMBER>@gcp-sa-ces.iam.gserviceaccount.com has storage.objects.get permission to the Cloud Storage object.

string gcs_uri = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for gcsUri to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

setPrebuiltAmbientNoise(AmbientSoundConfig.PrebuiltAmbientNoise value) (deprecated)

public AmbientSoundConfig.Builder setPrebuiltAmbientNoise(AmbientSoundConfig.PrebuiltAmbientNoise value)

Deprecated. google.cloud.ces.v1.AmbientSoundConfig.prebuilt_ambient_noise is deprecated. See google/cloud/ces/v1/app.proto;l=285

Optional. Deprecated: prebuilt_ambient_noise is deprecated in favor of prebuilt_ambient_sound.

.google.cloud.ces.v1.AmbientSoundConfig.PrebuiltAmbientNoise prebuilt_ambient_noise = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AmbientSoundConfig.PrebuiltAmbientNoise

The prebuiltAmbientNoise to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

setPrebuiltAmbientNoiseValue(int value) (deprecated)

public AmbientSoundConfig.Builder setPrebuiltAmbientNoiseValue(int value)

Deprecated. google.cloud.ces.v1.AmbientSoundConfig.prebuilt_ambient_noise is deprecated. See google/cloud/ces/v1/app.proto;l=285

Optional. Deprecated: prebuilt_ambient_noise is deprecated in favor of prebuilt_ambient_sound.

.google.cloud.ces.v1.AmbientSoundConfig.PrebuiltAmbientNoise prebuilt_ambient_noise = 1 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for prebuiltAmbientNoise to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

setPrebuiltAmbientSound(String value)

public AmbientSoundConfig.Builder setPrebuiltAmbientSound(String value)

Optional. Name of the prebuilt ambient sound. Valid values are:

  • "coffee_shop"
  • "keyboard"
  • "keypad"
  • "hum"
  • "office_1"
  • "office_2"
  • "office_3"
  • "room_1"
  • "room_2"
  • "room_3"
  • "room_4"
  • "room_5"
  • "air_conditioner"

string prebuilt_ambient_sound = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The prebuiltAmbientSound to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

setPrebuiltAmbientSoundBytes(ByteString value)

public AmbientSoundConfig.Builder setPrebuiltAmbientSoundBytes(ByteString value)

Optional. Name of the prebuilt ambient sound. Valid values are:

  • "coffee_shop"
  • "keyboard"
  • "keypad"
  • "hum"
  • "office_1"
  • "office_2"
  • "office_3"
  • "room_1"
  • "room_2"
  • "room_3"
  • "room_4"
  • "room_5"
  • "air_conditioner"

string prebuilt_ambient_sound = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for prebuiltAmbientSound to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.

setVolumeGainDb(double value)

public AmbientSoundConfig.Builder setVolumeGainDb(double value)

Optional. Volume gain (in dB) of the normal native volume supported by ambient noise, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.

double volume_gain_db = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value double

The volumeGainDb to set.

Returns
Type Description
AmbientSoundConfig.Builder

This builder for chaining.