Google Cloud Dialogflow Cx V3 Client - Class AudioInput (0.1.1)

Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class AudioInput.

Represents the natural speech audio to be processed.

Generated from protobuf message google.cloud.dialogflow.cx.v3.AudioInput

Namespace

Google \ Cloud \ Dialogflow \ Cx \ V3

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ config Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig

Required. Instructs the speech recognizer how to process the speech audio.

↳ audio string

The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both config and audio must be provided. For streaming audio detect intent, config must be provided in the first request and audio must be provided in all following requests.

getConfig

Required. Instructs the speech recognizer how to process the speech audio.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig|null

hasConfig

clearConfig

setConfig

Required. Instructs the speech recognizer how to process the speech audio.

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\InputAudioConfig
Returns
TypeDescription
$this

getAudio

The natural language speech audio to be processed.

A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both config and audio must be provided. For streaming audio detect intent, config must be provided in the first request and audio must be provided in all following requests.

Returns
TypeDescription
string

setAudio

The natural language speech audio to be processed.

A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both config and audio must be provided. For streaming audio detect intent, config must be provided in the first request and audio must be provided in all following requests.

Parameter
NameDescription
var string
Returns
TypeDescription
$this