diff --git a/proto-google-cloud-mediatranslation-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-mediatranslation-v1beta1/clirr-ignored-differences.xml
index a7ff9fa6..9785ec00 100644
--- a/proto-google-cloud-mediatranslation-v1beta1/clirr-ignored-differences.xml
+++ b/proto-google-cloud-mediatranslation-v1beta1/clirr-ignored-differences.xml
@@ -6,4 +6,25 @@
- * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The detectedSourceLanguageCode.
- */
- java.lang.String getDetectedSourceLanguageCode();
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The bytes for detectedSourceLanguageCode.
- */
- com.google.protobuf.ByteString getDetectedSourceLanguageCodeBytes();
}
/**
*
@@ -241,7 +201,6 @@ private TextTranslationResult(com.google.protobuf.GeneratedMessageV3.Builder>
private TextTranslationResult() {
translation_ = "";
- detectedSourceLanguageCode_ = "";
}
@java.lang.Override
@@ -285,13 +244,6 @@ private TextTranslationResult(
isFinal_ = input.readBool();
break;
}
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- detectedSourceLanguageCode_ = s;
- break;
- }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -400,61 +352,6 @@ public boolean getIsFinal() {
return isFinal_;
}
- public static final int DETECTED_SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 3;
- private volatile java.lang.Object detectedSourceLanguageCode_;
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The detectedSourceLanguageCode.
- */
- @java.lang.Override
- public java.lang.String getDetectedSourceLanguageCode() {
- java.lang.Object ref = detectedSourceLanguageCode_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- detectedSourceLanguageCode_ = s;
- return s;
- }
- }
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The bytes for detectedSourceLanguageCode.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getDetectedSourceLanguageCodeBytes() {
- java.lang.Object ref = detectedSourceLanguageCode_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- detectedSourceLanguageCode_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -475,9 +372,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (isFinal_ != false) {
output.writeBool(2, isFinal_);
}
- if (!getDetectedSourceLanguageCodeBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, detectedSourceLanguageCode_);
- }
unknownFields.writeTo(output);
}
@@ -493,11 +387,6 @@ public int getSerializedSize() {
if (isFinal_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isFinal_);
}
- if (!getDetectedSourceLanguageCodeBytes().isEmpty()) {
- size +=
- com.google.protobuf.GeneratedMessageV3.computeStringSize(
- 3, detectedSourceLanguageCode_);
- }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -522,8 +411,6 @@ public boolean equals(final java.lang.Object obj) {
if (!getTranslation().equals(other.getTranslation())) return false;
if (getIsFinal() != other.getIsFinal()) return false;
- if (!getDetectedSourceLanguageCode().equals(other.getDetectedSourceLanguageCode()))
- return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -539,8 +426,6 @@ public int hashCode() {
hash = (53 * hash) + getTranslation().hashCode();
hash = (37 * hash) + IS_FINAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsFinal());
- hash = (37 * hash) + DETECTED_SOURCE_LANGUAGE_CODE_FIELD_NUMBER;
- hash = (53 * hash) + getDetectedSourceLanguageCode().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -718,8 +603,6 @@ public Builder clear() {
isFinal_ = false;
- detectedSourceLanguageCode_ = "";
-
return this;
}
@@ -761,7 +644,6 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
.TextTranslationResult(this);
result.translation_ = translation_;
result.isFinal_ = isFinal_;
- result.detectedSourceLanguageCode_ = detectedSourceLanguageCode_;
onBuilt();
return result;
}
@@ -831,10 +713,6 @@ public Builder mergeFrom(
if (other.getIsFinal() != false) {
setIsFinal(other.getIsFinal());
}
- if (!other.getDetectedSourceLanguageCode().isEmpty()) {
- detectedSourceLanguageCode_ = other.detectedSourceLanguageCode_;
- onChanged();
- }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1042,132 +920,6 @@ public Builder clearIsFinal() {
return this;
}
- private java.lang.Object detectedSourceLanguageCode_ = "";
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
- * string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The detectedSourceLanguageCode.
- */
- public java.lang.String getDetectedSourceLanguageCode() {
- java.lang.Object ref = detectedSourceLanguageCode_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- detectedSourceLanguageCode_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
- * string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The bytes for detectedSourceLanguageCode.
- */
- public com.google.protobuf.ByteString getDetectedSourceLanguageCodeBytes() {
- java.lang.Object ref = detectedSourceLanguageCode_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- detectedSourceLanguageCode_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
- * string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @param value The detectedSourceLanguageCode to set.
- * @return This builder for chaining.
- */
- public Builder setDetectedSourceLanguageCode(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- detectedSourceLanguageCode_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
- * string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return This builder for chaining.
- */
- public Builder clearDetectedSourceLanguageCode() {
-
- detectedSourceLanguageCode_ = getDefaultInstance().getDetectedSourceLanguageCode();
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Output only. The source language code (BCP-47) detected in the audio. Speech - * translation result will translate in the most likely language detected - * including the alternative source languages and main source_language_code. - *- * - *
- * string detected_source_language_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @param value The bytes for detectedSourceLanguageCode to set.
- * @return This builder for chaining.
- */
- public Builder setDetectedSourceLanguageCodeBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- detectedSourceLanguageCode_ = value;
- onChanged();
- return this;
- }
-
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
@@ -1339,61 +1091,6 @@ public boolean hasTextTranslationResult() {
.TextTranslationResult.getDefaultInstance();
}
- public static final int RECOGNITION_RESULT_FIELD_NUMBER = 3;
- private volatile java.lang.Object recognitionResult_;
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return The recognitionResult.
- */
- @java.lang.Override
- public java.lang.String getRecognitionResult() {
- java.lang.Object ref = recognitionResult_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- recognitionResult_ = s;
- return s;
- }
- }
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return The bytes for recognitionResult.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getRecognitionResultBytes() {
- java.lang.Object ref = recognitionResult_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- recognitionResult_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -1415,9 +1112,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
.TextTranslationResult)
result_);
}
- if (!getRecognitionResultBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, recognitionResult_);
- }
unknownFields.writeTo(output);
}
@@ -1435,9 +1129,6 @@ public int getSerializedSize() {
.TextTranslationResult)
result_);
}
- if (!getRecognitionResultBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, recognitionResult_);
- }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -1455,7 +1146,6 @@ public boolean equals(final java.lang.Object obj) {
com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult other =
(com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult) obj;
- if (!getRecognitionResult().equals(other.getRecognitionResult())) return false;
if (!getResultCase().equals(other.getResultCase())) return false;
switch (resultCase_) {
case 1:
@@ -1475,8 +1165,6 @@ public int hashCode() {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + RECOGNITION_RESULT_FIELD_NUMBER;
- hash = (53 * hash) + getRecognitionResult().hashCode();
switch (resultCase_) {
case 1:
hash = (37 * hash) + TEXT_TRANSLATION_RESULT_FIELD_NUMBER;
@@ -1635,8 +1323,6 @@ private void maybeForceBuilderInitialization() {
@java.lang.Override
public Builder clear() {
super.clear();
- recognitionResult_ = "";
-
resultCase_ = 0;
result_ = null;
return this;
@@ -1676,7 +1362,6 @@ public com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult
result.result_ = textTranslationResultBuilder_.build();
}
}
- result.recognitionResult_ = recognitionResult_;
result.resultCase_ = resultCase_;
onBuilt();
return result;
@@ -1732,10 +1417,6 @@ public Builder mergeFrom(
if (other
== com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult
.getDefaultInstance()) return this;
- if (!other.getRecognitionResult().isEmpty()) {
- recognitionResult_ = other.recognitionResult_;
- onChanged();
- }
switch (other.getResultCase()) {
case TEXT_TRANSLATION_RESULT:
{
@@ -2058,127 +1739,6 @@ public Builder clearTextTranslationResult() {
return textTranslationResultBuilder_;
}
- private java.lang.Object recognitionResult_ = "";
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return The recognitionResult.
- */
- public java.lang.String getRecognitionResult() {
- java.lang.Object ref = recognitionResult_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- recognitionResult_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return The bytes for recognitionResult.
- */
- public com.google.protobuf.ByteString getRecognitionResultBytes() {
- java.lang.Object ref = recognitionResult_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- recognitionResult_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @param value The recognitionResult to set.
- * @return This builder for chaining.
- */
- public Builder setRecognitionResult(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- recognitionResult_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return This builder for chaining.
- */
- public Builder clearRecognitionResult() {
-
- recognitionResult_ = getDefaultInstance().getRecognitionResult();
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @param value The bytes for recognitionResult to set.
- * @return This builder for chaining.
- */
- public Builder setRecognitionResultBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- recognitionResult_ = value;
- onChanged();
- return this;
- }
-
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/StreamingTranslateSpeechResultOrBuilder.java b/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/StreamingTranslateSpeechResultOrBuilder.java
index 4805e77c..38d67812 100644
--- a/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/StreamingTranslateSpeechResultOrBuilder.java
+++ b/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/StreamingTranslateSpeechResultOrBuilder.java
@@ -67,37 +67,6 @@ public interface StreamingTranslateSpeechResultOrBuilder
.TextTranslationResultOrBuilder
getTextTranslationResultOrBuilder();
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return The recognitionResult.
- */
- java.lang.String getRecognitionResult();
- /**
- *
- *
- * - * Output only. The debug only recognition result in original language. This field is debug - * only and will be set to empty string if not available. - * This is implementation detail and will not be backward compatible. - * Still need to decide whether to expose this field by default. - *- * - *
string recognition_result = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- * @return The bytes for recognitionResult.
- */
- com.google.protobuf.ByteString getRecognitionResultBytes();
-
public com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.ResultCase
getResultCase();
}
diff --git a/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfig.java b/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfig.java
index c1f486be..1e99cd77 100644
--- a/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfig.java
+++ b/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfig.java
@@ -41,7 +41,6 @@ private TranslateSpeechConfig(com.google.protobuf.GeneratedMessageV3.Builder>
private TranslateSpeechConfig() {
audioEncoding_ = "";
sourceLanguageCode_ = "";
- alternativeSourceLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
targetLanguageCode_ = "";
model_ = "";
}
@@ -65,7 +64,6 @@ private TranslateSpeechConfig(
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
- int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -109,16 +107,6 @@ private TranslateSpeechConfig(
model_ = s;
break;
}
- case 50:
- {
- java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- alternativeSourceLanguageCodes_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- alternativeSourceLanguageCodes_.add(s);
- break;
- }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -133,9 +121,6 @@ private TranslateSpeechConfig(
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- alternativeSourceLanguageCodes_ = alternativeSourceLanguageCodes_.getUnmodifiableView();
- }
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
@@ -166,6 +151,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -192,6 +195,24 @@ public java.lang.String getAudioEncoding() {
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -260,95 +281,6 @@ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
}
}
- public static final int ALTERNATIVE_SOURCE_LANGUAGE_CODES_FIELD_NUMBER = 6;
- private com.google.protobuf.LazyStringList alternativeSourceLanguageCodes_;
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return A list containing the alternativeSourceLanguageCodes.
- */
- public com.google.protobuf.ProtocolStringList getAlternativeSourceLanguageCodesList() {
- return alternativeSourceLanguageCodes_;
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return The count of alternativeSourceLanguageCodes.
- */
- public int getAlternativeSourceLanguageCodesCount() {
- return alternativeSourceLanguageCodes_.size();
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index of the element to return.
- * @return The alternativeSourceLanguageCodes at the given index.
- */
- public java.lang.String getAlternativeSourceLanguageCodes(int index) {
- return alternativeSourceLanguageCodes_.get(index);
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index of the value to return.
- * @return The bytes of the alternativeSourceLanguageCodes at the given index.
- */
- public com.google.protobuf.ByteString getAlternativeSourceLanguageCodesBytes(int index) {
- return alternativeSourceLanguageCodes_.getByteString(index);
- }
-
public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 3;
private volatile java.lang.Object targetLanguageCode_;
/**
@@ -407,8 +339,7 @@ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() {
* Optional. Sample rate in Hertz of the audio data. Valid values are:
* 8000-48000. 16000 is optimal. For best results, set the sampling rate of
* the audio source to 16000 Hz. If that's not possible, use the native sample
- * rate of the audio source (instead of re-sampling). This field can only be
- * omitted for `FLAC` and `WAV` audio files.
+ * rate of the audio source (instead of re-sampling).
*
*
* int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -426,7 +357,9 @@ public int getSampleRateHertz() {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -449,7 +382,9 @@ public java.lang.String getModel() {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -498,10 +433,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!getModelBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, model_);
}
- for (int i = 0; i < alternativeSourceLanguageCodes_.size(); i++) {
- com.google.protobuf.GeneratedMessageV3.writeString(
- output, 6, alternativeSourceLanguageCodes_.getRaw(i));
- }
unknownFields.writeTo(output);
}
@@ -526,14 +457,6 @@ public int getSerializedSize() {
if (!getModelBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, model_);
}
- {
- int dataSize = 0;
- for (int i = 0; i < alternativeSourceLanguageCodes_.size(); i++) {
- dataSize += computeStringSizeNoTag(alternativeSourceLanguageCodes_.getRaw(i));
- }
- size += dataSize;
- size += 1 * getAlternativeSourceLanguageCodesList().size();
- }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -552,8 +475,6 @@ public boolean equals(final java.lang.Object obj) {
if (!getAudioEncoding().equals(other.getAudioEncoding())) return false;
if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false;
- if (!getAlternativeSourceLanguageCodesList()
- .equals(other.getAlternativeSourceLanguageCodesList())) return false;
if (!getTargetLanguageCode().equals(other.getTargetLanguageCode())) return false;
if (getSampleRateHertz() != other.getSampleRateHertz()) return false;
if (!getModel().equals(other.getModel())) return false;
@@ -572,10 +493,6 @@ public int hashCode() {
hash = (53 * hash) + getAudioEncoding().hashCode();
hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getSourceLanguageCode().hashCode();
- if (getAlternativeSourceLanguageCodesCount() > 0) {
- hash = (37 * hash) + ALTERNATIVE_SOURCE_LANGUAGE_CODES_FIELD_NUMBER;
- hash = (53 * hash) + getAlternativeSourceLanguageCodesList().hashCode();
- }
hash = (37 * hash) + TARGET_LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getTargetLanguageCode().hashCode();
hash = (37 * hash) + SAMPLE_RATE_HERTZ_FIELD_NUMBER;
@@ -733,8 +650,6 @@ public Builder clear() {
sourceLanguageCode_ = "";
- alternativeSourceLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
targetLanguageCode_ = "";
sampleRateHertz_ = 0;
@@ -769,14 +684,8 @@ public com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig build() {
public com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig buildPartial() {
com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig result =
new com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig(this);
- int from_bitField0_ = bitField0_;
result.audioEncoding_ = audioEncoding_;
result.sourceLanguageCode_ = sourceLanguageCode_;
- if (((bitField0_ & 0x00000001) != 0)) {
- alternativeSourceLanguageCodes_ = alternativeSourceLanguageCodes_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.alternativeSourceLanguageCodes_ = alternativeSourceLanguageCodes_;
result.targetLanguageCode_ = targetLanguageCode_;
result.sampleRateHertz_ = sampleRateHertz_;
result.model_ = model_;
@@ -840,16 +749,6 @@ public Builder mergeFrom(
sourceLanguageCode_ = other.sourceLanguageCode_;
onChanged();
}
- if (!other.alternativeSourceLanguageCodes_.isEmpty()) {
- if (alternativeSourceLanguageCodes_.isEmpty()) {
- alternativeSourceLanguageCodes_ = other.alternativeSourceLanguageCodes_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureAlternativeSourceLanguageCodesIsMutable();
- alternativeSourceLanguageCodes_.addAll(other.alternativeSourceLanguageCodes_);
- }
- onChanged();
- }
if (!other.getTargetLanguageCode().isEmpty()) {
targetLanguageCode_ = other.targetLanguageCode_;
onChanged();
@@ -892,8 +791,6 @@ public Builder mergeFrom(
return this;
}
- private int bitField0_;
-
private java.lang.Object audioEncoding_ = "";
/**
*
@@ -903,6 +800,24 @@ public Builder mergeFrom(
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -928,6 +843,24 @@ public java.lang.String getAudioEncoding() {
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -953,6 +886,24 @@ public com.google.protobuf.ByteString getAudioEncodingBytes() {
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -977,6 +928,24 @@ public Builder setAudioEncoding(java.lang.String value) {
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -997,6 +966,24 @@ public Builder clearAudioEncoding() {
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -1121,240 +1108,6 @@ public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value)
return this;
}
- private com.google.protobuf.LazyStringList alternativeSourceLanguageCodes_ =
- com.google.protobuf.LazyStringArrayList.EMPTY;
-
- private void ensureAlternativeSourceLanguageCodesIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- alternativeSourceLanguageCodes_ =
- new com.google.protobuf.LazyStringArrayList(alternativeSourceLanguageCodes_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return A list containing the alternativeSourceLanguageCodes.
- */
- public com.google.protobuf.ProtocolStringList getAlternativeSourceLanguageCodesList() {
- return alternativeSourceLanguageCodes_.getUnmodifiableView();
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return The count of alternativeSourceLanguageCodes.
- */
- public int getAlternativeSourceLanguageCodesCount() {
- return alternativeSourceLanguageCodes_.size();
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index of the element to return.
- * @return The alternativeSourceLanguageCodes at the given index.
- */
- public java.lang.String getAlternativeSourceLanguageCodes(int index) {
- return alternativeSourceLanguageCodes_.get(index);
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index of the value to return.
- * @return The bytes of the alternativeSourceLanguageCodes at the given index.
- */
- public com.google.protobuf.ByteString getAlternativeSourceLanguageCodesBytes(int index) {
- return alternativeSourceLanguageCodes_.getByteString(index);
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index to set the value at.
- * @param value The alternativeSourceLanguageCodes to set.
- * @return This builder for chaining.
- */
- public Builder setAlternativeSourceLanguageCodes(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureAlternativeSourceLanguageCodesIsMutable();
- alternativeSourceLanguageCodes_.set(index, value);
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param value The alternativeSourceLanguageCodes to add.
- * @return This builder for chaining.
- */
- public Builder addAlternativeSourceLanguageCodes(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureAlternativeSourceLanguageCodesIsMutable();
- alternativeSourceLanguageCodes_.add(value);
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param values The alternativeSourceLanguageCodes to add.
- * @return This builder for chaining.
- */
- public Builder addAllAlternativeSourceLanguageCodes(
- java.lang.Iterable- * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return This builder for chaining.
- */
- public Builder clearAlternativeSourceLanguageCodes() {
- alternativeSourceLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param value The bytes of the alternativeSourceLanguageCodes to add.
- * @return This builder for chaining.
- */
- public Builder addAlternativeSourceLanguageCodesBytes(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- ensureAlternativeSourceLanguageCodesIsMutable();
- alternativeSourceLanguageCodes_.add(value);
- onChanged();
- return this;
- }
-
private java.lang.Object targetLanguageCode_ = "";
/**
*
@@ -1469,8 +1222,7 @@ public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value)
* Optional. Sample rate in Hertz of the audio data. Valid values are:
* 8000-48000. 16000 is optimal. For best results, set the sampling rate of
* the audio source to 16000 Hz. If that's not possible, use the native sample
- * rate of the audio source (instead of re-sampling). This field can only be
- * omitted for `FLAC` and `WAV` audio files.
+ * rate of the audio source (instead of re-sampling).
*
*
* int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -1488,8 +1240,7 @@ public int getSampleRateHertz() {
* Optional. Sample rate in Hertz of the audio data. Valid values are:
* 8000-48000. 16000 is optimal. For best results, set the sampling rate of
* the audio source to 16000 Hz. If that's not possible, use the native sample
- * rate of the audio source (instead of re-sampling). This field can only be
- * omitted for `FLAC` and `WAV` audio files.
+ * rate of the audio source (instead of re-sampling).
*
*
* int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -1510,8 +1261,7 @@ public Builder setSampleRateHertz(int value) {
* Optional. Sample rate in Hertz of the audio data. Valid values are:
* 8000-48000. 16000 is optimal. For best results, set the sampling rate of
* the audio source to 16000 Hz. If that's not possible, use the native sample
- * rate of the audio source (instead of re-sampling). This field can only be
- * omitted for `FLAC` and `WAV` audio files.
+ * rate of the audio source (instead of re-sampling).
*
*
* int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -1530,7 +1280,9 @@ public Builder clearSampleRateHertz() {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1552,7 +1304,9 @@ public java.lang.String getModel() {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1574,7 +1328,9 @@ public com.google.protobuf.ByteString getModelBytes() {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1595,7 +1351,9 @@ public Builder setModel(java.lang.String value) {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1612,7 +1370,9 @@ public Builder clearModel() {
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
diff --git a/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfigOrBuilder.java b/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfigOrBuilder.java
index 0fbd2283..4e5ee7be 100644
--- a/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfigOrBuilder.java
+++ b/proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/TranslateSpeechConfigOrBuilder.java
@@ -31,6 +31,24 @@ public interface TranslateSpeechConfigOrBuilder
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -46,6 +64,24 @@ public interface TranslateSpeechConfigOrBuilder
* Supported formats:
* - `linear16`
* Uncompressed 16-bit signed little-endian samples (Linear PCM).
+ * - `flac`
+ * `flac` (Free Lossless Audio Codec) is the recommended encoding
+ * because it is lossless--therefore recognition is not compromised--and
+ * requires only about half the bandwidth of `linear16`.
+ * - `mulaw`
+ * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ * - `amr`
+ * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ * - `amr-wb`
+ * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ * - `ogg-opus`
+ * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ * or 48000.
+ * - `mp3`
+ * MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ * kbps). When using this encoding, `sample_rate_hertz` has to match the
+ * sample rate of the file being used.
*
*
* string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -79,85 +115,6 @@ public interface TranslateSpeechConfigOrBuilder
*/
com.google.protobuf.ByteString getSourceLanguageCodeBytes();
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return A list containing the alternativeSourceLanguageCodes.
- */
- java.util.List- * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @return The count of alternativeSourceLanguageCodes.
- */
- int getAlternativeSourceLanguageCodesCount();
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index of the element to return.
- * @return The alternativeSourceLanguageCodes at the given index.
- */
- java.lang.String getAlternativeSourceLanguageCodes(int index);
- /**
- *
- *
- * - * Optional. A list of up to 3 additional language codes (BCP-47), listing possible - * alternative languages of the supplied audio. If alternative source - * languages are listed, speech translation result will translate in the most - * likely language detected including the main source_language_code. The - * translated result will include the language code of the language detected - * in the audio. - *- * - *
- * repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
- *
- *
- * @param index The index of the value to return.
- * @return The bytes of the alternativeSourceLanguageCodes at the given index.
- */
- com.google.protobuf.ByteString getAlternativeSourceLanguageCodesBytes(int index);
-
/**
*
*
@@ -190,8 +147,7 @@ public interface TranslateSpeechConfigOrBuilder
* Optional. Sample rate in Hertz of the audio data. Valid values are:
* 8000-48000. 16000 is optimal. For best results, set the sampling rate of
* the audio source to 16000 Hz. If that's not possible, use the native sample
- * rate of the audio source (instead of re-sampling). This field can only be
- * omitted for `FLAC` and `WAV` audio files.
+ * rate of the audio source (instead of re-sampling).
*
*
* int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];
@@ -204,7 +160,9 @@ public interface TranslateSpeechConfigOrBuilder
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -216,7 +174,9 @@ public interface TranslateSpeechConfigOrBuilder
*
*
* - * Optional. + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. ** *
string model = 5 [(.google.api.field_behavior) = OPTIONAL];
diff --git a/proto-google-cloud-mediatranslation-v1beta1/src/main/proto/google/cloud/mediatranslation/v1beta1/media_translation.proto b/proto-google-cloud-mediatranslation-v1beta1/src/main/proto/google/cloud/mediatranslation/v1beta1/media_translation.proto
index 88eed82a..88c86d09 100644
--- a/proto-google-cloud-mediatranslation-v1beta1/src/main/proto/google/cloud/mediatranslation/v1beta1/media_translation.proto
+++ b/proto-google-cloud-mediatranslation-v1beta1/src/main/proto/google/cloud/mediatranslation/v1beta1/media_translation.proto
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -50,31 +50,52 @@ message TranslateSpeechConfig {
//
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
//
+ // - `flac`
//
+ // `flac` (Free Lossless Audio Codec) is the recommended encoding
+ // because it is lossless--therefore recognition is not compromised--and
+ // requires only about half the bandwidth of `linear16`.
+ //
+ // - `mulaw`
+ //
+ // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
+ //
+ // - `amr`
+ //
+ // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
+ //
+ // - `amr-wb`
+ //
+ // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
+ //
+ // - `ogg-opus`
+ //
+ // Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg)
+ // container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000,
+ // or 48000.
+ //
+ // - `mp3`
+ //
+ // MP3 audio. Support all standard MP3 bitrates (which range from 32-320
+ // kbps). When using this encoding, `sample_rate_hertz` has to match the
+ // sample rate of the file being used.
string audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(google.api.field_behavior) = REQUIRED];
- // Optional. A list of up to 3 additional language codes (BCP-47), listing possible
- // alternative languages of the supplied audio. If alternative source
- // languages are listed, speech translation result will translate in the most
- // likely language detected including the main source_language_code. The
- // translated result will include the language code of the language detected
- // in the audio.
- repeated string alternative_source_language_codes = 6 [(google.api.field_behavior) = OPTIONAL];
-
// Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(google.api.field_behavior) = REQUIRED];
// Optional. Sample rate in Hertz of the audio data. Valid values are:
// 8000-48000. 16000 is optimal. For best results, set the sampling rate of
// the audio source to 16000 Hz. If that's not possible, use the native sample
- // rate of the audio source (instead of re-sampling). This field can only be
- // omitted for `FLAC` and `WAV` audio files.
+ // rate of the audio source (instead of re-sampling).
int32 sample_rate_hertz = 4 [(google.api.field_behavior) = OPTIONAL];
- // Optional.
+ // Optional. `google-provided-model/video` and
+ // `google-provided-model/enhanced-phone-call` are premium models.
+ // `google-provided-model/phone-call` is not premium model.
string model = 5 [(google.api.field_behavior) = OPTIONAL];
}
@@ -140,27 +161,13 @@ message StreamingTranslateSpeechResult {
// return any further hypotheses for this portion of the transcript and
// corresponding audio.
bool is_final = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
-
- // Output only. The source language code (BCP-47) detected in the audio. Speech
- // translation result will translate in the most likely language detected
- // including the alternative source languages and main source_language_code.
- string detected_source_language_code = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Translation result.
- //
- // Use oneof field to reserve for future tts result.
oneof result {
// Text translation result.
TextTranslationResult text_translation_result = 1;
}
-
- // Output only. The debug only recognition result in original language. This field is debug
- // only and will be set to empty string if not available.
- // This is implementation detail and will not be backward compatible.
- //
- // Still need to decide whether to expose this field by default.
- string recognition_result = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// A streaming speech translation response corresponding to a portion of
diff --git a/synth.metadata b/synth.metadata
index 42e58f7b..5c35222f 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-mediatranslation.git",
- "sha": "d37c0aa2d7bb67c665bcdb9d83a0e1aa0d159dbe"
+ "sha": "3401f033b8f754b708607291ab4f7a523259ffa2"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "1305ca41d554eb0725237561e34129373bb8cbc1",
- "internalRef": "362856902"
+ "sha": "1d163315aecf9d8a3b77eb9e1549a0b353103b32",
+ "internalRef": "370757154"
}
},
{