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

Commit 7a00dfa

Browse files
chore(bazel): update protobuf to v3.21.7 (#956)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 build: enable Speech v2 client library generation PiperOrigin-RevId: 477910378 Source-Link: https://togithub.com/googleapis/googleapis/commit/3fde7ab75e8161d7fa66984dd1705b02a354a035 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/636957906cc7868065a50cef61f5e995a75ae3e6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjM2OTU3OTA2Y2M3ODY4MDY1YTUwY2VmNjFmNWU5OTVhNzVhZTNlNiJ9 fix!: temporarily removed language rules from Speech-to-Text V2 API BUILD.bazel file PiperOrigin-RevId: 475956674 Source-Link: https://togithub.com/googleapis/googleapis/commit/210422e82d7077829aa5270a9894fa667782182d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/43a371600cebdecaa8186f47920a9a471182dd5b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDNhMzcxNjAwY2ViZGVjYWE4MTg2ZjQ3OTIwYTlhNDcxMTgyZGQ1YiJ9 feat: added Speech-to-Text V2 API proto The next generation Speech-to-Text V2 API provides the same features clients are familiar with in the existing Speech-to-Text API, while modernizing and simplifying the API using API best practices, resourceful methods, and updated infrastructure. Although this proto is published, the service is not yet available. PiperOrigin-RevId: 474926510 Source-Link: https://togithub.com/googleapis/googleapis/commit/bb4d7f49441884fdfffa2d7552254d8540a597e2 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9ecdb75038b10cfe4685d8a301e2abf8e4dfaa48 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWVjZGI3NTAzOGIxMGNmZTQ2ODVkOGEzMDFlMmFiZjhlNGRmYWE0OCJ9
1 parent 1ed2f89 commit 7a00dfa

File tree

306 files changed

+117337
-6834
lines changed

Some content is hidden

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

306 files changed

+117337
-6834
lines changed

google-cloud-speech-bom/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
<artifactId>grpc-google-cloud-speech-v1p1beta1artifactId>
7171
<version>0.89.10-SNAPSHOTversion>
7272
dependency>
73+
<dependency>
74+
<groupId>com.google.api.grpcgroupId>
75+
<artifactId>grpc-google-cloud-speech-v2artifactId>
76+
<version>2.5.10-SNAPSHOTversion>
77+
dependency>
7378
<dependency>
7479
<groupId>com.google.api.grpcgroupId>
7580
<artifactId>proto-google-cloud-speech-v1artifactId>
@@ -85,6 +90,11 @@
8590
<artifactId>proto-google-cloud-speech-v1p1beta1artifactId>
8691
<version>0.89.10-SNAPSHOTversion>
8792
dependency>
93+
<dependency>
94+
<groupId>com.google.api.grpcgroupId>
95+
<artifactId>proto-google-cloud-speech-v2artifactId>
96+
<version>2.5.10-SNAPSHOTversion>
97+
dependency>
8898
dependencies>
8999
dependencyManagement>
90100

google-cloud-speech/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<groupId>com.google.api.grpcgroupId>
2424
<artifactId>proto-google-cloud-speech-v1p1beta1artifactId>
2525
dependency>
26+
<dependency>
27+
<groupId>com.google.api.grpcgroupId>
28+
<artifactId>proto-google-cloud-speech-v2artifactId>
29+
dependency>
2630
<dependency>
2731
<groupId>com.google.api.grpcgroupId>
2832
<artifactId>proto-google-cloud-speech-v1beta1artifactId>
@@ -87,6 +91,11 @@
8791
<artifactId>grpc-google-cloud-speech-v1p1beta1artifactId>
8892
<scope>testscope>
8993
dependency>
94+
<dependency>
95+
<groupId>com.google.api.grpcgroupId>
96+
<artifactId>grpc-google-cloud-speech-v2artifactId>
97+
<scope>testscope>
98+
dependency>
9099
<dependency>
91100
<groupId>com.google.api.grpcgroupId>
92101
<artifactId>grpc-google-cloud-speech-v1beta1artifactId>

google-cloud-speech/src/main/java/com/google/cloud/speech/v2/SpeechClient.java

Lines changed: 3858 additions & 0 deletions
Large diffs are not rendered by default.

google-cloud-speech/src/main/java/com/google/cloud/speech/v2/SpeechSettings.java

Lines changed: 608 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"schema": "1.0",
3+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4+
"language": "java",
5+
"protoPackage": "google.cloud.speech.v2",
6+
"libraryPackage": "com.google.cloud.speech.v2",
7+
"services": {
8+
"Speech": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "SpeechClient",
12+
"rpcs": {
13+
"BatchRecognize": {
14+
"methods": ["batchRecognizeAsync", "batchRecognizeAsync", "batchRecognizeAsync", "batchRecognizeOperationCallable", "batchRecognizeCallable"]
15+
},
16+
"CreateCustomClass": {
17+
"methods": ["createCustomClassAsync", "createCustomClassAsync", "createCustomClassAsync", "createCustomClassOperationCallable", "createCustomClassCallable"]
18+
},
19+
"CreatePhraseSet": {
20+
"methods": ["createPhraseSetAsync", "createPhraseSetAsync", "createPhraseSetAsync", "createPhraseSetOperationCallable", "createPhraseSetCallable"]
21+
},
22+
"CreateRecognizer": {
23+
"methods": ["createRecognizerAsync", "createRecognizerAsync", "createRecognizerAsync", "createRecognizerOperationCallable", "createRecognizerCallable"]
24+
},
25+
"DeleteCustomClass": {
26+
"methods": ["deleteCustomClassAsync", "deleteCustomClassAsync", "deleteCustomClassAsync", "deleteCustomClassOperationCallable", "deleteCustomClassCallable"]
27+
},
28+
"DeletePhraseSet": {
29+
"methods": ["deletePhraseSetAsync", "deletePhraseSetAsync", "deletePhraseSetAsync", "deletePhraseSetOperationCallable", "deletePhraseSetCallable"]
30+
},
31+
"DeleteRecognizer": {
32+
"methods": ["deleteRecognizerAsync", "deleteRecognizerAsync", "deleteRecognizerAsync", "deleteRecognizerOperationCallable", "deleteRecognizerCallable"]
33+
},
34+
"GetConfig": {
35+
"methods": ["getConfig", "getConfig", "getConfig", "getConfigCallable"]
36+
},
37+
"GetCustomClass": {
38+
"methods": ["getCustomClass", "getCustomClass", "getCustomClass", "getCustomClassCallable"]
39+
},
40+
"GetPhraseSet": {
41+
"methods": ["getPhraseSet", "getPhraseSet", "getPhraseSet", "getPhraseSetCallable"]
42+
},
43+
"GetRecognizer": {
44+
"methods": ["getRecognizer", "getRecognizer", "getRecognizer", "getRecognizerCallable"]
45+
},
46+
"ListCustomClasses": {
47+
"methods": ["listCustomClasses", "listCustomClasses", "listCustomClasses", "listCustomClassesPagedCallable", "listCustomClassesCallable"]
48+
},
49+
"ListPhraseSets": {
50+
"methods": ["listPhraseSets", "listPhraseSets", "listPhraseSets", "listPhraseSetsPagedCallable", "listPhraseSetsCallable"]
51+
},
52+
"ListRecognizers": {
53+
"methods": ["listRecognizers", "listRecognizers", "listRecognizers", "listRecognizersPagedCallable", "listRecognizersCallable"]
54+
},
55+
"Recognize": {
56+
"methods": ["recognize", "recognize", "recognize", "recognize", "recognize", "recognizeCallable"]
57+
},
58+
"StreamingRecognize": {
59+
"methods": ["streamingRecognizeCallable"]
60+
},
61+
"UndeleteCustomClass": {
62+
"methods": ["undeleteCustomClassAsync", "undeleteCustomClassAsync", "undeleteCustomClassAsync", "undeleteCustomClassOperationCallable", "undeleteCustomClassCallable"]
63+
},
64+
"UndeletePhraseSet": {
65+
"methods": ["undeletePhraseSetAsync", "undeletePhraseSetAsync", "undeletePhraseSetAsync", "undeletePhraseSetOperationCallable", "undeletePhraseSetCallable"]
66+
},
67+
"UndeleteRecognizer": {
68+
"methods": ["undeleteRecognizerAsync", "undeleteRecognizerAsync", "undeleteRecognizerAsync", "undeleteRecognizerOperationCallable", "undeleteRecognizerCallable"]
69+
},
70+
"UpdateConfig": {
71+
"methods": ["updateConfig", "updateConfig", "updateConfigCallable"]
72+
},
73+
"UpdateCustomClass": {
74+
"methods": ["updateCustomClassAsync", "updateCustomClassAsync", "updateCustomClassOperationCallable", "updateCustomClassCallable"]
75+
},
76+
"UpdatePhraseSet": {
77+
"methods": ["updatePhraseSetAsync", "updatePhraseSetAsync", "updatePhraseSetOperationCallable", "updatePhraseSetCallable"]
78+
},
79+
"UpdateRecognizer": {
80+
"methods": ["updateRecognizerAsync", "updateRecognizerAsync", "updateRecognizerOperationCallable", "updateRecognizerCallable"]
81+
}
82+
}
83+
}
84+
}
85+
}
86+
}
87+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* A client to Cloud Speech-to-Text API
19+
*
20+
*

The interfaces provided are listed below, along with usage samples.

21+
*
22+
*

======================= SpeechClient =======================

23+
*
24+
*

Service Description: Enables speech transcription and resource management.

25+
*
26+
*

Sample for SpeechClient:

27+
*
28+
*
{@code
29+
* // This snippet has been automatically generated and should be regarded as a code template only.
30+
* // It will require modifications to work:
31+
* // - It may require correct/in-range values for request initialization.
32+
* // - It may require specifying regional endpoints when creating the service client as shown in
33+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
34+
* try (SpeechClient speechClient = SpeechClient.create()) {
35+
* RecognizerName name = RecognizerName.of("[PROJECT]", "[LOCATION]", "[RECOGNIZER]");
36+
* Recognizer response = speechClient.getRecognizer(name);
37+
* }
38+
* }
39+
*/
40+
@Generated("by gapic-generator-java")
41+
package com.google.cloud.speech.v2;
42+
43+
import javax.annotation.Generated;
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.speech.v2.stub;
18+
19+
import com.google.api.gax.grpc.GrpcCallSettings;
20+
import com.google.api.gax.grpc.GrpcCallableFactory;
21+
import com.google.api.gax.grpc.GrpcStubCallableFactory;
22+
import com.google.api.gax.rpc.BatchingCallSettings;
23+
import com.google.api.gax.rpc.BidiStreamingCallable;
24+
import com.google.api.gax.rpc.ClientContext;
25+
import com.google.api.gax.rpc.ClientStreamingCallable;
26+
import com.google.api.gax.rpc.OperationCallSettings;
27+
import com.google.api.gax.rpc.OperationCallable;
28+
import com.google.api.gax.rpc.PagedCallSettings;
29+
import com.google.api.gax.rpc.ServerStreamingCallSettings;
30+
import com.google.api.gax.rpc.ServerStreamingCallable;
31+
import com.google.api.gax.rpc.StreamingCallSettings;
32+
import com.google.api.gax.rpc.UnaryCallSettings;
33+
import com.google.api.gax.rpc.UnaryCallable;
34+
import com.google.longrunning.Operation;
35+
import com.google.longrunning.stub.OperationsStub;
36+
import javax.annotation.Generated;
37+
38+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
39+
/**
40+
* gRPC callable factory implementation for the Speech service API.
41+
*
42+
*

This class is for advanced usage.

43+
*/
44+
@Generated("by gapic-generator-java")
45+
public class GrpcSpeechCallableFactory implements GrpcStubCallableFactory {
46+
47+
@Override
48+
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCallable(
49+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
50+
UnaryCallSettings<RequestT, ResponseT> callSettings,
51+
ClientContext clientContext) {
52+
return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext);
53+
}
54+
55+
@Override
56+
public <RequestT, ResponseT, PagedListResponseT>
57+
UnaryCallable<RequestT, PagedListResponseT> createPagedCallable(
58+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
59+
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> callSettings,
60+
ClientContext clientContext) {
61+
return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
62+
}
63+
64+
@Override
65+
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCallable(
66+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
67+
BatchingCallSettings<RequestT, ResponseT> callSettings,
68+
ClientContext clientContext) {
69+
return GrpcCallableFactory.createBatchingCallable(
70+
grpcCallSettings, callSettings, clientContext);
71+
}
72+
73+
@Override
74+
public <RequestT, ResponseT, MetadataT>
75+
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
76+
GrpcCallSettings<RequestT, Operation> grpcCallSettings,
77+
OperationCallSettings<RequestT, ResponseT, MetadataT> callSettings,
78+
ClientContext clientContext,
79+
OperationsStub operationsStub) {
80+
return GrpcCallableFactory.createOperationCallable(
81+
grpcCallSettings, callSettings, clientContext, operationsStub);
82+
}
83+
84+
@Override
85+
public <RequestT, ResponseT>
86+
BidiStreamingCallable<RequestT, ResponseT> createBidiStreamingCallable(
87+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
88+
StreamingCallSettings<RequestT, ResponseT> callSettings,
89+
ClientContext clientContext) {
90+
return GrpcCallableFactory.createBidiStreamingCallable(
91+
grpcCallSettings, callSettings, clientContext);
92+
}
93+
94+
@Override
95+
public <RequestT, ResponseT>
96+
ServerStreamingCallable<RequestT, ResponseT> createServerStreamingCallable(
97+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
98+
ServerStreamingCallSettings<RequestT, ResponseT> callSettings,
99+
ClientContext clientContext) {
100+
return GrpcCallableFactory.createServerStreamingCallable(
101+
grpcCallSettings, callSettings, clientContext);
102+
}
103+
104+
@Override
105+
public <RequestT, ResponseT>
106+
ClientStreamingCallable<RequestT, ResponseT> createClientStreamingCallable(
107+
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
108+
StreamingCallSettings<RequestT, ResponseT> callSettings,
109+
ClientContext clientContext) {
110+
return GrpcCallableFactory.createClientStreamingCallable(
111+
grpcCallSettings, callSettings, clientContext);
112+
}
113+
}

0 commit comments

Comments
 (0)