Skip to content

Commit 7c10623

Browse files
Google APIscopybara-github
authored andcommitted
feat: update v1beta1 proto
PiperOrigin-RevId: 409139454
1 parent 753ad85 commit 7c10623

3 files changed

Lines changed: 83 additions & 11 deletions

File tree

google/cloud/texttospeech/v1/BUILD.bazel

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# This file was automatically generated by BuildFileGenerator
2+
# https://github.com/googleapis/rules_gapic/tree/master/bazel
3+
4+
# Most of the manual changes to this file will be overwritten.
5+
# It's **only** allowed to change the following rule attribute values:
6+
# - names of *_gapic_assembly_* rules
7+
# - certain parameters of *_gapic_library rules, including but not limited to:
8+
# * extra_protoc_parameters
9+
# * extra_protoc_file_parameters
10+
# The complete list of preserved parameters can be found in the source code.
211

312
# This is an API workspace, having public visibility by default makes perfect sense.
413
package(default_visibility = ["//visibility:public"])
@@ -55,12 +64,15 @@ java_grpc_library(
5564
java_gapic_library(
5665
name = "texttospeech_java_gapic",
5766
srcs = [":texttospeech_proto_with_info"],
67+
gapic_yaml = None,
5868
grpc_service_config = "texttospeech_grpc_service_config.json",
69+
service_yaml = "texttospeech_v1.yaml",
5970
test_deps = [
6071
":texttospeech_java_grpc",
6172
],
6273
deps = [
6374
":texttospeech_java_proto",
75+
"//google/api:api_java_proto",
6476
],
6577
)
6678

@@ -109,6 +121,7 @@ go_gapic_library(
109121
srcs = [":texttospeech_proto_with_info"],
110122
grpc_service_config = "texttospeech_grpc_service_config.json",
111123
importpath = "cloud.google.com/go/texttospeech/apiv1;texttospeech",
124+
metadata = True,
112125
service_yaml = "texttospeech_v1.yaml",
113126
deps = [
114127
":texttospeech_go_proto",
@@ -127,6 +140,7 @@ go_gapic_assembly_pkg(
127140
name = "gapi-cloud-texttospeech-v1-go",
128141
deps = [
129142
":texttospeech_go_gapic",
143+
":texttospeech_go_gapic_srcjar-metadata.srcjar",
130144
":texttospeech_go_gapic_srcjar-test.srcjar",
131145
":texttospeech_go_proto",
132146
],
@@ -181,6 +195,7 @@ php_gapic_library(
181195
name = "texttospeech_php_gapic",
182196
srcs = [":texttospeech_proto_with_info"],
183197
grpc_service_config = "texttospeech_grpc_service_config.json",
198+
service_yaml = "texttospeech_v1.yaml",
184199
deps = [
185200
":texttospeech_php_grpc",
186201
":texttospeech_php_proto",
@@ -251,11 +266,11 @@ ruby_cloud_gapic_library(
251266
name = "texttospeech_ruby_gapic",
252267
srcs = [":texttospeech_proto_with_info"],
253268
extra_protoc_parameters = [
254-
"ruby-cloud-gem-name=google-cloud-text_to_speech-v1",
255-
"ruby-cloud-env-prefix=TEXTTOSPEECH",
256-
"ruby-cloud-product-url=https://cloud.google.com/text-to-speech",
257269
"ruby-cloud-api-id=texttospeech.googleapis.com",
258270
"ruby-cloud-api-shortname=texttospeech",
271+
"ruby-cloud-env-prefix=TEXTTOSPEECH",
272+
"ruby-cloud-gem-name=google-cloud-text_to_speech-v1",
273+
"ruby-cloud-product-url=https://cloud.google.com/text-to-speech",
259274
],
260275
grpc_service_config = "texttospeech_grpc_service_config.json",
261276
ruby_cloud_description = "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech.",

google/cloud/texttospeech/v1beta1/BUILD.bazel

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# This file was automatically generated by BuildFileGenerator
2+
# https://github.com/googleapis/rules_gapic/tree/master/bazel
3+
4+
# Most of the manual changes to this file will be overwritten.
5+
# It's **only** allowed to change the following rule attribute values:
6+
# - names of *_gapic_assembly_* rules
7+
# - certain parameters of *_gapic_library rules, including but not limited to:
8+
# * extra_protoc_parameters
9+
# * extra_protoc_file_parameters
10+
# The complete list of preserved parameters can be found in the source code.
211

312
# This is an API workspace, having public visibility by default makes perfect sense.
413
package(default_visibility = ["//visibility:public"])
@@ -18,6 +27,7 @@ proto_library(
1827
"//google/api:annotations_proto",
1928
"//google/api:client_proto",
2029
"//google/api:field_behavior_proto",
30+
"//google/api:resource_proto",
2131
],
2232
)
2333

@@ -55,12 +65,15 @@ java_grpc_library(
5565
java_gapic_library(
5666
name = "texttospeech_java_gapic",
5767
srcs = [":texttospeech_proto_with_info"],
68+
gapic_yaml = None,
5869
grpc_service_config = "texttospeech_grpc_service_config.json",
70+
service_yaml = "texttospeech_v1beta1.yaml",
5971
test_deps = [
6072
":texttospeech_java_grpc",
6173
],
6274
deps = [
6375
":texttospeech_java_proto",
76+
"//google/api:api_java_proto",
6477
],
6578
)
6679

@@ -109,6 +122,7 @@ go_gapic_library(
109122
srcs = [":texttospeech_proto_with_info"],
110123
grpc_service_config = "texttospeech_grpc_service_config.json",
111124
importpath = "cloud.google.com/go/texttospeech/apiv1beta1;texttospeech",
125+
metadata = True,
112126
service_yaml = "texttospeech_v1beta1.yaml",
113127
deps = [
114128
":texttospeech_go_proto",
@@ -127,6 +141,7 @@ go_gapic_assembly_pkg(
127141
name = "gapi-cloud-texttospeech-v1beta1-go",
128142
deps = [
129143
":texttospeech_go_gapic",
144+
":texttospeech_go_gapic_srcjar-metadata.srcjar",
130145
":texttospeech_go_gapic_srcjar-test.srcjar",
131146
":texttospeech_go_proto",
132147
],
@@ -181,6 +196,7 @@ php_gapic_library(
181196
name = "texttospeech_php_gapic",
182197
srcs = [":texttospeech_proto_with_info"],
183198
grpc_service_config = "texttospeech_grpc_service_config.json",
199+
service_yaml = "texttospeech_v1beta1.yaml",
184200
deps = [
185201
":texttospeech_php_grpc",
186202
":texttospeech_php_proto",
@@ -251,11 +267,11 @@ ruby_cloud_gapic_library(
251267
name = "texttospeech_ruby_gapic",
252268
srcs = [":texttospeech_proto_with_info"],
253269
extra_protoc_parameters = [
254-
"ruby-cloud-gem-name=google-cloud-text_to_speech-v1beta1",
255-
"ruby-cloud-env-prefix=TEXTTOSPEECH",
256-
"ruby-cloud-product-url=https://cloud.google.com/text-to-speech",
257270
"ruby-cloud-api-id=texttospeech.googleapis.com",
258271
"ruby-cloud-api-shortname=texttospeech",
272+
"ruby-cloud-env-prefix=TEXTTOSPEECH",
273+
"ruby-cloud-gem-name=google-cloud-text_to_speech-v1beta1",
274+
"ruby-cloud-product-url=https://cloud.google.com/text-to-speech",
259275
],
260276
grpc_service_config = "texttospeech_grpc_service_config.json",
261277
ruby_cloud_description = "Text-to-Speech converts text or Speech Synthesis Markup Language (SSML) input into audio data of natural human speech.",

google/cloud/texttospeech/v1beta1/cloud_tts.proto

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.texttospeech.v1beta1;
1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
2223

2324
option cc_enable_arenas = true;
2425
option csharp_namespace = "Google.Cloud.TextToSpeech.V1Beta1";
@@ -28,6 +29,10 @@ option java_outer_classname = "TextToSpeechProto";
2829
option java_package = "com.google.cloud.texttospeech.v1beta1";
2930
option php_namespace = "Google\\Cloud\\TextToSpeech\\V1beta1";
3031
option ruby_package = "Google::Cloud::TextToSpeech::V1beta1";
32+
option (google.api.resource_definition) = {
33+
type: "automl.googleapis.com/Model"
34+
pattern: "projects/{project}/locations/{location}/models/{model}"
35+
};
3136

3237
// Service that implements Google Cloud Text-to-Speech API.
3338
service TextToSpeech {
@@ -59,11 +64,11 @@ message ListVoicesRequest {
5964
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
6065
// If not specified, the API will return all supported voices.
6166
// If specified, the ListVoices call will only return voices that can be used
62-
// to synthesize this language_code. E.g. when specifying "en-NZ", you will
63-
// get supported "en-NZ" voices; when specifying "no", you will get supported
64-
// "no-\*" (Norwegian) and "nb-\*" (Norwegian Bokmal) voices; specifying "zh"
65-
// will also get supported "cmn-\*" voices; specifying "zh-hk" will also get
66-
// supported "yue-hk" voices.
67+
// to synthesize this language_code. E.g. when specifying `"en-NZ"`, you will
68+
// get supported `"en-NZ"` voices; when specifying `"no"`, you will get
69+
// supported `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices;
70+
// specifying `"zh"` will also get supported `"cmn-\*"` voices; specifying
71+
// `"zh-hk"` will also get supported `"yue-hk"` voices.
6772
string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
6873
}
6974

@@ -208,6 +213,11 @@ message VoiceSelectionParams {
208213
// voice of the appropriate gender is not available, the synthesizer should
209214
// substitute a voice with a different gender rather than failing the request.
210215
SsmlVoiceGender ssml_gender = 3;
216+
217+
// The configuration for a custom voice. If [CustomVoiceParams.model] is set,
218+
// the service will choose the custom voice matching the specified
219+
// configuration.
220+
CustomVoiceParams custom_voice = 4;
211221
}
212222

213223
// Description of audio data to be synthesized.
@@ -266,6 +276,37 @@ message AudioConfig {
266276
];
267277
}
268278

279+
// Description of the custom voice to be synthesized.
280+
message CustomVoiceParams {
281+
// The usage of the synthesized audio. You must report your honest and
282+
// correct usage of the service as it's regulated by contract and will cause
283+
// significant difference in billing.
284+
enum ReportedUsage {
285+
// Request with reported usage unspecified will be rejected.
286+
REPORTED_USAGE_UNSPECIFIED = 0;
287+
288+
// For scenarios where the synthesized audio is not downloadable and can
289+
// only be used once. For example, real-time request in IVR system.
290+
REALTIME = 1;
291+
292+
// For scenarios where the synthesized audio is downloadable and can be
293+
// reused. For example, the synthesized audio is downloaded, stored in
294+
// customer service system and played repeatedly.
295+
OFFLINE = 2;
296+
}
297+
298+
// Required. The name of the AutoML model that synthesizes the custom voice.
299+
string model = 1 [
300+
(google.api.field_behavior) = REQUIRED,
301+
(google.api.resource_reference) = {
302+
type: "automl.googleapis.com/Model"
303+
}
304+
];
305+
306+
// Optional. The usage of the synthesized audio to be reported.
307+
ReportedUsage reported_usage = 3 [(google.api.field_behavior) = OPTIONAL];
308+
}
309+
269310
// The message returned to the client by the `SynthesizeSpeech` method.
270311
message SynthesizeSpeechResponse {
271312
// The audio data bytes encoded as specified in the request, including the

0 commit comments

Comments
 (0)