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

Commit

Permalink
feat: Added SuggestConversationSummary RPC (#978)
Browse files Browse the repository at this point in the history
* feat: Added SuggestConversationSummary RPC
docs: updated go library package

PiperOrigin-RevId: 501862436

Source-Link: googleapis/googleapis@155e0f4

Source-Link: googleapis/googleapis-gen@3051f61
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: googleapis/googleapis-gen@f5d8be2
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: googleapis/googleapis-gen@d63ac84
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: googleapis/googleapis-gen@78bd8f0
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: googleapis/googleapis-gen@f15b9ac
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE1YjlhY2E3YWMyYmQ0MGIyMGU2NzE1MTg4NzMyZDA4ZmM3ZmUyMSJ9

* feat: Added SuggestConversationSummary RPC
docs: updated go library package

PiperOrigin-RevId: 501862436

Source-Link: googleapis/googleapis@155e0f4

Source-Link: googleapis/googleapis-gen@3051f61
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: googleapis/googleapis-gen@f5d8be2
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: googleapis/googleapis-gen@d63ac84
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: googleapis/googleapis-gen@78bd8f0
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: googleapis/googleapis-gen@f15b9ac
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE1YjlhY2E3YWMyYmQ0MGIyMGU2NzE1MTg4NzMyZDA4ZmM3ZmUyMSJ9

* feat: Added SuggestConversationSummary RPC
docs: updated go library package

PiperOrigin-RevId: 501862436

Source-Link: googleapis/googleapis@155e0f4

Source-Link: googleapis/googleapis-gen@3051f61
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: googleapis/googleapis-gen@f5d8be2
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: googleapis/googleapis-gen@d63ac84
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: googleapis/googleapis-gen@78bd8f0
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: googleapis/googleapis-gen@f15b9ac
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 20, 2023
1 parent 3b5363c commit f1fc857
Show file tree
Hide file tree
Showing 73 changed files with 3,136 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2022 Google LLC',
copyright: 'Copyright 2023 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/speech',
Expand Down
35 changes: 33 additions & 2 deletions protos/google/cloud/speech/v1/cloud_speech.proto
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ message RecognitionConfig {

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

// When available, billed audio seconds for the corresponding request.
google.protobuf.Duration total_billed_time = 3;

// Provides information on adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 7;

// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 8;
}

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

// If the transcript output fails this field contains the relevant error.
google.rpc.Status output_error = 7;

// Provides information on speech adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 8;

// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 9;
}

// Describes the progress of a long-running `LongRunningRecognize` call. It is
Expand Down Expand Up @@ -774,6 +787,13 @@ message StreamingRecognizeResponse {
// When available, billed audio seconds for the stream.
// Set only if this is the last response in the stream.
google.protobuf.Duration total_billed_time = 5;

// Provides information on adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 9;

// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 10;
}

// A streaming speech recognition result corresponding to a portion of the audio
Expand Down Expand Up @@ -897,3 +917,14 @@ message WordInfo {
// top alternative.
int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Information on speech adaptation use in results
message SpeechAdaptationInfo {
// Whether there was a timeout when applying speech adaptation. If true,
// adaptation had no effect in the response transcript.
bool adaptation_timeout = 1;

// If set, returns a message specifying which part of the speech adaptation
// request timed out.
string timeout_message = 4;
}
15 changes: 13 additions & 2 deletions protos/google/cloud/speech/v1/resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,30 @@ message PhraseSet {

// Speech adaptation configuration.
message SpeechAdaptation {
message ABNFGrammar {
// All declarations and rules of an ABNF grammar broken up into multiple
// strings that will end up concatenated.
repeated string abnf_strings = 1;
}

// A collection of phrase sets. To specify the hints inline, leave the
// phrase set's `name` blank and fill in the rest of its fields. Any
// phrase set can use any custom class.
repeated PhraseSet phrase_sets = 1;

// A collection of phrase set resource names to use.
repeated string phrase_set_references = 2 [(google.api.resource_reference) = {
type: "speech.googleapis.com/PhraseSet"
}];
type: "speech.googleapis.com/PhraseSet"
}];

// A collection of custom classes. To specify the classes inline, leave the
// class' `name` blank and fill in the rest of its fields, giving it a unique
// `custom_class_id`. Refer to the inline defined class in phrase hints by its
// `custom_class_id`.
repeated CustomClass custom_classes = 3;

// Augmented Backus-Naur form (ABNF) is a standardized grammar notation
// comprised by a set of derivation rules.
// See specifications: https://www.w3.org/TR/speech-grammar
ABNFGrammar abnf_grammar = 4;
}
35 changes: 33 additions & 2 deletions protos/google/cloud/speech/v1p1beta1/cloud_speech.proto
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ message RecognitionConfig {

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

// When available, billed audio seconds for the corresponding request.
google.protobuf.Duration total_billed_time = 3;

// Provides information on adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 7;

// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 8;
}

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

// If the transcript output fails this field contains the relevant error.
google.rpc.Status output_error = 7;

// Provides information on speech adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 8;

// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 9;
}

// Describes the progress of a long-running `LongRunningRecognize` call. It is
Expand Down Expand Up @@ -804,6 +817,13 @@ message StreamingRecognizeResponse {
// When available, billed audio seconds for the stream.
// Set only if this is the last response in the stream.
google.protobuf.Duration total_billed_time = 5;

// Provides information on adaptation behavior in response
SpeechAdaptationInfo speech_adaptation_info = 9;

// The ID associated with the request. This is a unique ID specific only to
// the given request.
int64 request_id = 10;
}

// A streaming speech recognition result corresponding to a portion of the audio
Expand Down Expand Up @@ -927,3 +947,14 @@ message WordInfo {
// top alternative.
int32 speaker_tag = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Information on speech adaptation use in results
message SpeechAdaptationInfo {
// Whether there was a timeout when applying speech adaptation. If true,
// adaptation had no effect in the response transcript.
bool adaptation_timeout = 1;

// If set, returns a message specifying which part of the speech adaptation
// request timed out.
string timeout_message = 4;
}
15 changes: 13 additions & 2 deletions protos/google/cloud/speech/v1p1beta1/resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,32 @@ message PhraseSet {

// Speech adaptation configuration.
message SpeechAdaptation {
message ABNFGrammar {
// All declarations and rules of an ABNF grammar broken up into multiple
// strings that will end up concatenated.
repeated string abnf_strings = 1;
}

// A collection of phrase sets. To specify the hints inline, leave the
// phrase set's `name` blank and fill in the rest of its fields. Any
// phrase set can use any custom class.
repeated PhraseSet phrase_sets = 1;

// A collection of phrase set resource names to use.
repeated string phrase_set_references = 2 [(google.api.resource_reference) = {
type: "speech.googleapis.com/PhraseSet"
}];
type: "speech.googleapis.com/PhraseSet"
}];

// A collection of custom classes. To specify the classes inline, leave the
// class' `name` blank and fill in the rest of its fields, giving it a unique
// `custom_class_id`. Refer to the inline defined class in phrase hints by its
// `custom_class_id`.
repeated CustomClass custom_classes = 3;

// Augmented Backus-Naur form (ABNF) is a standardized grammar notation
// comprised by a set of derivation rules.
// See specifications: https://www.w3.org/TR/speech-grammar
ABNFGrammar abnf_grammar = 4;
}

// Transcription normalization configuration. Use transcription normalization
Expand Down

0 comments on commit f1fc857

Please sign in to comment.