Skip to content
This repository was archived by the owner on Dec 15, 2023. It is now read-only.

Commit 9d13751

Browse files
feat: add result_end_time to SpeechRecognitionResult (#741)
* feat: add result_end_time to SpeechRecognitionResult PiperOrigin-RevId: 413728495 Source-Link: googleapis/googleapis@10f96cb Source-Link: https://github.com/googleapis/googleapis-gen/commit/f464864292eb6b055f1e1d8408aff87817cca64c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9 * 🦉 Updates from OwlBot 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 02d0088 commit 9d13751

File tree

54 files changed

+11347
-564
lines changed

Some content is hidden

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

54 files changed

+11347
-564
lines changed

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/package-info.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
*/
1616

1717
/**
18-
* The interfaces provided are listed below, along with usage samples.
18+
* A client to Cloud Speech-to-Text API
19+
*
20+
* <p>The interfaces provided are listed below, along with usage samples.
1921
*
2022
* <p>======================= SpeechClient =======================
2123
*

google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/AdaptationClient.java

Lines changed: 75 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ public AdaptationStub getStub() {
167167
* }</pre>
168168
*
169169
* @param parent Required. The parent resource where this phrase set will be created. Format:
170-
* {api_version}/projects/{project}/locations/{location}/phraseSets
170+
* <p>`projects/{project}/locations/{location}/phraseSets`
171+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
172+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
173+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
174+
* with matching `us` or `eu` location value.
171175
* @param phraseSet Required. The phrase set to create.
172176
* @param phraseSetId Required. The ID to use for the phrase set, which will become the final
173177
* component of the phrase set's resource name.
@@ -203,7 +207,11 @@ public final PhraseSet createPhraseSet(
203207
* }</pre>
204208
*
205209
* @param parent Required. The parent resource where this phrase set will be created. Format:
206-
* {api_version}/projects/{project}/locations/{location}/phraseSets
210+
* <p>`projects/{project}/locations/{location}/phraseSets`
211+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
212+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
213+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
214+
* with matching `us` or `eu` location value.
207215
* @param phraseSet Required. The phrase set to create.
208216
* @param phraseSetId Required. The ID to use for the phrase set, which will become the final
209217
* component of the phrase set's resource name.
@@ -287,7 +295,11 @@ public final UnaryCallable<CreatePhraseSetRequest, PhraseSet> createPhraseSetCal
287295
* }</pre>
288296
*
289297
* @param name Required. The name of the phrase set to retrieve. Format:
290-
* {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
298+
* <p>`projects/{project}/locations/{location}/phraseSets/{phrase_set}`
299+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
300+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
301+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
302+
* with matching `us` or `eu` location value.
291303
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
292304
*/
293305
public final PhraseSet getPhraseSet(PhraseSetName name) {
@@ -310,7 +322,11 @@ public final PhraseSet getPhraseSet(PhraseSetName name) {
310322
* }</pre>
311323
*
312324
* @param name Required. The name of the phrase set to retrieve. Format:
313-
* {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
325+
* <p>`projects/{project}/locations/{location}/phraseSets/{phrase_set}`
326+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
327+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
328+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
329+
* with matching `us` or `eu` location value.
314330
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
315331
*/
316332
public final PhraseSet getPhraseSet(String name) {
@@ -379,7 +395,11 @@ public final UnaryCallable<GetPhraseSetRequest, PhraseSet> getPhraseSetCallable(
379395
* }</pre>
380396
*
381397
* @param parent Required. The parent, which owns this collection of phrase set. Format:
382-
* projects/{project}/locations/{location}
398+
* <p>`projects/{project}/locations/{location}`
399+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
400+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
401+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
402+
* with matching `us` or `eu` location value.
383403
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
384404
*/
385405
public final ListPhraseSetPagedResponse listPhraseSet(LocationName parent) {
@@ -406,7 +426,11 @@ public final ListPhraseSetPagedResponse listPhraseSet(LocationName parent) {
406426
* }</pre>
407427
*
408428
* @param parent Required. The parent, which owns this collection of phrase set. Format:
409-
* projects/{project}/locations/{location}
429+
* <p>`projects/{project}/locations/{location}`
430+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
431+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
432+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
433+
* with matching `us` or `eu` location value.
410434
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
411435
*/
412436
public final ListPhraseSetPagedResponse listPhraseSet(String parent) {
@@ -518,7 +542,11 @@ public final UnaryCallable<ListPhraseSetRequest, ListPhraseSetResponse> listPhra
518542
*
519543
* @param phraseSet Required. The phrase set to update.
520544
* <p>The phrase set's `name` field is used to identify the set to be updated. Format:
521-
* {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
545+
* <p>`projects/{project}/locations/{location}/phraseSets/{phrase_set}`
546+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
547+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
548+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
549+
* with matching `us` or `eu` location value.
522550
* @param updateMask The list of fields to be updated.
523551
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
524552
*/
@@ -592,7 +620,7 @@ public final UnaryCallable<UpdatePhraseSetRequest, PhraseSet> updatePhraseSetCal
592620
* }</pre>
593621
*
594622
* @param name Required. The name of the phrase set to delete. Format:
595-
* {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
623+
* <p>`projects/{project}/locations/{location}/phraseSets/{phrase_set}`
596624
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
597625
*/
598626
public final void deletePhraseSet(PhraseSetName name) {
@@ -615,7 +643,7 @@ public final void deletePhraseSet(PhraseSetName name) {
615643
* }</pre>
616644
*
617645
* @param name Required. The name of the phrase set to delete. Format:
618-
* {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
646+
* <p>`projects/{project}/locations/{location}/phraseSets/{phrase_set}`
619647
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
620648
*/
621649
public final void deletePhraseSet(String name) {
@@ -684,7 +712,11 @@ public final UnaryCallable<DeletePhraseSetRequest, Empty> deletePhraseSetCallabl
684712
* }</pre>
685713
*
686714
* @param parent Required. The parent resource where this custom class will be created. Format:
687-
* {api_version}/projects/{project}/locations/{location}/customClasses
715+
* <p>`projects/{project}/locations/{location}/customClasses`
716+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
717+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
718+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
719+
* with matching `us` or `eu` location value.
688720
* @param customClass Required. The custom class to create.
689721
* @param customClassId Required. The ID to use for the custom class, which will become the final
690722
* component of the custom class' resource name.
@@ -718,7 +750,11 @@ public final CustomClass createCustomClass(
718750
* }</pre>
719751
*
720752
* @param parent Required. The parent resource where this custom class will be created. Format:
721-
* {api_version}/projects/{project}/locations/{location}/customClasses
753+
* <p>`projects/{project}/locations/{location}/customClasses`
754+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
755+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
756+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
757+
* with matching `us` or `eu` location value.
722758
* @param customClass Required. The custom class to create.
723759
* @param customClassId Required. The ID to use for the custom class, which will become the final
724760
* component of the custom class' resource name.
@@ -800,7 +836,7 @@ public final UnaryCallable<CreateCustomClassRequest, CustomClass> createCustomCl
800836
* }</pre>
801837
*
802838
* @param name Required. The name of the custom class to retrieve. Format:
803-
* {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
839+
* <p>`projects/{project}/locations/{location}/customClasses/{custom_class}`
804840
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
805841
*/
806842
public final CustomClass getCustomClass(CustomClassName name) {
@@ -823,7 +859,7 @@ public final CustomClass getCustomClass(CustomClassName name) {
823859
* }</pre>
824860
*
825861
* @param name Required. The name of the custom class to retrieve. Format:
826-
* {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
862+
* <p>`projects/{project}/locations/{location}/customClasses/{custom_class}`
827863
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
828864
*/
829865
public final CustomClass getCustomClass(String name) {
@@ -892,7 +928,11 @@ public final UnaryCallable<GetCustomClassRequest, CustomClass> getCustomClassCal
892928
* }</pre>
893929
*
894930
* @param parent Required. The parent, which owns this collection of custom classes. Format:
895-
* {api_version}/projects/{project}/locations/{location}/customClasses
931+
* <p>`projects/{project}/locations/{location}/customClasses`
932+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
933+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
934+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
935+
* with matching `us` or `eu` location value.
896936
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
897937
*/
898938
public final ListCustomClassesPagedResponse listCustomClasses(LocationName parent) {
@@ -919,7 +959,11 @@ public final ListCustomClassesPagedResponse listCustomClasses(LocationName paren
919959
* }</pre>
920960
*
921961
* @param parent Required. The parent, which owns this collection of custom classes. Format:
922-
* {api_version}/projects/{project}/locations/{location}/customClasses
962+
* <p>`projects/{project}/locations/{location}/customClasses`
963+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
964+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
965+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
966+
* with matching `us` or `eu` location value.
923967
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
924968
*/
925969
public final ListCustomClassesPagedResponse listCustomClasses(String parent) {
@@ -1034,7 +1078,12 @@ public final ListCustomClassesPagedResponse listCustomClasses(ListCustomClassesR
10341078
*
10351079
* @param customClass Required. The custom class to update.
10361080
* <p>The custom class's `name` field is used to identify the custom class to be updated.
1037-
* Format: {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
1081+
* Format:
1082+
* <p>`projects/{project}/locations/{location}/customClasses/{custom_class}`
1083+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
1084+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
1085+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
1086+
* with matching `us` or `eu` location value.
10381087
* @param updateMask The list of fields to be updated.
10391088
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
10401089
*/
@@ -1109,7 +1158,11 @@ public final UnaryCallable<UpdateCustomClassRequest, CustomClass> updateCustomCl
11091158
* }</pre>
11101159
*
11111160
* @param name Required. The name of the custom class to delete. Format:
1112-
* {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
1161+
* <p>`projects/{project}/locations/{location}/customClasses/{custom_class}`
1162+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
1163+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
1164+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
1165+
* with matching `us` or `eu` location value.
11131166
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
11141167
*/
11151168
public final void deleteCustomClass(CustomClassName name) {
@@ -1134,7 +1187,11 @@ public final void deleteCustomClass(CustomClassName name) {
11341187
* }</pre>
11351188
*
11361189
* @param name Required. The name of the custom class to delete. Format:
1137-
* {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
1190+
* <p>`projects/{project}/locations/{location}/customClasses/{custom_class}`
1191+
* <p>Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
1192+
* (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
1193+
* location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
1194+
* with matching `us` or `eu` location value.
11381195
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
11391196
*/
11401197
public final void deleteCustomClass(String name) {

google-cloud-speech/src/test/java/com/google/cloud/speech/v1/SpeechClientTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ public void longRunningRecognizeTest() throws Exception {
133133
LongRunningRecognizeResponse.newBuilder()
134134
.addAllResults(new ArrayList<SpeechRecognitionResult>())
135135
.setTotalBilledTime(Duration.newBuilder().build())
136+
.setOutputConfig(TranscriptOutputConfig.newBuilder().build())
137+
.setOutputError(Status.newBuilder().build())
136138
.build();
137139
Operation resultOperation =
138140
Operation.newBuilder()

0 commit comments

Comments
 (0)