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

Commit 0a22350

Browse files
feat: update v1 proto (#598)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 410256789 Source-Link: googleapis/googleapis@b3ff183 Source-Link: https://github.com/googleapis/googleapis-gen/commit/488fbdc46962d8b0c77af706faa552b9fb5a71b8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDg4ZmJkYzQ2OTYyZDhiMGM3N2FmNzA2ZmFhNTUyYjlmYjVhNzFiOCJ9
1 parent 7f19227 commit 0a22350

File tree

5 files changed

+121
-55
lines changed

5 files changed

+121
-55
lines changed

google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/TextToSpeechStubSettings.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ public static class Builder extends StubSettings.Builder<TextToSpeechStubSetting
208208
.setInitialRetryDelay(Duration.ofMillis(100L))
209209
.setRetryDelayMultiplier(1.3)
210210
.setMaxRetryDelay(Duration.ofMillis(60000L))
211-
.setInitialRpcTimeout(Duration.ofMillis(600000L))
211+
.setInitialRpcTimeout(Duration.ofMillis(300000L))
212212
.setRpcTimeoutMultiplier(1.0)
213-
.setMaxRpcTimeout(Duration.ofMillis(600000L))
214-
.setTotalTimeout(Duration.ofMillis(600000L))
213+
.setMaxRpcTimeout(Duration.ofMillis(300000L))
214+
.setTotalTimeout(Duration.ofMillis(300000L))
215215
.build();
216216
definitions.put("retry_policy_0_params", settings);
217217
RETRY_PARAM_DEFINITIONS = definitions.build();

proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/AudioEncoding.java

+48
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,28 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
7373
* <code>OGG_OPUS = 3;</code>
7474
*/
7575
OGG_OPUS(3),
76+
/**
77+
*
78+
*
79+
* <pre>
80+
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
81+
* Audio content returned as MULAW also contains a WAV header.
82+
* </pre>
83+
*
84+
* <code>MULAW = 5;</code>
85+
*/
86+
MULAW(5),
87+
/**
88+
*
89+
*
90+
* <pre>
91+
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
92+
* Audio content returned as ALAW also contains a WAV header.
93+
* </pre>
94+
*
95+
* <code>ALAW = 6;</code>
96+
*/
97+
ALAW(6),
7698
UNRECOGNIZED(-1),
7799
;
78100

@@ -120,6 +142,28 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
120142
* <code>OGG_OPUS = 3;</code>
121143
*/
122144
public static final int OGG_OPUS_VALUE = 3;
145+
/**
146+
*
147+
*
148+
* <pre>
149+
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
150+
* Audio content returned as MULAW also contains a WAV header.
151+
* </pre>
152+
*
153+
* <code>MULAW = 5;</code>
154+
*/
155+
public static final int MULAW_VALUE = 5;
156+
/**
157+
*
158+
*
159+
* <pre>
160+
* 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
161+
* Audio content returned as ALAW also contains a WAV header.
162+
* </pre>
163+
*
164+
* <code>ALAW = 6;</code>
165+
*/
166+
public static final int ALAW_VALUE = 6;
123167

124168
public final int getNumber() {
125169
if (this == UNRECOGNIZED) {
@@ -153,6 +197,10 @@ public static AudioEncoding forNumber(int value) {
153197
return MP3;
154198
case 3:
155199
return OGG_OPUS;
200+
case 5:
201+
return MULAW;
202+
case 6:
203+
return ALAW;
156204
default:
157205
return null;
158206
}

proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/SsmlVoiceGender.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public enum SsmlVoiceGender implements com.google.protobuf.ProtocolMessageEnum {
6767
*
6868
*
6969
* <pre>
70-
* A gender-neutral voice.
70+
* A gender-neutral voice. This voice is not yet supported.
7171
* </pre>
7272
*
7373
* <code>NEUTRAL = 3;</code>
@@ -114,7 +114,7 @@ public enum SsmlVoiceGender implements com.google.protobuf.ProtocolMessageEnum {
114114
*
115115
*
116116
* <pre>
117-
* A gender-neutral voice.
117+
* A gender-neutral voice. This voice is not yet supported.
118118
* </pre>
119119
*
120120
* <code>NEUTRAL = 3;</code>

proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java

+53-47
Original file line numberDiff line numberDiff line change
@@ -72,53 +72,56 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
7272
+ ".proto\022\034google.cloud.texttospeech.v1\032\034go"
7373
+ "ogle/api/annotations.proto\032\027google/api/c"
7474
+ "lient.proto\032\037google/api/field_behavior.p"
75-
+ "roto\"/\n\021ListVoicesRequest\022\032\n\rlanguage_co"
76-
+ "de\030\001 \001(\tB\003\340A\001\"I\n\022ListVoicesResponse\0223\n\006v"
77-
+ "oices\030\001 \003(\0132#.google.cloud.texttospeech."
78-
+ "v1.Voice\"\224\001\n\005Voice\022\026\n\016language_codes\030\001 \003"
79-
+ "(\t\022\014\n\004name\030\002 \001(\t\022B\n\013ssml_gender\030\003 \001(\0162-."
80-
+ "google.cloud.texttospeech.v1.SsmlVoiceGe"
81-
+ "nder\022!\n\031natural_sample_rate_hertz\030\004 \001(\005\""
82-
+ "\351\001\n\027SynthesizeSpeechRequest\022@\n\005input\030\001 \001"
83-
+ "(\0132,.google.cloud.texttospeech.v1.Synthe"
84-
+ "sisInputB\003\340A\002\022F\n\005voice\030\002 \001(\01322.google.cl"
85-
+ "oud.texttospeech.v1.VoiceSelectionParams"
86-
+ "B\003\340A\002\022D\n\014audio_config\030\003 \001(\0132).google.clo"
87-
+ "ud.texttospeech.v1.AudioConfigB\003\340A\002\"@\n\016S"
88-
+ "ynthesisInput\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 "
89-
+ "\001(\tH\000B\016\n\014input_source\"\204\001\n\024VoiceSelection"
90-
+ "Params\022\032\n\rlanguage_code\030\001 \001(\tB\003\340A\002\022\014\n\004na"
91-
+ "me\030\002 \001(\t\022B\n\013ssml_gender\030\003 \001(\0162-.google.c"
92-
+ "loud.texttospeech.v1.SsmlVoiceGender\"\361\001\n"
93-
+ "\013AudioConfig\022H\n\016audio_encoding\030\001 \001(\0162+.g"
94-
+ "oogle.cloud.texttospeech.v1.AudioEncodin"
95-
+ "gB\003\340A\002\022\035\n\rspeaking_rate\030\002 \001(\001B\006\340A\004\340A\001\022\025\n"
96-
+ "\005pitch\030\003 \001(\001B\006\340A\004\340A\001\022\036\n\016volume_gain_db\030\004"
97-
+ " \001(\001B\006\340A\004\340A\001\022\036\n\021sample_rate_hertz\030\005 \001(\005B"
98-
+ "\003\340A\001\022\"\n\022effects_profile_id\030\006 \003(\tB\006\340A\004\340A\001"
99-
+ "\"1\n\030SynthesizeSpeechResponse\022\025\n\raudio_co"
100-
+ "ntent\030\001 \001(\014*W\n\017SsmlVoiceGender\022!\n\035SSML_V"
101-
+ "OICE_GENDER_UNSPECIFIED\020\000\022\010\n\004MALE\020\001\022\n\n\006F"
102-
+ "EMALE\020\002\022\013\n\007NEUTRAL\020\003*T\n\rAudioEncoding\022\036\n"
103-
+ "\032AUDIO_ENCODING_UNSPECIFIED\020\000\022\014\n\010LINEAR1"
104-
+ "6\020\001\022\007\n\003MP3\020\002\022\014\n\010OGG_OPUS\020\0032\264\003\n\014TextToSpe"
105-
+ "ech\022\223\001\n\nListVoices\022/.google.cloud.textto"
106-
+ "speech.v1.ListVoicesRequest\0320.google.clo"
107-
+ "ud.texttospeech.v1.ListVoicesResponse\"\"\202"
108-
+ "\323\344\223\002\014\022\n/v1/voices\332A\rlanguage_code\022\274\001\n\020Sy"
109-
+ "nthesizeSpeech\0225.google.cloud.texttospee"
110-
+ "ch.v1.SynthesizeSpeechRequest\0326.google.c"
111-
+ "loud.texttospeech.v1.SynthesizeSpeechRes"
112-
+ "ponse\"9\202\323\344\223\002\030\"\023/v1/text:synthesize:\001*\332A\030"
113-
+ "input,voice,audio_config\032O\312A\033texttospeec"
114-
+ "h.googleapis.com\322A.https://www.googleapi"
115-
+ "s.com/auth/cloud-platformB\344\001\n com.google"
116-
+ ".cloud.texttospeech.v1B\021TextToSpeechProt"
117-
+ "oP\001ZHgoogle.golang.org/genproto/googleap"
118-
+ "is/cloud/texttospeech/v1;texttospeech\370\001\001"
119-
+ "\252\002\034Google.Cloud.TextToSpeech.V1\312\002\034Google"
120-
+ "\\Cloud\\TextToSpeech\\V1\352\002\037Google::Cloud::"
121-
+ "TextToSpeech::V1b\006proto3"
75+
+ "roto\032\031google/api/resource.proto\"/\n\021ListV"
76+
+ "oicesRequest\022\032\n\rlanguage_code\030\001 \001(\tB\003\340A\001"
77+
+ "\"I\n\022ListVoicesResponse\0223\n\006voices\030\001 \003(\0132#"
78+
+ ".google.cloud.texttospeech.v1.Voice\"\224\001\n\005"
79+
+ "Voice\022\026\n\016language_codes\030\001 \003(\t\022\014\n\004name\030\002 "
80+
+ "\001(\t\022B\n\013ssml_gender\030\003 \001(\0162-.google.cloud."
81+
+ "texttospeech.v1.SsmlVoiceGender\022!\n\031natur"
82+
+ "al_sample_rate_hertz\030\004 \001(\005\"\351\001\n\027Synthesiz"
83+
+ "eSpeechRequest\022@\n\005input\030\001 \001(\0132,.google.c"
84+
+ "loud.texttospeech.v1.SynthesisInputB\003\340A\002"
85+
+ "\022F\n\005voice\030\002 \001(\01322.google.cloud.texttospe"
86+
+ "ech.v1.VoiceSelectionParamsB\003\340A\002\022D\n\014audi"
87+
+ "o_config\030\003 \001(\0132).google.cloud.texttospee"
88+
+ "ch.v1.AudioConfigB\003\340A\002\"@\n\016SynthesisInput"
89+
+ "\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000B\016\n\014inpu"
90+
+ "t_source\"\204\001\n\024VoiceSelectionParams\022\032\n\rlan"
91+
+ "guage_code\030\001 \001(\tB\003\340A\002\022\014\n\004name\030\002 \001(\t\022B\n\013s"
92+
+ "sml_gender\030\003 \001(\0162-.google.cloud.texttosp"
93+
+ "eech.v1.SsmlVoiceGender\"\361\001\n\013AudioConfig\022"
94+
+ "H\n\016audio_encoding\030\001 \001(\0162+.google.cloud.t"
95+
+ "exttospeech.v1.AudioEncodingB\003\340A\002\022\035\n\rspe"
96+
+ "aking_rate\030\002 \001(\001B\006\340A\004\340A\001\022\025\n\005pitch\030\003 \001(\001B"
97+
+ "\006\340A\004\340A\001\022\036\n\016volume_gain_db\030\004 \001(\001B\006\340A\004\340A\001\022"
98+
+ "\036\n\021sample_rate_hertz\030\005 \001(\005B\003\340A\001\022\"\n\022effec"
99+
+ "ts_profile_id\030\006 \003(\tB\006\340A\004\340A\001\"1\n\030Synthesiz"
100+
+ "eSpeechResponse\022\025\n\raudio_content\030\001 \001(\014*W"
101+
+ "\n\017SsmlVoiceGender\022!\n\035SSML_VOICE_GENDER_U"
102+
+ "NSPECIFIED\020\000\022\010\n\004MALE\020\001\022\n\n\006FEMALE\020\002\022\013\n\007NE"
103+
+ "UTRAL\020\003*i\n\rAudioEncoding\022\036\n\032AUDIO_ENCODI"
104+
+ "NG_UNSPECIFIED\020\000\022\014\n\010LINEAR16\020\001\022\007\n\003MP3\020\002\022"
105+
+ "\014\n\010OGG_OPUS\020\003\022\t\n\005MULAW\020\005\022\010\n\004ALAW\020\0062\264\003\n\014T"
106+
+ "extToSpeech\022\223\001\n\nListVoices\022/.google.clou"
107+
+ "d.texttospeech.v1.ListVoicesRequest\0320.go"
108+
+ "ogle.cloud.texttospeech.v1.ListVoicesRes"
109+
+ "ponse\"\"\202\323\344\223\002\014\022\n/v1/voices\332A\rlanguage_cod"
110+
+ "e\022\274\001\n\020SynthesizeSpeech\0225.google.cloud.te"
111+
+ "xttospeech.v1.SynthesizeSpeechRequest\0326."
112+
+ "google.cloud.texttospeech.v1.SynthesizeS"
113+
+ "peechResponse\"9\202\323\344\223\002\030\"\023/v1/text:synthesi"
114+
+ "ze:\001*\332A\030input,voice,audio_config\032O\312A\033tex"
115+
+ "ttospeech.googleapis.com\322A.https://www.g"
116+
+ "oogleapis.com/auth/cloud-platformB\274\002\n co"
117+
+ "m.google.cloud.texttospeech.v1B\021TextToSp"
118+
+ "eechProtoP\001ZHgoogle.golang.org/genproto/"
119+
+ "googleapis/cloud/texttospeech/v1;texttos"
120+
+ "peech\370\001\001\252\002\034Google.Cloud.TextToSpeech.V1\312"
121+
+ "\002\034Google\\Cloud\\TextToSpeech\\V1\352\002\037Google:"
122+
+ ":Cloud::TextToSpeech::V1\352AU\n\033automl.goog"
123+
+ "leapis.com/Model\0226projects/{project}/loc"
124+
+ "ations/{location}/models/{model}b\006proto3"
122125
};
123126
descriptor =
124127
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -127,6 +130,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
127130
com.google.api.AnnotationsProto.getDescriptor(),
128131
com.google.api.ClientProto.getDescriptor(),
129132
com.google.api.FieldBehaviorProto.getDescriptor(),
133+
com.google.api.ResourceProto.getDescriptor(),
130134
});
131135
internal_static_google_cloud_texttospeech_v1_ListVoicesRequest_descriptor =
132136
getDescriptor().getMessageTypes().get(0);
@@ -204,11 +208,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
204208
registry.add(com.google.api.AnnotationsProto.http);
205209
registry.add(com.google.api.ClientProto.methodSignature);
206210
registry.add(com.google.api.ClientProto.oauthScopes);
211+
registry.add(com.google.api.ResourceProto.resourceDefinition);
207212
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
208213
descriptor, registry);
209214
com.google.api.AnnotationsProto.getDescriptor();
210215
com.google.api.ClientProto.getDescriptor();
211216
com.google.api.FieldBehaviorProto.getDescriptor();
217+
com.google.api.ResourceProto.getDescriptor();
212218
}
213219

214220
// @@protoc_insertion_point(outer_class_scope)

proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
//
1514

1615
syntax = "proto3";
1716

@@ -20,6 +19,7 @@ package google.cloud.texttospeech.v1;
2019
import "google/api/annotations.proto";
2120
import "google/api/client.proto";
2221
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
2323

2424
option cc_enable_arenas = true;
2525
option csharp_namespace = "Google.Cloud.TextToSpeech.V1";
@@ -29,6 +29,10 @@ option java_outer_classname = "TextToSpeechProto";
2929
option java_package = "com.google.cloud.texttospeech.v1";
3030
option php_namespace = "Google\\Cloud\\TextToSpeech\\V1";
3131
option ruby_package = "Google::Cloud::TextToSpeech::V1";
32+
option (google.api.resource_definition) = {
33+
type: "automl.googleapis.com/Model"
34+
pattern: "projects/{project}/locations/{location}/models/{model}"
35+
};
3236

3337
// Service that implements Google Cloud Text-to-Speech API.
3438
service TextToSpeech {
@@ -83,7 +87,7 @@ enum SsmlVoiceGender {
8387
// A female voice.
8488
FEMALE = 2;
8589

86-
// A gender-neutral voice.
90+
// A gender-neutral voice. This voice is not yet supported.
8791
NEUTRAL = 3;
8892
}
8993

@@ -105,6 +109,14 @@ enum AudioEncoding {
105109
// Chrome and Firefox). The quality of the encoding is considerably higher
106110
// than MP3 while using approximately the same bitrate.
107111
OGG_OPUS = 3;
112+
113+
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
114+
// Audio content returned as MULAW also contains a WAV header.
115+
MULAW = 5;
116+
117+
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.
118+
// Audio content returned as ALAW also contains a WAV header.
119+
ALAW = 6;
108120
}
109121

110122
// The message returned to the client by the `ListVoices` method.

0 commit comments

Comments
 (0)