Extended Streaming

You can use the Extended Streaming feature to stream audio content to Dialogflow and stream human agent suggestions back. Extended Streaming is only available for suggestions using Article Suggestion or FAQ Assist.

Streaming basics

The Agent Assist Extended Streaming feature is similar to audio streaming for CCAI Transcription. Your system streams audio data to the API, and Dialogflow streams back StreamingAnalyzeContentResponse data. The returned data includes suggestions for your human agents.

To use Extended Streaming, call the streamingAnalyzeContent method.

Extended Streaming only supports Agent Assist stage. See conversation stage. To use this feature:

  1. Call the streamingAnalyzeContent method and set the following fields:
    • StreamingAnalyzeContentRequest.audio_config.audio_encoding: AUDIO_ENCODING_LINEAR_16 or AUDIO_ENCODING_MULAW
    • enable_extended_streaming: true.
  2. The first streamingAnalyzeContent request prepares the stream and sets your audio configuration.
  3. In subsequent requests, you send audio bytes to the stream.
  4. As long as you continue to send audio, you will keep receiving suggestions. You don't need to manually close the stream. It will close automatically once Agent Assist detects that utterances have stopped.
  5. Restart the stream (which includes resending the initial audio configuration) in the following cases:
    • The stream is broken (the stream stopped when it wasn't supposed to).
    • Your audio data is approaching the automatic timeout at 3 minutes.
    • You received a re-tryable error. You can retry up to three times.