# Google Cloud Dialogflow Cx V3 Client - Class OutputAudioConfig (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class OutputAudioConfig.

Instructs the speech synthesizer how to generate the output audio content.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.OutputAudioConfig`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ audio_encoding` | `int` Required. Audio encoding of the synthesized audio content. |
| `↳ sample_rate_hertz` | `int` Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality). |
| `↳ synthesize_speech_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.SynthesizeSpeechConfig` Optional. Configuration of how speech should be synthesized. If not specified, [Agent.text_to_speech_settings](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Agent#_Google_Cloud_Dialogflow_Cx_V3_Agent__getTextToSpeechSettings__) is applied. |

### getAudioEncoding

Required. Audio encoding of the synthesized audio content.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [OutputAudioEncoding](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.OutputAudioEncoding). |

### setAudioEncoding

Required. Audio encoding of the synthesized audio content.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [OutputAudioEncoding](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.OutputAudioEncoding). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSampleRateHertz

Optional. The synthesis sample rate (in hertz) for this audio. If not
provided, then the synthesizer will use the default sample rate based on
the audio encoding. If this is different from the voice's natural sample
rate, then the synthesizer will honor this request by converting to the
desired sample rate (which might result in worse audio quality).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setSampleRateHertz

Optional. The synthesis sample rate (in hertz) for this audio. If not
provided, then the synthesizer will use the default sample rate based on
the audio encoding. If this is different from the voice's natural sample
rate, then the synthesizer will honor this request by converting to the
desired sample rate (which might result in worse audio quality).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSynthesizeSpeechConfig

Optional. Configuration of how speech should be synthesized.

If not specified,
[Agent.text_to_speech_settings](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Agent#_Google_Cloud_Dialogflow_Cx_V3_Agent__getTextToSpeechSettings__)
is applied.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.SynthesizeSpeechConfig|null` |   |

### hasSynthesizeSpeechConfig

### clearSynthesizeSpeechConfig

### setSynthesizeSpeechConfig

Optional. Configuration of how speech should be synthesized.

If not specified,
[Agent.text_to_speech_settings](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Agent#_Google_Cloud_Dialogflow_Cx_V3_Agent__getTextToSpeechSettings__)
is applied.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.SynthesizeSpeechConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |