Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class VoiceSessionConfig.
The config about how to process the audio for a voice-based session.
Generated from protobuf message google.cloud.dialogflow.v2.BidiStreamingAnalyzeContentRequest.Config.VoiceSessionConfig
Namespace
Google \ Cloud \ Dialogflow \ V2 \ BidiStreamingAnalyzeContentRequest \ ConfigMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ input_audio_encoding |
int
Required. The encoding of input audio. |
↳ input_audio_sample_rate_hertz |
int
Required. The sample rate of input audio. |
↳ output_audio_encoding |
int
Required. The encoding of output audio. |
↳ output_audio_sample_rate_hertz |
int
Required. The sample rate of output audio. |
↳ enable_cx_proactive_processing |
bool
Optional. Whether to enable CX proactive processing. |
↳ enable_streaming_synthesize |
bool
Optional. If true, Dialogflow will stream the audio bytes from Cloud TTS for speech synthesis using the StreamingSynthesize api. |
↳ gemini_asr_config |
Google\Cloud\Dialogflow\V2\SpeechToTextConfig\GeminiAsrConfig
Optional. Configuration for using Gemini ASR models served via Vertex AI. This field is only used when |
↳ use_gemini_asr |
bool
Optional. If true, Gemini ASR will be used for transcription instead of Cloud Speech-to-Text. If false, Cloud Speech-to-Text will be used. If unset, this setting is inherited from the ConversationProfile. |
getInputAudioEncoding
Required. The encoding of input audio.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type AudioEncoding. |
setInputAudioEncoding
Required. The encoding of input audio.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type AudioEncoding. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getInputAudioSampleRateHertz
Required. The sample rate of input audio.
| Returns | |
|---|---|
| Type | Description |
int |
|
setInputAudioSampleRateHertz
Required. The sample rate of input audio.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getOutputAudioEncoding
Required. The encoding of output audio.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type OutputAudioEncoding. |
setOutputAudioEncoding
Required. The encoding of output audio.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type OutputAudioEncoding. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getOutputAudioSampleRateHertz
Required. The sample rate of output audio.
| Returns | |
|---|---|
| Type | Description |
int |
|
setOutputAudioSampleRateHertz
Required. The sample rate of output audio.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEnableCxProactiveProcessing
Optional. Whether to enable CX proactive processing.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setEnableCxProactiveProcessing
Optional. Whether to enable CX proactive processing.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEnableStreamingSynthesize
Optional. If true, Dialogflow will stream the audio bytes from Cloud TTS for speech synthesis using the StreamingSynthesize api.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setEnableStreamingSynthesize
Optional. If true, Dialogflow will stream the audio bytes from Cloud TTS for speech synthesis using the StreamingSynthesize api.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getGeminiAsrConfig
Optional. Configuration for using Gemini ASR models served via Vertex AI.
This field is only used when use_gemini_asr is true.
| Returns | |
|---|---|
| Type | Description |
Google\Cloud\Dialogflow\V2\SpeechToTextConfig\GeminiAsrConfig|null |
|
hasGeminiAsrConfig
clearGeminiAsrConfig
setGeminiAsrConfig
Optional. Configuration for using Gemini ASR models served via Vertex AI.
This field is only used when use_gemini_asr is true.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Cloud\Dialogflow\V2\SpeechToTextConfig\GeminiAsrConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getUseGeminiAsr
Optional. If true, Gemini ASR will be used for transcription instead of Cloud Speech-to-Text. If false, Cloud Speech-to-Text will be used.
If unset, this setting is inherited from the ConversationProfile.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasUseGeminiAsr
clearUseGeminiAsr
setUseGeminiAsr
Optional. If true, Gemini ASR will be used for transcription instead of Cloud Speech-to-Text. If false, Cloud Speech-to-Text will be used.
If unset, this setting is inherited from the ConversationProfile.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|