Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit der Funktion für erweitertes Streaming können Sie Audioinhalte an Dialogflow streamen und Vorschläge für menschliche Kundenservicemitarbeiter zurückstreamen.
Normalerweise schließen Sie den Stream halb oder teilen der Dialogflow API mit, wann der Stream beendet werden soll, um das endgültige Transkript und die Agent Assist-Vorschläge zu generieren. Dies geschieht bei Gesprächsrunden, in denen die API den Parameter is_final=true aus dem Erkennungsergebnis StreamingAnalyzeContentResponse.recognition_result empfängt.
Durch das erweiterte Streaming muss die Verbindung bei Gesprächsrunden nicht mehr halb geschlossen werden. Das Verbindungszeitlimit wird auf drei Minuten verlängert. In dieser Zeit können Sie Audiostreams senden, ohne die Verbindung halb zu schließen. Die Dialogflow API sendet die finalen Transkripte und Agent Assist-Vorschläge automatisch zurück an den Stream. Du startest den Stream nur neu, wenn er abläuft.
Grundlagen zum Streaming
Die erweiterte Streamingfunktion von Agent Assist ähnelt dem Audiostreaming für die CCAI-Transkription. Ihr System streamt Audiodaten an die API und Dialogflow streamt StreamingAnalyzeContentResponse-Daten zurück. Die zurückgegebenen Daten enthalten Vorschläge für Ihre Kundenservicemitarbeiter.
Extended Streaming wird nur in der Phase „Agent Assist“ unterstützt. Siehe Konversationsphase. So verwenden Sie dieses Feature:
Rufen Sie die Methode streamingAnalyzeContent auf und legen Sie die folgenden Felder fest:
StreamingAnalyzeContentRequest.audio_config.audio_encoding:
AUDIO_ENCODING_LINEAR_16 oder AUDIO_ENCODING_MULAW
enable_extended_streaming: true.
Mit der ersten streamingAnalyzeContent-Anfrage wird der Stream vorbereitet und Ihre Audiokonfiguration festgelegt.
In nachfolgenden Anfragen senden Sie Audiobytes an den Stream.
Solange Sie weiterhin Audio senden, erhalten Sie weiterhin Vorschläge.
Sie müssen den Stream nicht manuell schließen. Es wird automatisch geschlossen, sobald Agent Assist erkennt, dass keine Äußerungen mehr erfolgen.
Starte den Stream neu (einschließlich des erneuten Sendens der ursprünglichen Audiokonfiguration) in den folgenden Fällen:
Der Stream ist unterbrochen (der Stream wurde beendet, obwohl er nicht beendet werden sollte).
Ihre Audiodaten nähern sich dem automatischen Zeitlimit von 3 Minuten.
Sie haben einen wiederholbaren Fehler erhalten. Sie können es bis zu dreimal versuchen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eExtended Streaming allows streaming audio content to Dialogflow and receiving human agent suggestions in return, similar to audio streaming for CCAI Transcription.\u003c/p\u003e\n"],["\u003cp\u003eThis feature, available "as is" and with potentially limited support under the Pre-GA Offerings Terms, is accessible via the \u003ccode\u003estreamingAnalyzeContent\u003c/code\u003e method in the RPC API and client libraries.\u003c/p\u003e\n"],["\u003cp\u003eTo initiate Extended Streaming, users must set \u003ccode\u003eenable_extended_streaming\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e and provide appropriate audio configurations (\u003ccode\u003eAUDIO_ENCODING_LINEAR_16\u003c/code\u003e or \u003ccode\u003eAUDIO_ENCODING_MULAW\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe stream remains active as long as audio data is sent, automatically closing when utterances stop, and it will automatically timeout after 3 minutes of activity.\u003c/p\u003e\n"],["\u003cp\u003eUsers should restart the stream if it breaks unexpectedly, if approaching the three-minute timeout, or after receiving a re-tryable error (up to three retries are allowed).\u003c/p\u003e\n"]]],[],null,["# Extended streaming\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can use the extended streaming feature to stream audio content to\nDialogflow and stream human agent suggestions back.\n\nNormally, you half-close or tell the Dialogflow API when to end the stream to generate the final transcript and Agent Assist suggestions. This happens at conversation turns, where the API receives the parameter `is_final=true` from the recognition result, `StreamingAnalyzeContentResponse.recognition_result`.\n\nExtended streaming reduces the need for half-closing at conversation turns. It extends the connection timeout to three minutes, during which you can send audio streams without half-closing. The Dialogflow API automatically sends the final transcripts and Agent Assist suggestions back to the stream. You only restart the stream if it times out.\n| **Note:** Streaming is supported by the RPC API and client libraries only.\n\nStreaming basics\n----------------\n\nThe Agent Assist extended streaming feature is similar to [audio\nstreaming](/agent-assist/docs/transcription) for CCAI Transcription. Your system\nstreams audio data to the API, and Dialogflow streams back\n`StreamingAnalyzeContentResponse` data. The returned data includes suggestions\nfor your human agents.\n| **Note:** Streaming automatically times out after three minutes. If your conversation lasts longer than three minutes, you can handle the timeout by closing and re-opening the stream.\n\nTo use Extended Streaming, call the\n[`streamingAnalyzeContent`](/dialogflow/es/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent)\nmethod.\n\nExtended Streaming only supports Agent Assist stage. See [conversation\nstage](/agent-assist/docs/basics). To use this feature:\n\n1. Call the `streamingAnalyzeContent` method and set the following fields:\n - `StreamingAnalyzeContentRequest.audio_config.audio_encoding`: `AUDIO_ENCODING_LINEAR_16` or `AUDIO_ENCODING_MULAW`\n - `enable_extended_streaming`: `true`.\n2. The first `streamingAnalyzeContent` request prepares the stream and sets your audio configuration.\n3. In subsequent requests, you send audio bytes to the stream.\n4. 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.\n5. Restart the stream (which includes resending the initial audio configuration) in the following cases:\n - The stream is broken (the stream stopped when it wasn't supposed to).\n - Your audio data is approaching the automatic timeout at 3 minutes.\n - You received a re-tryable error. You can retry up to three times."]]