Class StreamingAnalyzeContentRequest (4.61.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
Type Description
int

AUDIO_CONFIG_FIELD_NUMBER

public static final int AUDIO_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

CX_PARAMETERS_FIELD_NUMBER

public static final int CX_PARAMETERS_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_DEBUGGING_INFO_FIELD_NUMBER

public static final int ENABLE_DEBUGGING_INFO_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_EXTENDED_STREAMING_FIELD_NUMBER

public static final int ENABLE_EXTENDED_STREAMING_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER

public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER
Field Value
Type Description
int

INPUT_AUDIO_FIELD_NUMBER

public static final int INPUT_AUDIO_FIELD_NUMBER
Field Value
Type Description
int

INPUT_DTMF_FIELD_NUMBER

public static final int INPUT_DTMF_FIELD_NUMBER
Field Value
Type Description
int

INPUT_TEXT_FIELD_NUMBER

public static final int INPUT_TEXT_FIELD_NUMBER
Field Value
Type Description
int

PARTICIPANT_FIELD_NUMBER

public static final int PARTICIPANT_FIELD_NUMBER
Field Value
Type Description
int

QUERY_PARAMS_FIELD_NUMBER

public static final int QUERY_PARAMS_FIELD_NUMBER
Field Value
Type Description
int

REPLY_AUDIO_CONFIG_FIELD_NUMBER

public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

TEXT_CONFIG_FIELD_NUMBER

public static final int TEXT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StreamingAnalyzeContentRequest getDefaultInstance()
Returns
Type Description
StreamingAnalyzeContentRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static StreamingAnalyzeContentRequest.Builder newBuilder()
Returns
Type Description
StreamingAnalyzeContentRequest.Builder

newBuilder(StreamingAnalyzeContentRequest prototype)

public static StreamingAnalyzeContentRequest.Builder newBuilder(StreamingAnalyzeContentRequest prototype)
Parameter
Name Description
prototype StreamingAnalyzeContentRequest
Returns
Type Description
StreamingAnalyzeContentRequest.Builder

parseDelimitedFrom(InputStream input)

public static StreamingAnalyzeContentRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static StreamingAnalyzeContentRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamingAnalyzeContentRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamingAnalyzeContentRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static StreamingAnalyzeContentRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static StreamingAnalyzeContentRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamingAnalyzeContentRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingAnalyzeContentRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<StreamingAnalyzeContentRequest> parser()
Returns
Type Description
Parser<StreamingAnalyzeContentRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAssistQueryParams()

public AssistQueryParameters getAssistQueryParams()

Parameters for a human assist query.

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

Returns
Type Description
AssistQueryParameters

The assistQueryParams.

getAssistQueryParamsOrBuilder()

public AssistQueryParametersOrBuilder getAssistQueryParamsOrBuilder()

Parameters for a human assist query.

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

Returns
Type Description
AssistQueryParametersOrBuilder

getAudioConfig()

public InputAudioConfig getAudioConfig()

Instructs the speech recognizer how to process the speech audio.

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

Returns
Type Description
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
Type Description
InputAudioConfigOrBuilder

getConfigCase()

public StreamingAnalyzeContentRequest.ConfigCase getConfigCase()
Returns
Type Description
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
Type Description
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
Type Description
StructOrBuilder

getDefaultInstanceForType()

public StreamingAnalyzeContentRequest getDefaultInstanceForType()
Returns
Type Description
StreamingAnalyzeContentRequest

getEnableDebuggingInfo()

public boolean getEnableDebuggingInfo()

If true, StreamingAnalyzeContentResponse.debugging_info will get populated.

bool enable_debugging_info = 19;

Returns
Type Description
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:

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

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The inputAudio.

getInputCase()

public StreamingAnalyzeContentRequest.InputCase getInputCase()
Returns
Type Description
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.