From a313a0d677542f77003e173b672fd97413a8107b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Fri, 10 Feb 2023 01:40:49 +0000 Subject: [PATCH] feat(dialogflow): update the API #### dialogflow:v2beta1 The following keys were added: - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.description - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.id - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.properties.noBargeInDuration.description - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.properties.noBargeInDuration.format - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.properties.noBargeInDuration.type - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.properties.totalDuration.description - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.properties.totalDuration.format - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.properties.totalDuration.type - schemas.GoogleCloudDialogflowV2beta1BargeInConfig.type - schemas.GoogleCloudDialogflowV2beta1InputAudioConfig.properties.bargeInConfig.$ref - schemas.GoogleCloudDialogflowV2beta1InputAudioConfig.properties.bargeInConfig.description - schemas.GoogleCloudDialogflowV2beta1SuggestConversationSummaryRequest.properties.assistQueryParams.$ref - schemas.GoogleCloudDialogflowV2beta1SuggestConversationSummaryRequest.properties.assistQueryParams.description --- discovery/dialogflow-v2beta1.json | 27 ++++++++++++++++++++++++++- src/apis/dialogflow/v2beta1.ts | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/discovery/dialogflow-v2beta1.json b/discovery/dialogflow-v2beta1.json index 35fe5a33f0..c1d828ec64 100644 --- a/discovery/dialogflow-v2beta1.json +++ b/discovery/dialogflow-v2beta1.json @@ -7507,7 +7507,7 @@ } } }, - "revision": "20230130", + "revision": "20230209", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AudioInput": { @@ -13865,6 +13865,23 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1BargeInConfig": { + "description": "Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request. The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases: * No barge-in phase: which goes first and during which speech detection should not be carried out. * Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase. The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length fromt the the start of the input audio. The flow goes like below: --> Time without speech detection | utterance only | utterance or no-speech event | | +-------------+ | +------------+ | +---------------+ ----------+ no barge-in +-|-+ barge-in +-|-+ normal period +----------- +-------------+ | +------------+ | +---------------+ No-speech event is a response with END_OF_UTTERANCE without any transcript following up.", + "id": "GoogleCloudDialogflowV2beta1BargeInConfig", + "properties": { + "noBargeInDuration": { + "description": "Duration that is not eligible for barge-in at the beginning of the input audio.", + "format": "google-duration", + "type": "string" + }, + "totalDuration": { + "description": "Total duration for the playback at the beginning of the input audio.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest": { "description": "The request message for EntityTypes.BatchCreateEntities.", "id": "GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest", @@ -15401,6 +15418,10 @@ ], "type": "string" }, + "bargeInConfig": { + "$ref": "GoogleCloudDialogflowV2beta1BargeInConfig", + "description": "Configuration of barge-in behavior during the streaming of input audio." + }, "disableNoSpeechRecognizedEvent": { "description": "Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent.", "type": "boolean" @@ -17893,6 +17914,10 @@ "description": "The request message for Conversations.SuggestConversationSummary.", "id": "GoogleCloudDialogflowV2beta1SuggestConversationSummaryRequest", "properties": { + "assistQueryParams": { + "$ref": "GoogleCloudDialogflowV2beta1AssistQueryParameters", + "description": "Parameters for a human assist query." + }, "contextSize": { "description": "Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 500 and at most 1000.", "format": "int32", diff --git a/src/apis/dialogflow/v2beta1.ts b/src/apis/dialogflow/v2beta1.ts index 1482551189..fdd3079b8c 100644 --- a/src/apis/dialogflow/v2beta1.ts +++ b/src/apis/dialogflow/v2beta1.ts @@ -3331,6 +3331,19 @@ export namespace dialogflow_v2beta1 { */ responseMessages?: Schema$GoogleCloudDialogflowV2beta1ResponseMessage[]; } + /** + * Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request. The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases: * No barge-in phase: which goes first and during which speech detection should not be carried out. * Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase. The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length fromt the the start of the input audio. The flow goes like below: --\> Time without speech detection | utterance only | utterance or no-speech event | | +-------------+ | +------------+ | +---------------+ ----------+ no barge-in +-|-+ barge-in +-|-+ normal period +----------- +-------------+ | +------------+ | +---------------+ No-speech event is a response with END_OF_UTTERANCE without any transcript following up. + */ + export interface Schema$GoogleCloudDialogflowV2beta1BargeInConfig { + /** + * Duration that is not eligible for barge-in at the beginning of the input audio. + */ + noBargeInDuration?: string | null; + /** + * Total duration for the playback at the beginning of the input audio. + */ + totalDuration?: string | null; + } /** * The request message for EntityTypes.BatchCreateEntities. */ @@ -4406,6 +4419,10 @@ export namespace dialogflow_v2beta1 { * Required. Audio encoding of the audio content to process. */ audioEncoding?: string | null; + /** + * Configuration of barge-in behavior during the streaming of input audio. + */ + bargeInConfig?: Schema$GoogleCloudDialogflowV2beta1BargeInConfig; /** * Only used in Participants.AnalyzeContent and Participants.StreamingAnalyzeContent. If `false` and recognition doesn't return any result, trigger `NO_SPEECH_RECOGNIZED` event to Dialogflow agent. */ @@ -6152,6 +6169,10 @@ export namespace dialogflow_v2beta1 { * The request message for Conversations.SuggestConversationSummary. */ export interface Schema$GoogleCloudDialogflowV2beta1SuggestConversationSummaryRequest { + /** + * Parameters for a human assist query. + */ + assistQueryParams?: Schema$GoogleCloudDialogflowV2beta1AssistQueryParameters; /** * Max number of messages prior to and including [latest_message] to use as context when compiling the suggestion. By default 500 and at most 1000. */ @@ -24977,6 +24998,7 @@ export namespace dialogflow_v2beta1 { * requestBody: { * // request body parameters * // { + * // "assistQueryParams": {}, * // "contextSize": 0, * // "latestMessage": "my_latestMessage" * // } @@ -42138,6 +42160,7 @@ export namespace dialogflow_v2beta1 { * requestBody: { * // request body parameters * // { + * // "assistQueryParams": {}, * // "contextSize": 0, * // "latestMessage": "my_latestMessage" * // }