Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::StreamingAnalyzeContentRequest.
The top-level message sent by the client to the Participants.StreamingAnalyzeContent method.
Multiple request messages should be sent in order:
The first message must contain participant, [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] and optionally query_params. If you want to receive an audio response, it should also contain reply_audio_config. The message must not contain [input][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input].
If [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in the first message was set to audio_config, all subsequent messages must contain input_audio to continue with Speech recognition. However, note that:
* Dialogflow will bill you for the audio so far.
* Dialogflow discards all Speech recognition results in favor of the
text input.
- If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in the first message was set to StreamingAnalyzeContentRequest.text_config, then the second message must contain only input_text. Moreover, you must not send more than two messages.
After you sent all input, you must half-close or abort the request stream.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#assist_query_params
def assist_query_params() -> ::Google::Cloud::Dialogflow::V2::AssistQueryParameters
- (::Google::Cloud::Dialogflow::V2::AssistQueryParameters) — Parameters for a human assist query.
#assist_query_params=
def assist_query_params=(value) -> ::Google::Cloud::Dialogflow::V2::AssistQueryParameters
- value (::Google::Cloud::Dialogflow::V2::AssistQueryParameters) — Parameters for a human assist query.
- (::Google::Cloud::Dialogflow::V2::AssistQueryParameters) — Parameters for a human assist query.
#audio_config
def audio_config() -> ::Google::Cloud::Dialogflow::V2::InputAudioConfig
- (::Google::Cloud::Dialogflow::V2::InputAudioConfig) — Instructs the speech recognizer how to process the speech audio.
#audio_config=
def audio_config=(value) -> ::Google::Cloud::Dialogflow::V2::InputAudioConfig
- value (::Google::Cloud::Dialogflow::V2::InputAudioConfig) — Instructs the speech recognizer how to process the speech audio.
- (::Google::Cloud::Dialogflow::V2::InputAudioConfig) — Instructs the speech recognizer how to process the speech audio.
#cx_parameters
def cx_parameters() -> ::Google::Protobuf::Struct
-
(::Google::Protobuf::Struct) — Additional parameters to be put into Dialogflow CX session parameters. To
remove a parameter from the session, clients should explicitly set the
parameter value to null.
Note: this field should only be used if you are connecting to a Dialogflow CX agent.
#cx_parameters=
def cx_parameters=(value) -> ::Google::Protobuf::Struct
-
value (::Google::Protobuf::Struct) — Additional parameters to be put into Dialogflow CX session parameters. To
remove a parameter from the session, clients should explicitly set the
parameter value to null.
Note: this field should only be used if you are connecting to a Dialogflow CX agent.
-
(::Google::Protobuf::Struct) — Additional parameters to be put into Dialogflow CX session parameters. To
remove a parameter from the session, clients should explicitly set the
parameter value to null.
Note: this field should only be used if you are connecting to a Dialogflow CX agent.
#enable_debugging_info
def enable_debugging_info() -> ::Boolean
-
(::Boolean) — If true,
StreamingAnalyzeContentResponse.debugging_info
will get populated.
#enable_debugging_info=
def enable_debugging_info=(value) -> ::Boolean
-
value (::Boolean) — If true,
StreamingAnalyzeContentResponse.debugging_info
will get populated.
-
(::Boolean) — If true,
StreamingAnalyzeContentResponse.debugging_info
will get populated.
#enable_extended_streaming
def enable_extended_streaming() -> ::Boolean
-
(::Boolean) — Optional. Enable full bidirectional streaming. You can keep streaming the
audio until timeout, and there's no need to half close the stream to get
the response.
Restrictions:
- Timeout: 3 mins.
- Audio Encoding: only supports AudioEncoding.AUDIO_ENCODING_LINEAR_16 and AudioEncoding.AUDIO_ENCODING_MULAW
- Lifecycle: conversation should be in
Assist Stage
, go to [Conversation.CreateConversation][] for more information.
InvalidArgument Error will be returned if the one of restriction checks failed.
You can find more details in https://cloud.google.com/agent-assist/docs/extended-streaming
#enable_extended_streaming=
def enable_extended_streaming=(value) -> ::Boolean
-
value (::Boolean) — Optional. Enable full bidirectional streaming. You can keep streaming the
audio until timeout, and there's no need to half close the stream to get
the response.
Restrictions:
- Timeout: 3 mins.
- Audio Encoding: only supports AudioEncoding.AUDIO_ENCODING_LINEAR_16 and AudioEncoding.AUDIO_ENCODING_MULAW
- Lifecycle: conversation should be in
Assist Stage
, go to [Conversation.CreateConversation][] for more information.
InvalidArgument Error will be returned if the one of restriction checks failed.
You can find more details in https://cloud.google.com/agent-assist/docs/extended-streaming
-
(::Boolean) — Optional. Enable full bidirectional streaming. You can keep streaming the
audio until timeout, and there's no need to half close the stream to get
the response.
Restrictions:
- Timeout: 3 mins.
- Audio Encoding: only supports AudioEncoding.AUDIO_ENCODING_LINEAR_16 and AudioEncoding.AUDIO_ENCODING_MULAW
- Lifecycle: conversation should be in
Assist Stage
, go to [Conversation.CreateConversation][] for more information.
InvalidArgument Error will be returned if the one of restriction checks failed.
You can find more details in https://cloud.google.com/agent-assist/docs/extended-streaming
#enable_partial_automated_agent_reply
def enable_partial_automated_agent_reply() -> ::Boolean
-
(::Boolean) — Enable partial virtual agent responses. If this flag is not enabled,
response stream still contains only one final response even if some
Fulfillment
s in Dialogflow virtual agent have been configured to return partial responses.
#enable_partial_automated_agent_reply=
def enable_partial_automated_agent_reply=(value) -> ::Boolean
-
value (::Boolean) — Enable partial virtual agent responses. If this flag is not enabled,
response stream still contains only one final response even if some
Fulfillment
s in Dialogflow virtual agent have been configured to return partial responses.
-
(::Boolean) — Enable partial virtual agent responses. If this flag is not enabled,
response stream still contains only one final response even if some
Fulfillment
s in Dialogflow virtual agent have been configured to return partial responses.
#input_audio
def input_audio() -> ::String
-
(::String) — The input audio content to be recognized. Must be sent if
audio_config
is set in the first message. The complete audio over all streaming messages must not exceed 1 minute.
#input_audio=
def input_audio=(value) -> ::String
-
value (::String) — The input audio content to be recognized. Must be sent if
audio_config
is set in the first message. The complete audio over all streaming messages must not exceed 1 minute.
-
(::String) — The input audio content to be recognized. Must be sent if
audio_config
is set in the first message. The complete audio over all streaming messages must not exceed 1 minute.
#input_dtmf
def input_dtmf() -> ::Google::Cloud::Dialogflow::V2::TelephonyDtmfEvents
-
(::Google::Cloud::Dialogflow::V2::TelephonyDtmfEvents) — The DTMF digits used to invoke intent and fill in parameter value.
This input is ignored if the previous response indicated that DTMF input is not accepted.
#input_dtmf=
def input_dtmf=(value) -> ::Google::Cloud::Dialogflow::V2::TelephonyDtmfEvents
-
value (::Google::Cloud::Dialogflow::V2::TelephonyDtmfEvents) — The DTMF digits used to invoke intent and fill in parameter value.
This input is ignored if the previous response indicated that DTMF input is not accepted.
-
(::Google::Cloud::Dialogflow::V2::TelephonyDtmfEvents) — The DTMF digits used to invoke intent and fill in parameter value.
This input is ignored if the previous response indicated that DTMF input is not accepted.
#input_text
def input_text() -> ::String
-
(::String) — The UTF-8 encoded natural language text to be processed. Must be sent if
text_config
is set in the first message. Text length must not exceed 256 bytes for virtual agent interactions. Theinput_text
field can be only sent once, and would cancel the speech recognition if any ongoing.
#input_text=
def input_text=(value) -> ::String
-
value (::String) — The UTF-8 encoded natural language text to be processed. Must be sent if
text_config
is set in the first message. Text length must not exceed 256 bytes for virtual agent interactions. Theinput_text
field can be only sent once, and would cancel the speech recognition if any ongoing.
-
(::String) — The UTF-8 encoded natural language text to be processed. Must be sent if
text_config
is set in the first message. Text length must not exceed 256 bytes for virtual agent interactions. Theinput_text
field can be only sent once, and would cancel the speech recognition if any ongoing.
#participant
def participant() -> ::String
-
(::String) — Required. The name of the participant this text comes from.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.
#participant=
def participant=(value) -> ::String
-
value (::String) — Required. The name of the participant this text comes from.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.
-
(::String) — Required. The name of the participant this text comes from.
Format:
projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>
.
#query_params
def query_params() -> ::Google::Cloud::Dialogflow::V2::QueryParameters
- (::Google::Cloud::Dialogflow::V2::QueryParameters) — Parameters for a Dialogflow virtual-agent query.
#query_params=
def query_params=(value) -> ::Google::Cloud::Dialogflow::V2::QueryParameters
- value (::Google::Cloud::Dialogflow::V2::QueryParameters) — Parameters for a Dialogflow virtual-agent query.
- (::Google::Cloud::Dialogflow::V2::QueryParameters) — Parameters for a Dialogflow virtual-agent query.
#reply_audio_config
def reply_audio_config() -> ::Google::Cloud::Dialogflow::V2::OutputAudioConfig
- (::Google::Cloud::Dialogflow::V2::OutputAudioConfig) — Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling StreamingAnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.
#reply_audio_config=
def reply_audio_config=(value) -> ::Google::Cloud::Dialogflow::V2::OutputAudioConfig
- value (::Google::Cloud::Dialogflow::V2::OutputAudioConfig) — Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling StreamingAnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.
- (::Google::Cloud::Dialogflow::V2::OutputAudioConfig) — Speech synthesis configuration. The speech synthesis settings for a virtual agent that may be configured for the associated conversation profile are not used when calling StreamingAnalyzeContent. If this configuration is not supplied, speech synthesis is disabled.
#text_config
def text_config() -> ::Google::Cloud::Dialogflow::V2::InputTextConfig
- (::Google::Cloud::Dialogflow::V2::InputTextConfig) — The natural language text to be processed.
#text_config=
def text_config=(value) -> ::Google::Cloud::Dialogflow::V2::InputTextConfig
- value (::Google::Cloud::Dialogflow::V2::InputTextConfig) — The natural language text to be processed.
- (::Google::Cloud::Dialogflow::V2::InputTextConfig) — The natural language text to be processed.