getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.cloud.texttospeech.v1.CustomVoiceParams getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java
new file mode 100644
index 00000000..7e1fadab
--- /dev/null
+++ b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/CustomVoiceParamsOrBuilder.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/texttospeech/v1/cloud_tts.proto
+
+package com.google.cloud.texttospeech.v1;
+
+public interface CustomVoiceParamsOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.texttospeech.v1.CustomVoiceParams)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Required. The name of the AutoML model that synthesizes the custom voice.
+ *
+ *
+ *
+ * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The model.
+ */
+ java.lang.String getModel();
+ /**
+ *
+ *
+ *
+ * Required. The name of the AutoML model that synthesizes the custom voice.
+ *
+ *
+ *
+ * string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for model.
+ */
+ com.google.protobuf.ByteString getModelBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The usage of the synthesized audio to be reported.
+ *
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for reportedUsage.
+ */
+ int getReportedUsageValue();
+ /**
+ *
+ *
+ *
+ * Optional. The usage of the synthesized audio to be reported.
+ *
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The reportedUsage.
+ */
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage getReportedUsage();
+}
diff --git a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java
index a5507e30..bb8f6f7d 100644
--- a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java
+++ b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechProto.java
@@ -55,6 +55,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_texttospeech_v1_AudioConfig_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_texttospeech_v1_AudioConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_texttospeech_v1_CustomVoiceParams_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_texttospeech_v1_CustomVoiceParams_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechResponse_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -87,41 +91,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "o_config\030\003 \001(\0132).google.cloud.texttospee"
+ "ch.v1.AudioConfigB\003\340A\002\"@\n\016SynthesisInput"
+ "\022\016\n\004text\030\001 \001(\tH\000\022\016\n\004ssml\030\002 \001(\tH\000B\016\n\014inpu"
- + "t_source\"\204\001\n\024VoiceSelectionParams\022\032\n\rlan"
+ + "t_source\"\313\001\n\024VoiceSelectionParams\022\032\n\rlan"
+ "guage_code\030\001 \001(\tB\003\340A\002\022\014\n\004name\030\002 \001(\t\022B\n\013s"
+ "sml_gender\030\003 \001(\0162-.google.cloud.texttosp"
- + "eech.v1.SsmlVoiceGender\"\361\001\n\013AudioConfig\022"
- + "H\n\016audio_encoding\030\001 \001(\0162+.google.cloud.t"
- + "exttospeech.v1.AudioEncodingB\003\340A\002\022\035\n\rspe"
- + "aking_rate\030\002 \001(\001B\006\340A\004\340A\001\022\025\n\005pitch\030\003 \001(\001B"
- + "\006\340A\004\340A\001\022\036\n\016volume_gain_db\030\004 \001(\001B\006\340A\004\340A\001\022"
- + "\036\n\021sample_rate_hertz\030\005 \001(\005B\003\340A\001\022\"\n\022effec"
- + "ts_profile_id\030\006 \003(\tB\006\340A\004\340A\001\"1\n\030Synthesiz"
- + "eSpeechResponse\022\025\n\raudio_content\030\001 \001(\014*W"
- + "\n\017SsmlVoiceGender\022!\n\035SSML_VOICE_GENDER_U"
- + "NSPECIFIED\020\000\022\010\n\004MALE\020\001\022\n\n\006FEMALE\020\002\022\013\n\007NE"
- + "UTRAL\020\003*i\n\rAudioEncoding\022\036\n\032AUDIO_ENCODI"
- + "NG_UNSPECIFIED\020\000\022\014\n\010LINEAR16\020\001\022\007\n\003MP3\020\002\022"
- + "\014\n\010OGG_OPUS\020\003\022\t\n\005MULAW\020\005\022\010\n\004ALAW\020\0062\264\003\n\014T"
- + "extToSpeech\022\223\001\n\nListVoices\022/.google.clou"
- + "d.texttospeech.v1.ListVoicesRequest\0320.go"
- + "ogle.cloud.texttospeech.v1.ListVoicesRes"
- + "ponse\"\"\202\323\344\223\002\014\022\n/v1/voices\332A\rlanguage_cod"
- + "e\022\274\001\n\020SynthesizeSpeech\0225.google.cloud.te"
- + "xttospeech.v1.SynthesizeSpeechRequest\0326."
- + "google.cloud.texttospeech.v1.SynthesizeS"
- + "peechResponse\"9\202\323\344\223\002\030\"\023/v1/text:synthesi"
- + "ze:\001*\332A\030input,voice,audio_config\032O\312A\033tex"
- + "ttospeech.googleapis.com\322A.https://www.g"
- + "oogleapis.com/auth/cloud-platformB\274\002\n co"
- + "m.google.cloud.texttospeech.v1B\021TextToSp"
- + "eechProtoP\001ZHgoogle.golang.org/genproto/"
- + "googleapis/cloud/texttospeech/v1;texttos"
- + "peech\370\001\001\252\002\034Google.Cloud.TextToSpeech.V1\312"
- + "\002\034Google\\Cloud\\TextToSpeech\\V1\352\002\037Google:"
- + ":Cloud::TextToSpeech::V1\352AU\n\033automl.goog"
- + "leapis.com/Model\0226projects/{project}/loc"
- + "ations/{location}/models/{model}b\006proto3"
+ + "eech.v1.SsmlVoiceGender\022E\n\014custom_voice\030"
+ + "\004 \001(\0132/.google.cloud.texttospeech.v1.Cus"
+ + "tomVoiceParams\"\361\001\n\013AudioConfig\022H\n\016audio_"
+ + "encoding\030\001 \001(\0162+.google.cloud.texttospee"
+ + "ch.v1.AudioEncodingB\003\340A\002\022\035\n\rspeaking_rat"
+ + "e\030\002 \001(\001B\006\340A\004\340A\001\022\025\n\005pitch\030\003 \001(\001B\006\340A\004\340A\001\022\036"
+ + "\n\016volume_gain_db\030\004 \001(\001B\006\340A\004\340A\001\022\036\n\021sample"
+ + "_rate_hertz\030\005 \001(\005B\003\340A\001\022\"\n\022effects_profil"
+ + "e_id\030\006 \003(\tB\006\340A\004\340A\001\"\357\001\n\021CustomVoiceParams"
+ + "\0222\n\005model\030\001 \001(\tB#\340A\002\372A\035\n\033automl.googleap"
+ + "is.com/Model\022Z\n\016reported_usage\030\003 \001(\0162=.g"
+ + "oogle.cloud.texttospeech.v1.CustomVoiceP"
+ + "arams.ReportedUsageB\003\340A\001\"J\n\rReportedUsag"
+ + "e\022\036\n\032REPORTED_USAGE_UNSPECIFIED\020\000\022\014\n\010REA"
+ + "LTIME\020\001\022\013\n\007OFFLINE\020\002\"1\n\030SynthesizeSpeech"
+ + "Response\022\025\n\raudio_content\030\001 \001(\014*W\n\017SsmlV"
+ + "oiceGender\022!\n\035SSML_VOICE_GENDER_UNSPECIF"
+ + "IED\020\000\022\010\n\004MALE\020\001\022\n\n\006FEMALE\020\002\022\013\n\007NEUTRAL\020\003"
+ + "*i\n\rAudioEncoding\022\036\n\032AUDIO_ENCODING_UNSP"
+ + "ECIFIED\020\000\022\014\n\010LINEAR16\020\001\022\007\n\003MP3\020\002\022\014\n\010OGG_"
+ + "OPUS\020\003\022\t\n\005MULAW\020\005\022\010\n\004ALAW\020\0062\264\003\n\014TextToSp"
+ + "eech\022\223\001\n\nListVoices\022/.google.cloud.textt"
+ + "ospeech.v1.ListVoicesRequest\0320.google.cl"
+ + "oud.texttospeech.v1.ListVoicesResponse\"\""
+ + "\202\323\344\223\002\014\022\n/v1/voices\332A\rlanguage_code\022\274\001\n\020S"
+ + "ynthesizeSpeech\0225.google.cloud.texttospe"
+ + "ech.v1.SynthesizeSpeechRequest\0326.google."
+ + "cloud.texttospeech.v1.SynthesizeSpeechRe"
+ + "sponse\"9\202\323\344\223\002\030\"\023/v1/text:synthesize:\001*\332A"
+ + "\030input,voice,audio_config\032O\312A\033texttospee"
+ + "ch.googleapis.com\322A.https://www.googleap"
+ + "is.com/auth/cloud-platformB\274\002\n com.googl"
+ + "e.cloud.texttospeech.v1B\021TextToSpeechPro"
+ + "toP\001ZHgoogle.golang.org/genproto/googlea"
+ + "pis/cloud/texttospeech/v1;texttospeech\370\001"
+ + "\001\252\002\034Google.Cloud.TextToSpeech.V1\312\002\034Googl"
+ + "e\\Cloud\\TextToSpeech\\V1\352\002\037Google::Cloud:"
+ + ":TextToSpeech::V1\352AU\n\033automl.googleapis."
+ + "com/Model\0226projects/{project}/locations/"
+ + "{location}/models/{model}b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -178,7 +190,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_texttospeech_v1_VoiceSelectionParams_descriptor,
new java.lang.String[] {
- "LanguageCode", "Name", "SsmlGender",
+ "LanguageCode", "Name", "SsmlGender", "CustomVoice",
});
internal_static_google_cloud_texttospeech_v1_AudioConfig_descriptor =
getDescriptor().getMessageTypes().get(6);
@@ -193,8 +205,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"SampleRateHertz",
"EffectsProfileId",
});
- internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechResponse_descriptor =
+ internal_static_google_cloud_texttospeech_v1_CustomVoiceParams_descriptor =
getDescriptor().getMessageTypes().get(7);
+ internal_static_google_cloud_texttospeech_v1_CustomVoiceParams_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_texttospeech_v1_CustomVoiceParams_descriptor,
+ new java.lang.String[] {
+ "Model", "ReportedUsage",
+ });
+ internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechResponse_descriptor =
+ getDescriptor().getMessageTypes().get(8);
internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_texttospeech_v1_SynthesizeSpeechResponse_descriptor,
@@ -209,6 +229,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
registry.add(com.google.api.ClientProto.methodSignature);
registry.add(com.google.api.ClientProto.oauthScopes);
registry.add(com.google.api.ResourceProto.resourceDefinition);
+ registry.add(com.google.api.ResourceProto.resourceReference);
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
descriptor, registry);
com.google.api.AnnotationsProto.getDescriptor();
diff --git a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParams.java b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParams.java
index 06ad0e56..d6bc8482 100644
--- a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParams.java
+++ b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParams.java
@@ -91,6 +91,23 @@ private VoiceSelectionParams(
int rawValue = input.readEnum();
ssmlGender_ = rawValue;
+ break;
+ }
+ case 34:
+ {
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.Builder subBuilder = null;
+ if (customVoice_ != null) {
+ subBuilder = customVoice_.toBuilder();
+ }
+ customVoice_ =
+ input.readMessage(
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(customVoice_);
+ customVoice_ = subBuilder.buildPartial();
+ }
+
break;
}
default:
@@ -291,6 +308,60 @@ public com.google.cloud.texttospeech.v1.SsmlVoiceGender getSsmlGender() {
return result == null ? com.google.cloud.texttospeech.v1.SsmlVoiceGender.UNRECOGNIZED : result;
}
+ public static final int CUSTOM_VOICE_FIELD_NUMBER = 4;
+ private com.google.cloud.texttospeech.v1.CustomVoiceParams customVoice_;
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ *
+ * @return Whether the customVoice field is set.
+ */
+ @java.lang.Override
+ public boolean hasCustomVoice() {
+ return customVoice_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ *
+ * @return The customVoice.
+ */
+ @java.lang.Override
+ public com.google.cloud.texttospeech.v1.CustomVoiceParams getCustomVoice() {
+ return customVoice_ == null
+ ? com.google.cloud.texttospeech.v1.CustomVoiceParams.getDefaultInstance()
+ : customVoice_;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ @java.lang.Override
+ public com.google.cloud.texttospeech.v1.CustomVoiceParamsOrBuilder getCustomVoiceOrBuilder() {
+ return getCustomVoice();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -316,6 +387,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
.getNumber()) {
output.writeEnum(3, ssmlGender_);
}
+ if (customVoice_ != null) {
+ output.writeMessage(4, getCustomVoice());
+ }
unknownFields.writeTo(output);
}
@@ -336,6 +410,9 @@ public int getSerializedSize() {
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, ssmlGender_);
}
+ if (customVoice_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCustomVoice());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -355,6 +432,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getLanguageCode().equals(other.getLanguageCode())) return false;
if (!getName().equals(other.getName())) return false;
if (ssmlGender_ != other.ssmlGender_) return false;
+ if (hasCustomVoice() != other.hasCustomVoice()) return false;
+ if (hasCustomVoice()) {
+ if (!getCustomVoice().equals(other.getCustomVoice())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -372,6 +453,10 @@ public int hashCode() {
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + SSML_GENDER_FIELD_NUMBER;
hash = (53 * hash) + ssmlGender_;
+ if (hasCustomVoice()) {
+ hash = (37 * hash) + CUSTOM_VOICE_FIELD_NUMBER;
+ hash = (53 * hash) + getCustomVoice().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -524,6 +609,12 @@ public Builder clear() {
ssmlGender_ = 0;
+ if (customVoiceBuilder_ == null) {
+ customVoice_ = null;
+ } else {
+ customVoice_ = null;
+ customVoiceBuilder_ = null;
+ }
return this;
}
@@ -554,6 +645,11 @@ public com.google.cloud.texttospeech.v1.VoiceSelectionParams buildPartial() {
result.languageCode_ = languageCode_;
result.name_ = name_;
result.ssmlGender_ = ssmlGender_;
+ if (customVoiceBuilder_ == null) {
+ result.customVoice_ = customVoice_;
+ } else {
+ result.customVoice_ = customVoiceBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -615,6 +711,9 @@ public Builder mergeFrom(com.google.cloud.texttospeech.v1.VoiceSelectionParams o
if (other.ssmlGender_ != 0) {
setSsmlGenderValue(other.getSsmlGenderValue());
}
+ if (other.hasCustomVoice()) {
+ mergeCustomVoice(other.getCustomVoice());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1025,6 +1124,210 @@ public Builder clearSsmlGender() {
return this;
}
+ private com.google.cloud.texttospeech.v1.CustomVoiceParams customVoice_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.texttospeech.v1.CustomVoiceParams,
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.Builder,
+ com.google.cloud.texttospeech.v1.CustomVoiceParamsOrBuilder>
+ customVoiceBuilder_;
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ *
+ * @return Whether the customVoice field is set.
+ */
+ public boolean hasCustomVoice() {
+ return customVoiceBuilder_ != null || customVoice_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ *
+ * @return The customVoice.
+ */
+ public com.google.cloud.texttospeech.v1.CustomVoiceParams getCustomVoice() {
+ if (customVoiceBuilder_ == null) {
+ return customVoice_ == null
+ ? com.google.cloud.texttospeech.v1.CustomVoiceParams.getDefaultInstance()
+ : customVoice_;
+ } else {
+ return customVoiceBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ public Builder setCustomVoice(com.google.cloud.texttospeech.v1.CustomVoiceParams value) {
+ if (customVoiceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ customVoice_ = value;
+ onChanged();
+ } else {
+ customVoiceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ public Builder setCustomVoice(
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.Builder builderForValue) {
+ if (customVoiceBuilder_ == null) {
+ customVoice_ = builderForValue.build();
+ onChanged();
+ } else {
+ customVoiceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ public Builder mergeCustomVoice(com.google.cloud.texttospeech.v1.CustomVoiceParams value) {
+ if (customVoiceBuilder_ == null) {
+ if (customVoice_ != null) {
+ customVoice_ =
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.newBuilder(customVoice_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ customVoice_ = value;
+ }
+ onChanged();
+ } else {
+ customVoiceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ public Builder clearCustomVoice() {
+ if (customVoiceBuilder_ == null) {
+ customVoice_ = null;
+ onChanged();
+ } else {
+ customVoice_ = null;
+ customVoiceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ public com.google.cloud.texttospeech.v1.CustomVoiceParams.Builder getCustomVoiceBuilder() {
+
+ onChanged();
+ return getCustomVoiceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ public com.google.cloud.texttospeech.v1.CustomVoiceParamsOrBuilder getCustomVoiceOrBuilder() {
+ if (customVoiceBuilder_ != null) {
+ return customVoiceBuilder_.getMessageOrBuilder();
+ } else {
+ return customVoice_ == null
+ ? com.google.cloud.texttospeech.v1.CustomVoiceParams.getDefaultInstance()
+ : customVoice_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.texttospeech.v1.CustomVoiceParams,
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.Builder,
+ com.google.cloud.texttospeech.v1.CustomVoiceParamsOrBuilder>
+ getCustomVoiceFieldBuilder() {
+ if (customVoiceBuilder_ == null) {
+ customVoiceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.texttospeech.v1.CustomVoiceParams,
+ com.google.cloud.texttospeech.v1.CustomVoiceParams.Builder,
+ com.google.cloud.texttospeech.v1.CustomVoiceParamsOrBuilder>(
+ getCustomVoice(), getParentForChildren(), isClean());
+ customVoice_ = null;
+ }
+ return customVoiceBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParamsOrBuilder.java b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParamsOrBuilder.java
index 06af331c..048ded27 100644
--- a/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParamsOrBuilder.java
+++ b/proto-google-cloud-texttospeech-v1/src/main/java/com/google/cloud/texttospeech/v1/VoiceSelectionParamsOrBuilder.java
@@ -127,4 +127,45 @@ public interface VoiceSelectionParamsOrBuilder
* @return The ssmlGender.
*/
com.google.cloud.texttospeech.v1.SsmlVoiceGender getSsmlGender();
+
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ *
+ * @return Whether the customVoice field is set.
+ */
+ boolean hasCustomVoice();
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ *
+ * @return The customVoice.
+ */
+ com.google.cloud.texttospeech.v1.CustomVoiceParams getCustomVoice();
+ /**
+ *
+ *
+ *
+ * The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ * the service will choose the custom voice matching the specified
+ * configuration.
+ *
+ *
+ * .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4;
+ */
+ com.google.cloud.texttospeech.v1.CustomVoiceParamsOrBuilder getCustomVoiceOrBuilder();
}
diff --git a/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto b/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto
index 7f64fd45..4c4ae7bd 100644
--- a/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto
+++ b/proto-google-cloud-texttospeech-v1/src/main/proto/google/cloud/texttospeech/v1/cloud_tts.proto
@@ -1,4 +1,4 @@
-// Copyright 2021 Google LLC
+// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -58,19 +58,6 @@ service TextToSpeech {
}
}
-// The top-level message sent by the client for the `ListVoices` method.
-message ListVoicesRequest {
- // Optional. Recommended.
- // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- // If not specified, the API will return all supported voices.
- // If specified, the ListVoices call will only return voices that can be used
- // to synthesize this language_code. For example, if you specify `"en-NZ"`,
- // all `"en-NZ"` voices will be returned. If you specify `"no"`, both
- // `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
- // returned.
- string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
-}
-
// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
enum SsmlVoiceGender {
@@ -119,6 +106,19 @@ enum AudioEncoding {
ALAW = 6;
}
+// The top-level message sent by the client for the `ListVoices` method.
+message ListVoicesRequest {
+ // Optional. Recommended.
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
+ // If not specified, the API will return all supported voices.
+ // If specified, the ListVoices call will only return voices that can be used
+ // to synthesize this language_code. For example, if you specify `"en-NZ"`,
+ // all `"en-NZ"` voices will be returned. If you specify `"no"`, both
+ // `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
+ // returned.
+ string language_code = 1 [(google.api.field_behavior) = OPTIONAL];
+}
+
// The message returned to the client by the `ListVoices` method.
message ListVoicesResponse {
// The list of voices.
@@ -197,6 +197,11 @@ message VoiceSelectionParams {
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlVoiceGender ssml_gender = 3;
+
+ // The configuration for a custom voice. If [CustomVoiceParams.model] is set,
+ // the service will choose the custom voice matching the specified
+ // configuration.
+ CustomVoiceParams custom_voice = 4;
}
// Description of audio data to be synthesized.
@@ -255,6 +260,37 @@ message AudioConfig {
];
}
+// Description of the custom voice to be synthesized.
+message CustomVoiceParams {
+ // The usage of the synthesized audio. You must report your honest and
+ // correct usage of the service as it's regulated by contract and will cause
+ // significant difference in billing.
+ enum ReportedUsage {
+ // Request with reported usage unspecified will be rejected.
+ REPORTED_USAGE_UNSPECIFIED = 0;
+
+ // For scenarios where the synthesized audio is not downloadable and can
+ // only be used once. For example, real-time request in IVR system.
+ REALTIME = 1;
+
+ // For scenarios where the synthesized audio is downloadable and can be
+ // reused. For example, the synthesized audio is downloaded, stored in
+ // customer service system and played repeatedly.
+ OFFLINE = 2;
+ }
+
+ // Required. The name of the AutoML model that synthesizes the custom voice.
+ string model = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {
+ type: "automl.googleapis.com/Model"
+ }
+ ];
+
+ // Optional. The usage of the synthesized audio to be reported.
+ ReportedUsage reported_usage = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
// The message returned to the client by the `SynthesizeSpeech` method.
message SynthesizeSpeechResponse {
// The audio data bytes encoded as specified in the request, including the
diff --git a/proto-google-cloud-texttospeech-v1beta1/pom.xml b/proto-google-cloud-texttospeech-v1beta1/pom.xml
index 2115ac21..4ab5567b 100644
--- a/proto-google-cloud-texttospeech-v1beta1/pom.xml
+++ b/proto-google-cloud-texttospeech-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-texttospeech-v1beta1
- 0.90.5
+ 0.91.0
proto-google-cloud-texttospeech-v1beta1
PROTO library for proto-google-cloud-texttospeech-v1beta1
com.google.cloud
google-cloud-texttospeech-parent
- 2.1.5
+ 2.2.0
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 36ac49ea..5ecb3976 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
google-cloud-texttospeech
- 2.1.4
+ 2.1.5
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index e678cdea..7aba25c7 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-texttospeech
- 2.1.5
+ 2.2.0
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 0d4712f0..052c8ca2 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -30,7 +30,7 @@
com.google.cloud
libraries-bom
- 24.3.0
+ 25.0.0
pom
import
diff --git a/versions.txt b/versions.txt
index 19503df9..a02f2648 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,8 +1,8 @@
# Format:
# module:released-version:current-version
-google-cloud-texttospeech:2.1.5:2.1.5
-grpc-google-cloud-texttospeech-v1beta1:0.90.5:0.90.5
-grpc-google-cloud-texttospeech-v1:2.1.5:2.1.5
-proto-google-cloud-texttospeech-v1:2.1.5:2.1.5
-proto-google-cloud-texttospeech-v1beta1:0.90.5:0.90.5
+google-cloud-texttospeech:2.2.0:2.2.0
+grpc-google-cloud-texttospeech-v1beta1:0.91.0:0.91.0
+grpc-google-cloud-texttospeech-v1:2.2.0:2.2.0
+proto-google-cloud-texttospeech-v1:2.2.0:2.2.0
+proto-google-cloud-texttospeech-v1beta1:0.91.0:0.91.0