Class StreamingAnalyzeContentRequest (4.47.0)

public final class StreamingAnalyzeContentRequest extends GeneratedMessageV3 implements StreamingAnalyzeContentRequestOrBuilder

The top-level message sent by the client to the Participants.StreamingAnalyzeContent method.

Multiple request messages should be sent in order:

  1. The first message must contain participant, 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.

  2. If 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.
    1. If 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.

Protobuf type google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > StreamingAnalyzeContentRequest

Static Fields

ASSIST_QUERY_PARAMS_FIELD_NUMBER

public static final int ASSIST_QUERY_PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

AUDIO_CONFIG_FIELD_NUMBER

public static final int AUDIO_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

CX_PARAMETERS_FIELD_NUMBER

public static final int CX_PARAMETERS_FIELD_NUMBER
Field Value
TypeDescription
int

ENABLE_DEBUGGING_INFO_FIELD_NUMBER

public static final int ENABLE_DEBUGGING_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

ENABLE_EXTENDED_STREAMING_FIELD_NUMBER

public static final int ENABLE_EXTENDED_STREAMING_FIELD_NUMBER
Field Value
TypeDescription
int

ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER

public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_AUDIO_FIELD_NUMBER

public static final int INPUT_AUDIO_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_DTMF_FIELD_NUMBER

public static final int INPUT_DTMF_FIELD_NUMBER
Field Value
TypeDescription
int

INPUT_TEXT_FIELD_NUMBER

public static final int INPUT_TEXT_FIELD_NUMBER
Field Value
TypeDescription
int

PARTICIPANT_FIELD_NUMBER

public static final int PARTICIPANT_FIELD_NUMBER
Field Value
TypeDescription
int

QUERY_PARAMS_FIELD_NUMBER

public static final int QUERY_PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

REPLY_AUDIO_CONFIG_FIELD_NUMBER

public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_CONFIG_FIELD_NUMBER

public static final int TEXT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StreamingAnalyzeContentRequest getDefaultInstance()
Returns
TypeDescription
StreamingAnalyzeContentRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static StreamingAnalyzeContentRequest.Builder newBuilder()
Returns
TypeDescription
StreamingAnalyzeContentRequest.Builder

newBuilder(StreamingAnalyzeContentRequest prototype)

public static StreamingAnalyzeContentRequest.Builder newBuilder(StreamingAnalyzeContentRequest prototype)
Parameter
NameDescription
prototypeStreamingAnalyzeContentRequest
Returns
TypeDescription
StreamingAnalyzeContentRequest.Builder

parseDelimitedFrom(InputStream input)

public static StreamingAnalyzeContentRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StreamingAnalyzeContentRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamingAnalyzeContentRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamingAnalyzeContentRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StreamingAnalyzeContentRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StreamingAnalyzeContentRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingAnalyzeContentRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StreamingAnalyzeContentRequest> parser()
Returns
TypeDescription
Parser<StreamingAnalyzeContentRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAssistQueryParams()

public AssistQueryParameters getAssistQueryParams()

Parameters for a human assist query.

.google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;

Returns
TypeDescription
AssistQueryParameters

The assistQueryParams.

getAssistQueryParamsOrBuilder()

public AssistQueryParametersOrBuilder getAssistQueryParamsOrBuilder()

Parameters for a human assist query.

.google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;

Returns
TypeDescription
AssistQueryParametersOrBuilder

getAudioConfig()

public InputAudioConfig getAudioConfig()

Instructs the speech recognizer how to process the speech audio.

.google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;

Returns
TypeDescription
InputAudioConfig

The audioConfig.

getAudioConfigOrBuilder()

public InputAudioConfigOrBuilder getAudioConfigOrBuilder()

Instructs the speech recognizer how to process the speech audio.

.google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;

Returns
TypeDescription
InputAudioConfigOrBuilder

getConfigCase()

public StreamingAnalyzeContentRequest.ConfigCase getConfigCase()
Returns
TypeDescription
StreamingAnalyzeContentRequest.ConfigCase

getCxParameters()

public Struct getCxParameters()

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 cx_parameters = 13;

Returns
TypeDescription
Struct

The cxParameters.

getCxParametersOrBuilder()

public StructOrBuilder getCxParametersOrBuilder()

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 cx_parameters = 13;

Returns
TypeDescription
StructOrBuilder

getDefaultInstanceForType()

public StreamingAnalyzeContentRequest getDefaultInstanceForType()
Returns
TypeDescription
StreamingAnalyzeContentRequest

getEnableDebuggingInfo()

public boolean getEnableDebuggingInfo()

If true, StreamingAnalyzeContentResponse.debugging_info will get populated.

bool enable_debugging_info = 19;

Returns
TypeDescription
boolean

The enableDebuggingInfo.

getEnableExtendedStreaming()

public boolean getEnableExtendedStreaming()

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

bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The enableExtendedStreaming.

getEnablePartialAutomatedAgentReply()

public boolean getEnablePartialAutomatedAgentReply()

Enable partial virtual agent responses. If this flag is not enabled, response stream still contains only one final response even if some Fulfillments in Dialogflow virtual agent have been configured to return partial responses.

bool enable_partial_automated_agent_reply = 12;

Returns
TypeDescription
boolean

The enablePartialAutomatedAgentReply.

getInputAudio()

public ByteString getInputAudio()

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.

bytes input_audio = 5;

Returns
TypeDescription
ByteString

The inputAudio.

getInputCase()

public StreamingAnalyzeContentRequest.InputCase getInputCase()
Returns
TypeDescription
StreamingAnalyzeContentRequest.InputCase

getInputDtmf()

public TelephonyDtmfEvents getInputDtmf()

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 input_dtmf = 9;

Returns
TypeDescription
TelephonyDtmfEvents

The inputDtmf.

getInputDtmfOrBuilder()

public TelephonyDtmfEventsOrBuilder getInputDtmfOrBuilder()

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 input_dtmf = 9;

Returns
TypeDescription
TelephonyDtmfEventsOrBuilder

getInputText()

public String getInputText()

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. The input_text field can be only sent once, and would cancel the speech recognition if any ongoing.

string input_text = 6;

Returns
TypeDescription
String

The inputText.

getInputTextBytes()

public ByteString getInputTextBytes()

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. The input_text field can be only sent once, and would cancel the speech recognition if any ongoing.

string input_text = 6;

Returns
TypeDescription
ByteString

The bytes for inputText.

getParserForType()

public Parser<StreamingAnalyzeContentRequest> getParserForType()
Returns
TypeDescription
Parser<StreamingAnalyzeContentRequest>
Overrides

getParticipant()

public String getParticipant()

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The participant.

getParticipantBytes()

public ByteString getParticipantBytes()

Required. The name of the participant this text comes from. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/participants/<Participant ID>.

string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for participant.

getQueryParams()

public QueryParameters getQueryParams()

Parameters for a Dialogflow virtual-agent query.

.google.cloud.dialogflow.v2.QueryParameters query_params = 7;

Returns
TypeDescription
QueryParameters

The queryParams.

getQueryParamsOrBuilder()

public QueryParametersOrBuilder getQueryParamsOrBuilder()

Parameters for a Dialogflow virtual-agent query.

.google.cloud.dialogflow.v2.QueryParameters query_params = 7;

Returns
TypeDescription
QueryParametersOrBuilder

getReplyAudioConfig()

public OutputAudioConfig getReplyAudioConfig()

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 reply_audio_config = 4;

Returns
TypeDescription
OutputAudioConfig

The replyAudioConfig.

getReplyAudioConfigOrBuilder()

public OutputAudioConfigOrBuilder getReplyAudioConfigOrBuilder()

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 reply_audio_config = 4;

Returns
TypeDescription
OutputAudioConfigOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTextConfig()

public InputTextConfig getTextConfig()

The natural language text to be processed.

.google.cloud.dialogflow.v2.InputTextConfig text_config = 3;

Returns
TypeDescription
InputTextConfig

The textConfig.

getTextConfigOrBuilder()

public InputTextConfigOrBuilder getTextConfigOrBuilder()

The natural language text to be processed.

.google.cloud.dialogflow.v2.InputTextConfig text_config = 3;

Returns
TypeDescription
InputTextConfigOrBuilder

hasAssistQueryParams()

public boolean hasAssistQueryParams()

Parameters for a human assist query.

.google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;

Returns
TypeDescription
boolean

Whether the assistQueryParams field is set.

hasAudioConfig()

public boolean hasAudioConfig()

Instructs the speech recognizer how to process the speech audio.

.google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;

Returns
TypeDescription
boolean

Whether the audioConfig field is set.

hasCxParameters()

public boolean hasCxParameters()

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 cx_parameters = 13;

Returns
TypeDescription
boolean

Whether the cxParameters field is set.

hasInputAudio()

public boolean hasInputAudio()

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.

bytes input_audio = 5;

Returns
TypeDescription
boolean

Whether the inputAudio field is set.

hasInputDtmf()

public boolean hasInputDtmf()

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 input_dtmf = 9;

Returns
TypeDescription
boolean

Whether the inputDtmf field is set.

hasInputText()

public boolean hasInputText()

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. The input_text field can be only sent once, and would cancel the speech recognition if any ongoing.

string input_text = 6;

Returns
TypeDescription
boolean

Whether the inputText field is set.

hasQueryParams()

public boolean hasQueryParams()

Parameters for a Dialogflow virtual-agent query.

.google.cloud.dialogflow.v2.QueryParameters query_params = 7;

Returns
TypeDescription
boolean

Whether the queryParams field is set.

hasReplyAudioConfig()

public boolean hasReplyAudioConfig()

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 reply_audio_config = 4;

Returns
TypeDescription
boolean

Whether the replyAudioConfig field is set.

hasTextConfig()

public boolean hasTextConfig()

The natural language text to be processed.

.google.cloud.dialogflow.v2.InputTextConfig text_config = 3;

Returns
TypeDescription
boolean

Whether the textConfig field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public StreamingAnalyzeContentRequest.Builder newBuilderForType()
Returns
TypeDescription
StreamingAnalyzeContentRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StreamingAnalyzeContentRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StreamingAnalyzeContentRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public StreamingAnalyzeContentRequest.Builder toBuilder()
Returns
TypeDescription
StreamingAnalyzeContentRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException