Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class StreamingAnalyzeContentResponse.
The top-level message returned from the StreamingAnalyzeContent method.
Multiple response messages can be returned in order:
- If the input was set to streaming audio, the first one or more messages
contain
recognition_result. Eachrecognition_resultrepresents a more complete transcript of what the user said. The lastrecognition_resulthasis_finalset totrue. - In virtual agent stage: if
enable_partial_automated_agent_replyis true, the following N (currently 1 <= N <= 4) messages containautomated_agent_replyand optionallyreply_audioreturned by the virtual agent. The first (N-1)automated_agent_replys will haveautomated_agent_reply_typeset toPARTIAL. The lastautomated_agent_replyhasautomated_agent_reply_typeset toFINAL. Ifenable_partial_automated_agent_replyis not enabled, response stream only contains the final reply. In human assist stage: the following N (N >= 1) messages containhuman_agent_suggestion_results,end_user_suggestion_resultsormessage.
Generated from protobuf message google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse
Namespace
Google \ Cloud \ Dialogflow \ V2Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ recognition_result |
StreamingRecognitionResult
The result of speech recognition. |
↳ reply_text |
string
The output text content. This field is set if an automated agent responded with a text for the user. |
↳ reply_audio |
OutputAudio
The audio data bytes encoded as specified in the request. This field is set if: - The |
↳ automated_agent_reply |
AutomatedAgentReply
Note that in AutomatedAgentReply.DetectIntentResponse, Sessions.DetectIntentResponse.output_audio and Sessions.DetectIntentResponse.output_audio_config are always empty, use reply_audio instead. |
↳ message |
Message
Message analyzed by CCAI. |
↳ human_agent_suggestion_results |
array<SuggestionResult>
The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config. |
↳ end_user_suggestion_results |
array<SuggestionResult>
The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config. |
↳ dtmf_parameters |
DtmfParameters
Indicates the parameters of DTMF. |
↳ debugging_info |
CloudConversationDebuggingInfo
Debugging info that would get populated when |
↳ speech_model |
string
The name of the actual Cloud speech model used for speech recognition. |
getRecognitionResult
The result of speech recognition.
| Returns | |
|---|---|
| Type | Description |
StreamingRecognitionResult|null |
|
hasRecognitionResult
clearRecognitionResult
setRecognitionResult
The result of speech recognition.
| Parameter | |
|---|---|
| Name | Description |
var |
StreamingRecognitionResult
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getReplyText
The output text content.
This field is set if an automated agent responded with a text for the user.
| Returns | |
|---|---|
| Type | Description |
string |
|
setReplyText
The output text content.
This field is set if an automated agent responded with a text for the user.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getReplyAudio
The audio data bytes encoded as specified in the request.
This field is set if:
- The
reply_audio_configfield is specified in the request. - The automated agent, which this output comes from, responded with audio.
In such case, the
reply_audio.configfield contains settings used to synthesize the speech. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
| Returns | |
|---|---|
| Type | Description |
OutputAudio|null |
|
hasReplyAudio
clearReplyAudio
setReplyAudio
The audio data bytes encoded as specified in the request.
This field is set if:
- The
reply_audio_configfield is specified in the request. - The automated agent, which this output comes from, responded with audio.
In such case, the
reply_audio.configfield contains settings used to synthesize the speech. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
| Parameter | |
|---|---|
| Name | Description |
var |
OutputAudio
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAutomatedAgentReply
Note that in AutomatedAgentReply.DetectIntentResponse, Sessions.DetectIntentResponse.output_audio and Sessions.DetectIntentResponse.output_audio_config are always empty, use reply_audio instead.
| Returns | |
|---|---|
| Type | Description |
AutomatedAgentReply|null |
|
hasAutomatedAgentReply
clearAutomatedAgentReply
setAutomatedAgentReply
Note that in AutomatedAgentReply.DetectIntentResponse, Sessions.DetectIntentResponse.output_audio and Sessions.DetectIntentResponse.output_audio_config are always empty, use reply_audio instead.
| Parameter | |
|---|---|
| Name | Description |
var |
AutomatedAgentReply
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMessage
Message analyzed by CCAI.
| Returns | |
|---|---|
| Type | Description |
Message|null |
|
hasMessage
clearMessage
setMessage
Message analyzed by CCAI.
| Parameter | |
|---|---|
| Name | Description |
var |
Message
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getHumanAgentSuggestionResults
The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setHumanAgentSuggestionResults
The suggestions for most recent human agent. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.human_agent_suggestion_config.
| Parameter | |
|---|---|
| Name | Description |
var |
array<SuggestionResult>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEndUserSuggestionResults
The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setEndUserSuggestionResults
The suggestions for end user. The order is the same as HumanAgentAssistantConfig.SuggestionConfig.feature_configs of HumanAgentAssistantConfig.end_user_suggestion_config.
| Parameter | |
|---|---|
| Name | Description |
var |
array<SuggestionResult>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDtmfParameters
Indicates the parameters of DTMF.
| Returns | |
|---|---|
| Type | Description |
DtmfParameters|null |
|
hasDtmfParameters
clearDtmfParameters
setDtmfParameters
Indicates the parameters of DTMF.
| Parameter | |
|---|---|
| Name | Description |
var |
DtmfParameters
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDebuggingInfo
Debugging info that would get populated when
StreamingAnalyzeContentRequest.enable_debugging_info is set to true.
| Returns | |
|---|---|
| Type | Description |
CloudConversationDebuggingInfo|null |
|
hasDebuggingInfo
clearDebuggingInfo
setDebuggingInfo
Debugging info that would get populated when
StreamingAnalyzeContentRequest.enable_debugging_info is set to true.
| Parameter | |
|---|---|
| Name | Description |
var |
CloudConversationDebuggingInfo
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSpeechModel
The name of the actual Cloud speech model used for speech recognition.
| Returns | |
|---|---|
| Type | Description |
string |
|
setSpeechModel
The name of the actual Cloud speech model used for speech recognition.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|