Google Cloud Ces V1 Client - Class SynthesizeSpeechConfig (0.3.0)

Reference documentation and code samples for the Google Cloud Ces V1 Client class SynthesizeSpeechConfig.

Configuration for how the agent response should be synthesized.

Generated from protobuf message google.cloud.ces.v1.SynthesizeSpeechConfig

Namespace

Google \ Cloud \ Ces \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ voice string

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code. For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

↳ voice_sample_gcs_uri string

Optional. The Cloud Storage URI to the audio sample for voice cloning. The audio sample should be a mono-channel, 24kHz WAV file. 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.

↳ speaking_rate float

Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error.

↳ model string

Optional. The model used to synthesize audio. Currently supported values: - "gemini-3.1-flash-tts-preview" If empty, Chirp3-HD is used.

↳ instruction string

Optional. The instruction used to synthesize speech when using a generative model.

getVoice

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

Returns
Type Description
string

setVoice

Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code.

For the list of available voices, please refer to Supported voices and languages from Cloud Text-to-Speech.

Parameter
Name Description
var string
Returns
Type Description
$this

getVoiceSampleGcsUri

Optional. The Cloud Storage URI to the audio sample for voice cloning. The audio sample should be a mono-channel, 24kHz WAV file.

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.

Returns
Type Description
string

setVoiceSampleGcsUri

Optional. The Cloud Storage URI to the audio sample for voice cloning. The audio sample should be a mono-channel, 24kHz WAV file.

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getSpeakingRate

Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error.

Returns
Type Description
float

setSpeakingRate

Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will return an error.

Parameter
Name Description
var float
Returns
Type Description
$this

getModel

Optional. The model used to synthesize audio.

Currently supported values:

  • "gemini-3.1-flash-tts-preview" If empty, Chirp3-HD is used.
Returns
Type Description
string

setModel

Optional. The model used to synthesize audio.

Currently supported values:

  • "gemini-3.1-flash-tts-preview" If empty, Chirp3-HD is used.
Parameter
Name Description
var string
Returns
Type Description
$this

getInstruction

Optional. The instruction used to synthesize speech when using a generative model.

Returns
Type Description
string

setInstruction

Optional. The instruction used to synthesize speech when using a generative model.

Parameter
Name Description
var string
Returns
Type Description
$this