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

Commit 11363fe

Browse files
gcf-owl-bot[bot]chingor13nicainbcoe
authored
feat: add result_end_time to SpeechRecognitionResult (#825)
PiperOrigin-RevId: 413728495 Source-Link: googleapis/googleapis@10f96cb Source-Link: https://github.com/googleapis/googleapis-gen/commit/f464864292eb6b055f1e1d8408aff87817cca64c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md 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> Co-authored-by: Jeff Ching <[email protected]> Co-authored-by: nicain <[email protected]> Co-authored-by: Benjamin E. Coe <[email protected]>
1 parent 0eaa230 commit 11363fe

17 files changed

+301
-99
lines changed

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

+10-6
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ message RecognitionConfig {
182182
// a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
183183
// recognition can be reduced if lossy codecs are used to capture or transmit
184184
// audio, particularly if background noise is present. Lossy codecs include
185-
// `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`.
185+
// `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`,
186+
// and `WEBM_OPUS`.
186187
//
187188
// The `FLAC` and `WAV` audio file formats include a header that describes the
188189
// included audio content. You can request recognition for `WAV` files that
@@ -245,9 +246,8 @@ message RecognitionConfig {
245246
MP3 = 8;
246247

247248
// Opus encoded audio frames in WebM container
248-
// ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
249-
// only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
250-
// 12000, 16000, 24000, or 48000.
249+
// ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
250+
// one of 8000, 12000, 16000, 24000, or 48000.
251251
WEBM_OPUS = 9;
252252
}
253253

@@ -321,10 +321,10 @@ message RecognitionConfig {
321321
bool profanity_filter = 5;
322322

323323
// Speech adaptation configuration improves the accuracy of speech
324-
// recognition. When speech adaptation is set it supersedes the
325-
// `speech_contexts` field. For more information, see the [speech
324+
// recognition. For more information, see the [speech
326325
// adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
327326
// documentation.
327+
// When speech adaptation is set it supersedes the `speech_contexts` field.
328328
SpeechAdaptation adaptation = 20;
329329

330330
// Use transcription normalization to automatically replace parts of the
@@ -837,6 +837,10 @@ message SpeechRecognitionResult {
837837
// For audio_channel_count = N, its output values can range from '1' to 'N'.
838838
int32 channel_tag = 2;
839839

840+
// Time offset of the end of this result relative to the
841+
// beginning of the audio.
842+
google.protobuf.Duration result_end_time = 4;
843+
840844
// Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
841845
// of the language in this result. This language code was detected to have
842846
// the most likelihood of being spoken in the audio.

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

+76-26
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,15 @@ service Adaptation {
125125

126126
// Message sent by the client for the `CreatePhraseSet` method.
127127
message CreatePhraseSetRequest {
128-
// Required. The parent resource where this phrase set will be created.
129-
// Format:
130-
// {api_version}/projects/{project}/locations/{location}/phraseSets
128+
// Required. The parent resource where this phrase set will be created. Format:
129+
//
130+
// `projects/{project}/locations/{location}/phraseSets`
131+
//
132+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
133+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
134+
// endpoint, use the `global` location. To specify a region, use a
135+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
136+
// `eu` location value.
131137
string parent = 1 [
132138
(google.api.field_behavior) = REQUIRED,
133139
(google.api.resource_reference) = {
@@ -152,7 +158,14 @@ message UpdatePhraseSetRequest {
152158
//
153159
// The phrase set's `name` field is used to identify the set to be
154160
// updated. Format:
155-
// {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
161+
//
162+
// `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
163+
//
164+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
165+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
166+
// endpoint, use the `global` location. To specify a region, use a
167+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
168+
// `eu` location value.
156169
PhraseSet phrase_set = 1 [(google.api.field_behavior) = REQUIRED];
157170

158171
// The list of fields to be updated.
@@ -161,9 +174,15 @@ message UpdatePhraseSetRequest {
161174

162175
// Message sent by the client for the `GetPhraseSet` method.
163176
message GetPhraseSetRequest {
164-
// Required. The name of the phrase set to retrieve.
165-
// Format:
166-
// {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
177+
// Required. The name of the phrase set to retrieve. Format:
178+
//
179+
// `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
180+
//
181+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
182+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
183+
// endpoint, use the `global` location. To specify a region, use a
184+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
185+
// `eu` location value.
167186
string name = 1 [
168187
(google.api.field_behavior) = REQUIRED,
169188
(google.api.resource_reference) = {
@@ -174,9 +193,15 @@ message GetPhraseSetRequest {
174193

175194
// Message sent by the client for the `ListPhraseSet` method.
176195
message ListPhraseSetRequest {
177-
// Required. The parent, which owns this collection of phrase set.
178-
// Format:
179-
// projects/{project}/locations/{location}
196+
// Required. The parent, which owns this collection of phrase set. Format:
197+
//
198+
// `projects/{project}/locations/{location}`
199+
//
200+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
201+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
202+
// endpoint, use the `global` location. To specify a region, use a
203+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
204+
// `eu` location value.
180205
string parent = 1 [
181206
(google.api.field_behavior) = REQUIRED,
182207
(google.api.resource_reference) = {
@@ -210,9 +235,9 @@ message ListPhraseSetResponse {
210235

211236
// Message sent by the client for the `DeletePhraseSet` method.
212237
message DeletePhraseSetRequest {
213-
// Required. The name of the phrase set to delete.
214-
// Format:
215-
// {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
238+
// Required. The name of the phrase set to delete. Format:
239+
//
240+
// `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
216241
string name = 1 [
217242
(google.api.field_behavior) = REQUIRED,
218243
(google.api.resource_reference) = {
@@ -223,9 +248,15 @@ message DeletePhraseSetRequest {
223248

224249
// Message sent by the client for the `CreateCustomClass` method.
225250
message CreateCustomClassRequest {
226-
// Required. The parent resource where this custom class will be created.
227-
// Format:
228-
// {api_version}/projects/{project}/locations/{location}/customClasses
251+
// Required. The parent resource where this custom class will be created. Format:
252+
//
253+
// `projects/{project}/locations/{location}/customClasses`
254+
//
255+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
256+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
257+
// endpoint, use the `global` location. To specify a region, use a
258+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
259+
// `eu` location value.
229260
string parent = 1 [
230261
(google.api.field_behavior) = REQUIRED,
231262
(google.api.resource_reference) = {
@@ -250,7 +281,14 @@ message UpdateCustomClassRequest {
250281
//
251282
// The custom class's `name` field is used to identify the custom class to be
252283
// updated. Format:
253-
// {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
284+
//
285+
// `projects/{project}/locations/{location}/customClasses/{custom_class}`
286+
//
287+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
288+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
289+
// endpoint, use the `global` location. To specify a region, use a
290+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
291+
// `eu` location value.
254292
CustomClass custom_class = 1 [(google.api.field_behavior) = REQUIRED];
255293

256294
// The list of fields to be updated.
@@ -259,9 +297,9 @@ message UpdateCustomClassRequest {
259297

260298
// Message sent by the client for the `GetCustomClass` method.
261299
message GetCustomClassRequest {
262-
// Required. The name of the custom class to retrieve.
263-
// Format:
264-
// {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
300+
// Required. The name of the custom class to retrieve. Format:
301+
//
302+
// `projects/{project}/locations/{location}/customClasses/{custom_class}`
265303
string name = 1 [
266304
(google.api.field_behavior) = REQUIRED,
267305
(google.api.resource_reference) = {
@@ -272,9 +310,15 @@ message GetCustomClassRequest {
272310

273311
// Message sent by the client for the `ListCustomClasses` method.
274312
message ListCustomClassesRequest {
275-
// Required. The parent, which owns this collection of custom classes.
276-
// Format:
277-
// {api_version}/projects/{project}/locations/{location}/customClasses
313+
// Required. The parent, which owns this collection of custom classes. Format:
314+
//
315+
// `projects/{project}/locations/{location}/customClasses`
316+
//
317+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
318+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
319+
// endpoint, use the `global` location. To specify a region, use a
320+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
321+
// `eu` location value.
278322
string parent = 1 [
279323
(google.api.field_behavior) = REQUIRED,
280324
(google.api.resource_reference) = {
@@ -308,9 +352,15 @@ message ListCustomClassesResponse {
308352

309353
// Message sent by the client for the `DeleteCustomClass` method.
310354
message DeleteCustomClassRequest {
311-
// Required. The name of the custom class to delete.
312-
// Format:
313-
// {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
355+
// Required. The name of the custom class to delete. Format:
356+
//
357+
// `projects/{project}/locations/{location}/customClasses/{custom_class}`
358+
//
359+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
360+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
361+
// endpoint, use the `global` location. To specify a region, use a
362+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
363+
// `eu` location value.
314364
string name = 1 [
315365
(google.api.field_behavior) = REQUIRED,
316366
(google.api.resource_reference) = {

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

+8-3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ message PhraseSet {
8080
// resources and inline classes. Then use the class' id wrapped in $`{...}`
8181
// e.g. "${my-months}". To refer to custom classes resources, use the class'
8282
// id wrapped in `${}` (e.g. `${my-months}`).
83+
//
84+
// Speech-to-Text supports three locations: `global`, `us` (US North America),
85+
// and `eu` (Europe). If you are calling the `speech.googleapis.com`
86+
// endpoint, use the `global` location. To specify a region, use a
87+
// [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
88+
// `eu` location value.
8389
message Phrase {
8490
// The phrase itself.
8591
string value = 1;
@@ -88,9 +94,8 @@ message PhraseSet {
8894
// Positive value will increase the probability that a specific phrase will
8995
// be recognized over other similar sounding phrases. The higher the boost,
9096
// the higher the chance of false positive recognition as well. Negative
91-
// boost values would correspond to anti-biasing. Anti-biasing is not
92-
// enabled, so negative boost will simply be ignored. Though `boost` can
93-
// accept a wide range of positive values, most use cases are best served
97+
// boost will simply be ignored. Though `boost` can accept a wide range of
98+
// positive values, most use cases are best served
9499
// with values between 0 and 20. We recommend using a binary search approach
95100
// to finding the optimal value for your use case. Speech recognition
96101
// will skip PhraseSets with a boost value of 0.

protos/protos.d.ts

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.json

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/generated/v1p1beta1/adaptation.create_custom_class.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ function main(parent, customClassId, customClass) {
2020
* TODO(developer): Uncomment these variables before running the sample.
2121
*/
2222
/**
23-
* Required. The parent resource where this custom class will be created.
24-
* Format:
25-
* {api_version}/projects/{project}/locations/{location}/customClasses
23+
* Required. The parent resource where this custom class will be created. Format:
24+
* `projects/{project}/locations/{location}/customClasses`
25+
* Speech-to-Text supports three locations: `global`, `us` (US North America),
26+
* and `eu` (Europe). If you are calling the `speech.googleapis.com`
27+
* endpoint, use the `global` location. To specify a region, use a
28+
* regional endpoint (/speech-to-text/docs/endpoints) with matching `us` or
29+
* `eu` location value.
2630
*/
2731
// const parent = 'abc123'
2832
/**

0 commit comments

Comments
 (0)