Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Commit f1fc857

Browse files
feat: Added SuggestConversationSummary RPC (#978)
* feat: Added SuggestConversationSummary RPC docs: updated go library package PiperOrigin-RevId: 501862436 Source-Link: googleapis/googleapis@155e0f4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3051f617a991c274c88d27064e803095e4ef9d39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9 feat: Added ABNF Grammars field in Speech Adaptation * Added a new field to Speech Adaptation to specify ABNF grammar definitions PiperOrigin-RevId: 499896786 Source-Link: googleapis/googleapis@ba57145 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f5d8be29056311c30de930fc099baccfbd0eabeb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVkOGJlMjkwNTYzMTFjMzBkZTkzMGZjMDk5YmFjY2ZiZDBlYWJlYiJ9 feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 493311906 Source-Link: googleapis/googleapis@c9b244b Source-Link: https://github.com/googleapis/googleapis-gen/commit/d63ac840dec854ee7acab7b52b15deaf819eae07 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYzYWM4NDBkZWM4NTRlZTdhY2FiN2I1MmIxNWRlYWY4MTllYWUwNyJ9 chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: googleapis/googleapis@758f0d1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 492276727 Source-Link: googleapis/googleapis@4c25335 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f15b9aca7ac2bd40b20e6715188732d08fc7fe21 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE1YjlhY2E3YWMyYmQ0MGIyMGU2NzE1MTg4NzMyZDA4ZmM3ZmUyMSJ9 * feat: Added SuggestConversationSummary RPC docs: updated go library package PiperOrigin-RevId: 501862436 Source-Link: googleapis/googleapis@155e0f4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3051f617a991c274c88d27064e803095e4ef9d39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9 feat: Added ABNF Grammars field in Speech Adaptation * Added a new field to Speech Adaptation to specify ABNF grammar definitions PiperOrigin-RevId: 499896786 Source-Link: googleapis/googleapis@ba57145 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f5d8be29056311c30de930fc099baccfbd0eabeb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVkOGJlMjkwNTYzMTFjMzBkZTkzMGZjMDk5YmFjY2ZiZDBlYWJlYiJ9 feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 493311906 Source-Link: googleapis/googleapis@c9b244b Source-Link: https://github.com/googleapis/googleapis-gen/commit/d63ac840dec854ee7acab7b52b15deaf819eae07 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYzYWM4NDBkZWM4NTRlZTdhY2FiN2I1MmIxNWRlYWY4MTllYWUwNyJ9 chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: googleapis/googleapis@758f0d1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 492276727 Source-Link: googleapis/googleapis@4c25335 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f15b9aca7ac2bd40b20e6715188732d08fc7fe21 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE1YjlhY2E3YWMyYmQ0MGIyMGU2NzE1MTg4NzMyZDA4ZmM3ZmUyMSJ9 * feat: Added SuggestConversationSummary RPC docs: updated go library package PiperOrigin-RevId: 501862436 Source-Link: googleapis/googleapis@155e0f4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3051f617a991c274c88d27064e803095e4ef9d39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9 feat: Added ABNF Grammars field in Speech Adaptation * Added a new field to Speech Adaptation to specify ABNF grammar definitions PiperOrigin-RevId: 499896786 Source-Link: googleapis/googleapis@ba57145 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f5d8be29056311c30de930fc099baccfbd0eabeb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVkOGJlMjkwNTYzMTFjMzBkZTkzMGZjMDk5YmFjY2ZiZDBlYWJlYiJ9 feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 493311906 Source-Link: googleapis/googleapis@c9b244b Source-Link: https://github.com/googleapis/googleapis-gen/commit/d63ac840dec854ee7acab7b52b15deaf819eae07 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYzYWM4NDBkZWM4NTRlZTdhY2FiN2I1MmIxNWRlYWY4MTllYWUwNyJ9 chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java) PiperOrigin-RevId: 493113566 Source-Link: googleapis/googleapis@758f0d1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/78bd8f05e1276363eb14eae70e91fe4bc20703ab Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9 feat: Added new fields to facilitate debugging * Added new field to Speech response proto, to give more information to indicate whether, or not, Biasing was applied (eg. did Biasing application timed out). * Added request_id to Speech response protos. PiperOrigin-RevId: 492276727 Source-Link: googleapis/googleapis@4c25335 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f15b9aca7ac2bd40b20e6715188732d08fc7fe21 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE1YjlhY2E3YWMyYmQ0MGIyMGU2NzE1MTg4NzMyZDA4ZmM3ZmUyMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3b5363c commit f1fc857

File tree

73 files changed

+3136
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3136
-93
lines changed

.jsdoc.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ module.exports = {
4040
includePattern: '\\.js$'
4141
},
4242
templates: {
43-
copyright: 'Copyright 2022 Google LLC',
43+
copyright: 'Copyright 2023 Google LLC',
4444
includeDate: false,
4545
sourceFiles: false,
4646
systemName: '@google-cloud/speech',

protos/google/cloud/speech/v1/cloud_speech.proto

+33-2
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ message RecognitionConfig {
260260

261261
// The number of channels in the input audio data.
262262
// ONLY set this for MULTI-CHANNEL recognition.
263-
// Valid values for LINEAR16 and FLAC are `1`-`8`.
264-
// Valid values for OGG_OPUS are '1'-'254'.
263+
// Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
265264
// Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
266265
// If `0` or omitted, defaults to one channel (mono).
267266
// Note: We only recognize the first channel by default.
@@ -652,6 +651,13 @@ message RecognizeResponse {
652651

653652
// When available, billed audio seconds for the corresponding request.
654653
google.protobuf.Duration total_billed_time = 3;
654+
655+
// Provides information on adaptation behavior in response
656+
SpeechAdaptationInfo speech_adaptation_info = 7;
657+
658+
// The ID associated with the request. This is a unique ID specific only to
659+
// the given request.
660+
int64 request_id = 8;
655661
}
656662

657663
// The only message returned to the client by the `LongRunningRecognize` method.
@@ -672,6 +678,13 @@ message LongRunningRecognizeResponse {
672678

673679
// If the transcript output fails this field contains the relevant error.
674680
google.rpc.Status output_error = 7;
681+
682+
// Provides information on speech adaptation behavior in response
683+
SpeechAdaptationInfo speech_adaptation_info = 8;
684+
685+
// The ID associated with the request. This is a unique ID specific only to
686+
// the given request.
687+
int64 request_id = 9;
675688
}
676689

677690
// Describes the progress of a long-running `LongRunningRecognize` call. It is
@@ -774,6 +787,13 @@ message StreamingRecognizeResponse {
774787
// When available, billed audio seconds for the stream.
775788
// Set only if this is the last response in the stream.
776789
google.protobuf.Duration total_billed_time = 5;
790+
791+
// Provides information on adaptation behavior in response
792+
SpeechAdaptationInfo speech_adaptation_info = 9;
793+
794+
// The ID associated with the request. This is a unique ID specific only to
795+
// the given request.
796+
int64 request_id = 10;
777797
}
778798

779799
// A streaming speech recognition result corresponding to a portion of the audio
@@ -897,3 +917,14 @@ message WordInfo {
897917
// top alternative.
898918
int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
899919
}
920+
921+
// Information on speech adaptation use in results
922+
message SpeechAdaptationInfo {
923+
// Whether there was a timeout when applying speech adaptation. If true,
924+
// adaptation had no effect in the response transcript.
925+
bool adaptation_timeout = 1;
926+
927+
// If set, returns a message specifying which part of the speech adaptation
928+
// request timed out.
929+
string timeout_message = 4;
930+
}

protos/google/cloud/speech/v1/resource.proto

+13-2
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,30 @@ message PhraseSet {
120120

121121
// Speech adaptation configuration.
122122
message SpeechAdaptation {
123+
message ABNFGrammar {
124+
// All declarations and rules of an ABNF grammar broken up into multiple
125+
// strings that will end up concatenated.
126+
repeated string abnf_strings = 1;
127+
}
128+
123129
// A collection of phrase sets. To specify the hints inline, leave the
124130
// phrase set's `name` blank and fill in the rest of its fields. Any
125131
// phrase set can use any custom class.
126132
repeated PhraseSet phrase_sets = 1;
127133

128134
// A collection of phrase set resource names to use.
129135
repeated string phrase_set_references = 2 [(google.api.resource_reference) = {
130-
type: "speech.googleapis.com/PhraseSet"
131-
}];
136+
type: "speech.googleapis.com/PhraseSet"
137+
}];
132138

133139
// A collection of custom classes. To specify the classes inline, leave the
134140
// class' `name` blank and fill in the rest of its fields, giving it a unique
135141
// `custom_class_id`. Refer to the inline defined class in phrase hints by its
136142
// `custom_class_id`.
137143
repeated CustomClass custom_classes = 3;
144+
145+
// Augmented Backus-Naur form (ABNF) is a standardized grammar notation
146+
// comprised by a set of derivation rules.
147+
// See specifications: https://www.w3.org/TR/speech-grammar
148+
ABNFGrammar abnf_grammar = 4;
138149
}

protos/google/cloud/speech/v1p1beta1/cloud_speech.proto

+33-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ message RecognitionConfig {
266266

267267
// The number of channels in the input audio data.
268268
// ONLY set this for MULTI-CHANNEL recognition.
269-
// Valid values for LINEAR16 and FLAC are `1`-`8`.
270-
// Valid values for OGG_OPUS are '1'-'254'.
269+
// Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
271270
// Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
272271
// If `0` or omitted, defaults to one channel (mono).
273272
// Note: We only recognize the first channel by default.
@@ -679,6 +678,13 @@ message RecognizeResponse {
679678

680679
// When available, billed audio seconds for the corresponding request.
681680
google.protobuf.Duration total_billed_time = 3;
681+
682+
// Provides information on adaptation behavior in response
683+
SpeechAdaptationInfo speech_adaptation_info = 7;
684+
685+
// The ID associated with the request. This is a unique ID specific only to
686+
// the given request.
687+
int64 request_id = 8;
682688
}
683689

684690
// The only message returned to the client by the `LongRunningRecognize` method.
@@ -699,6 +705,13 @@ message LongRunningRecognizeResponse {
699705

700706
// If the transcript output fails this field contains the relevant error.
701707
google.rpc.Status output_error = 7;
708+
709+
// Provides information on speech adaptation behavior in response
710+
SpeechAdaptationInfo speech_adaptation_info = 8;
711+
712+
// The ID associated with the request. This is a unique ID specific only to
713+
// the given request.
714+
int64 request_id = 9;
702715
}
703716

704717
// Describes the progress of a long-running `LongRunningRecognize` call. It is
@@ -804,6 +817,13 @@ message StreamingRecognizeResponse {
804817
// When available, billed audio seconds for the stream.
805818
// Set only if this is the last response in the stream.
806819
google.protobuf.Duration total_billed_time = 5;
820+
821+
// Provides information on adaptation behavior in response
822+
SpeechAdaptationInfo speech_adaptation_info = 9;
823+
824+
// The ID associated with the request. This is a unique ID specific only to
825+
// the given request.
826+
int64 request_id = 10;
807827
}
808828

809829
// A streaming speech recognition result corresponding to a portion of the audio
@@ -927,3 +947,14 @@ message WordInfo {
927947
// top alternative.
928948
int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
929949
}
950+
951+
// Information on speech adaptation use in results
952+
message SpeechAdaptationInfo {
953+
// Whether there was a timeout when applying speech adaptation. If true,
954+
// adaptation had no effect in the response transcript.
955+
bool adaptation_timeout = 1;
956+
957+
// If set, returns a message specifying which part of the speech adaptation
958+
// request timed out.
959+
string timeout_message = 4;
960+
}

protos/google/cloud/speech/v1p1beta1/resource.proto

+13-2
Original file line numberDiff line numberDiff line change
@@ -120,21 +120,32 @@ message PhraseSet {
120120

121121
// Speech adaptation configuration.
122122
message SpeechAdaptation {
123+
message ABNFGrammar {
124+
// All declarations and rules of an ABNF grammar broken up into multiple
125+
// strings that will end up concatenated.
126+
repeated string abnf_strings = 1;
127+
}
128+
123129
// A collection of phrase sets. To specify the hints inline, leave the
124130
// phrase set's `name` blank and fill in the rest of its fields. Any
125131
// phrase set can use any custom class.
126132
repeated PhraseSet phrase_sets = 1;
127133

128134
// A collection of phrase set resource names to use.
129135
repeated string phrase_set_references = 2 [(google.api.resource_reference) = {
130-
type: "speech.googleapis.com/PhraseSet"
131-
}];
136+
type: "speech.googleapis.com/PhraseSet"
137+
}];
132138

133139
// A collection of custom classes. To specify the classes inline, leave the
134140
// class' `name` blank and fill in the rest of its fields, giving it a unique
135141
// `custom_class_id`. Refer to the inline defined class in phrase hints by its
136142
// `custom_class_id`.
137143
repeated CustomClass custom_classes = 3;
144+
145+
// Augmented Backus-Naur form (ABNF) is a standardized grammar notation
146+
// comprised by a set of derivation rules.
147+
// See specifications: https://www.w3.org/TR/speech-grammar
148+
ABNFGrammar abnf_grammar = 4;
138149
}
139150

140151
// Transcription normalization configuration. Use transcription normalization

0 commit comments

Comments
 (0)