diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow/gapic_version.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow/gapic_version.py index c34cf46454e4..558c8aab67c5 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow/gapic_version.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.37.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/gapic_version.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/gapic_version.py index c34cf46454e4..558c8aab67c5 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/gapic_version.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.37.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_event.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_event.py index 5e7803b19708..849d9bd4da33 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_event.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_event.py @@ -20,7 +20,7 @@ from google.rpc import status_pb2 # type: ignore import proto # type: ignore -from google.cloud.dialogflow_v2.types import participant +from google.cloud.dialogflow_v2.types import participant, session __protobuf__ = proto.module( package="google.cloud.dialogflow.v2", @@ -34,6 +34,10 @@ class ConversationEvent(proto.Message): r"""Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -51,6 +55,10 @@ class ConversationEvent(proto.Message): new_message_payload (google.cloud.dialogflow_v2.types.Message): Payload of NEW_MESSAGE event. + This field is a member of `oneof`_ ``payload``. + new_recognition_result_payload (google.cloud.dialogflow_v2.types.StreamingRecognitionResult): + Payload of NEW_RECOGNITION_RESULT event. + This field is a member of `oneof`_ ``payload``. """ @@ -76,6 +84,11 @@ class Type(proto.Enum): An existing conversation has received a new message, either from API or telephony. It is configured in [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config] + NEW_RECOGNITION_RESULT (7): + An existing conversation has received a new speech + recognition result. This is mainly for delivering + intermediate transcripts. The notification is configured in + [ConversationProfile.new_recognition_event_notification_config][]. UNRECOVERABLE_ERROR (4): Unrecoverable error during a telephone call. @@ -95,6 +108,7 @@ class Type(proto.Enum): CONVERSATION_FINISHED = 2 HUMAN_INTERVENTION_NEEDED = 3 NEW_MESSAGE = 5 + NEW_RECOGNITION_RESULT = 7 UNRECOVERABLE_ERROR = 4 conversation: str = proto.Field( @@ -117,6 +131,12 @@ class Type(proto.Enum): oneof="payload", message=participant.Message, ) + new_recognition_result_payload: session.StreamingRecognitionResult = proto.Field( + proto.MESSAGE, + number=5, + oneof="payload", + message=session.StreamingRecognitionResult, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_profile.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_profile.py index da87185af50d..5743baa763ca 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_profile.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/conversation_profile.py @@ -86,6 +86,18 @@ class ConversationProfile(proto.Message): Configuration for publishing new message events. Event will be sent in format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] + new_recognition_result_notification_config (google.cloud.dialogflow_v2.types.NotificationConfig): + Optional. Configuration for publishing transcription + intermediate results. Event will be sent in format of + [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent]. + If configured, the following information will be populated + as + [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] + Pub/Sub message attributes: + + - "participant_id" + - "participant_role" + - "message_id". stt_config (google.cloud.dialogflow_v2.types.SpeechToTextConfig): Settings for speech transcription. language_code (str): @@ -161,6 +173,11 @@ class ConversationProfile(proto.Message): number=8, message="NotificationConfig", ) + new_recognition_result_notification_config: "NotificationConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="NotificationConfig", + ) stt_config: audio_config.SpeechToTextConfig = proto.Field( proto.MESSAGE, number=9, diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/gapic_version.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/gapic_version.py index c34cf46454e4..558c8aab67c5 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/gapic_version.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.37.0" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_event.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_event.py index 3f6d53efa77f..ad94f74d2e28 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_event.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_event.py @@ -20,7 +20,7 @@ from google.rpc import status_pb2 # type: ignore import proto # type: ignore -from google.cloud.dialogflow_v2beta1.types import participant +from google.cloud.dialogflow_v2beta1.types import participant, session __protobuf__ = proto.module( package="google.cloud.dialogflow.v2beta1", @@ -34,6 +34,10 @@ class ConversationEvent(proto.Message): r"""Represents a notification sent to Pub/Sub subscribers for conversation lifecycle events. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields @@ -51,6 +55,10 @@ class ConversationEvent(proto.Message): new_message_payload (google.cloud.dialogflow_v2beta1.types.Message): Payload of NEW_MESSAGE event. + This field is a member of `oneof`_ ``payload``. + new_recognition_result_payload (google.cloud.dialogflow_v2beta1.types.StreamingRecognitionResult): + Payload of NEW_RECOGNITION_RESULT event. + This field is a member of `oneof`_ ``payload``. """ @@ -76,6 +84,11 @@ class Type(proto.Enum): An existing conversation has received a new message, either from API or telephony. It is configured in [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2beta1.ConversationProfile.new_message_event_notification_config] + NEW_RECOGNITION_RESULT (7): + An existing conversation has received a new speech + recognition result. This is mainly for delivering + intermediate transcripts. The notification is configured in + [ConversationProfile.new_recognition_event_notification_config][]. UNRECOVERABLE_ERROR (4): Unrecoverable error during a telephone call. @@ -95,6 +108,7 @@ class Type(proto.Enum): CONVERSATION_FINISHED = 2 HUMAN_INTERVENTION_NEEDED = 3 NEW_MESSAGE = 5 + NEW_RECOGNITION_RESULT = 7 UNRECOVERABLE_ERROR = 4 conversation: str = proto.Field( @@ -117,6 +131,12 @@ class Type(proto.Enum): oneof="payload", message=participant.Message, ) + new_recognition_result_payload: session.StreamingRecognitionResult = proto.Field( + proto.MESSAGE, + number=5, + oneof="payload", + message=session.StreamingRecognitionResult, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py index 2833990358f9..af969b3c905f 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2beta1/types/conversation_profile.py @@ -85,6 +85,18 @@ class ConversationProfile(proto.Message): Configuration for publishing new message events. Event will be sent in format of [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] + new_recognition_result_notification_config (google.cloud.dialogflow_v2beta1.types.NotificationConfig): + Optional. Configuration for publishing transcription + intermediate results. Event will be sent in format of + [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent]. + If configured, the following information will be populated + as + [ConversationEvent][google.cloud.dialogflow.v2beta1.ConversationEvent] + Pub/Sub message attributes: + + - "participant_id" + - "participant_role" + - "message_id". stt_config (google.cloud.dialogflow_v2beta1.types.SpeechToTextConfig): Settings for speech transcription. language_code (str): @@ -160,6 +172,11 @@ class ConversationProfile(proto.Message): number=8, message="NotificationConfig", ) + new_recognition_result_notification_config: "NotificationConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="NotificationConfig", + ) stt_config: audio_config.SpeechToTextConfig = proto.Field( proto.MESSAGE, number=9, diff --git a/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json index 5fba10b79137..7319fdfb442c 100644 --- a/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dialogflow", - "version": "2.37.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json index e97b1de71665..9da05b9adb39 100644 --- a/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dialogflow", - "version": "2.37.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_profiles.py b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_profiles.py index 87487ae97adb..f2a4a6d94404 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_profiles.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2/test_conversation_profiles.py @@ -6193,6 +6193,7 @@ def test_create_conversation_profile_rest_call_success(request_type): "notification_config": {}, "logging_config": {"enable_stackdriver_logging": True}, "new_message_event_notification_config": {}, + "new_recognition_result_notification_config": {}, "stt_config": { "speech_model_variant": 1, "model": "model_value", @@ -6507,6 +6508,7 @@ def test_update_conversation_profile_rest_call_success(request_type): "notification_config": {}, "logging_config": {"enable_stackdriver_logging": True}, "new_message_event_notification_config": {}, + "new_recognition_result_notification_config": {}, "stt_config": { "speech_model_variant": 1, "model": "model_value", diff --git a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py index 82bde4e771fb..3be5468b0291 100644 --- a/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py +++ b/packages/google-cloud-dialogflow/tests/unit/gapic/dialogflow_v2beta1/test_conversation_profiles.py @@ -6201,6 +6201,7 @@ def test_create_conversation_profile_rest_call_success(request_type): "notification_config": {}, "logging_config": {"enable_stackdriver_logging": True}, "new_message_event_notification_config": {}, + "new_recognition_result_notification_config": {}, "stt_config": { "speech_model_variant": 1, "model": "model_value", @@ -6515,6 +6516,7 @@ def test_update_conversation_profile_rest_call_success(request_type): "notification_config": {}, "logging_config": {"enable_stackdriver_logging": True}, "new_message_event_notification_config": {}, + "new_recognition_result_notification_config": {}, "stt_config": { "speech_model_variant": 1, "model": "model_value",