diff --git a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/package-info.java b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/package-info.java index 295d13246..3ff5d1384 100644 --- a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/package-info.java +++ b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/package-info.java @@ -15,7 +15,9 @@ */ /** - * The interfaces provided are listed below, along with usage samples. + * A client to Cloud Speech-to-Text API + * + *
The interfaces provided are listed below, along with usage samples. * *
======================= SpeechClient ======================= * diff --git a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/AdaptationClient.java b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/AdaptationClient.java index b6866ada1..27b168075 100644 --- a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/AdaptationClient.java +++ b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/AdaptationClient.java @@ -167,7 +167,11 @@ public AdaptationStub getStub() { * } * * @param parent Required. The parent resource where this phrase set will be created. Format: - * {api_version}/projects/{project}/locations/{location}/phraseSets + *
`projects/{project}/locations/{location}/phraseSets` + *
Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` + * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` + * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints) + * with matching `us` or `eu` location value. * @param phraseSet Required. The phrase set to create. * @param phraseSetId Required. The ID to use for the phrase set, which will become the final * component of the phrase set's resource name. @@ -203,7 +207,11 @@ public final PhraseSet createPhraseSet( * } * * @param parent Required. The parent resource where this phrase set will be created. Format: - * {api_version}/projects/{project}/locations/{location}/phraseSets + *
`projects/{project}/locations/{location}/phraseSets` + *
Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @param phraseSet Required. The phrase set to create.
* @param phraseSetId Required. The ID to use for the phrase set, which will become the final
* component of the phrase set's resource name.
@@ -287,7 +295,11 @@ public final UnaryCallable `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final PhraseSet getPhraseSet(PhraseSetName name) {
@@ -310,7 +322,11 @@ public final PhraseSet getPhraseSet(PhraseSetName name) {
* }
*
* @param name Required. The name of the phrase set to retrieve. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final PhraseSet getPhraseSet(String name) {
@@ -379,7 +395,11 @@ public final UnaryCallable `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListPhraseSetPagedResponse listPhraseSet(LocationName parent) {
@@ -406,7 +426,11 @@ public final ListPhraseSetPagedResponse listPhraseSet(LocationName parent) {
* }
*
* @param parent Required. The parent, which owns this collection of phrase set. Format:
- * projects/{project}/locations/{location}
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListPhraseSetPagedResponse listPhraseSet(String parent) {
@@ -518,7 +542,11 @@ public final UnaryCallable The phrase set's `name` field is used to identify the set to be updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @param updateMask The list of fields to be updated.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -592,7 +620,7 @@ public final UnaryCallable `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deletePhraseSet(PhraseSetName name) {
@@ -615,7 +643,7 @@ public final void deletePhraseSet(PhraseSetName name) {
* }
*
* @param name Required. The name of the phrase set to delete. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deletePhraseSet(String name) {
@@ -684,7 +712,11 @@ public final UnaryCallable `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @param customClass Required. The custom class to create.
* @param customClassId Required. The ID to use for the custom class, which will become the final
* component of the custom class' resource name.
@@ -718,7 +750,11 @@ public final CustomClass createCustomClass(
* }
*
* @param parent Required. The parent resource where this custom class will be created. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @param customClass Required. The custom class to create.
* @param customClassId Required. The ID to use for the custom class, which will become the final
* component of the custom class' resource name.
@@ -800,7 +836,7 @@ public final UnaryCallable `projects/{project}/locations/{location}/customClasses/{custom_class}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final CustomClass getCustomClass(CustomClassName name) {
@@ -823,7 +859,7 @@ public final CustomClass getCustomClass(CustomClassName name) {
* }
*
* @param name Required. The name of the custom class to retrieve. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final CustomClass getCustomClass(String name) {
@@ -892,7 +928,11 @@ public final UnaryCallable `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListCustomClassesPagedResponse listCustomClasses(LocationName parent) {
@@ -919,7 +959,11 @@ public final ListCustomClassesPagedResponse listCustomClasses(LocationName paren
* }
*
* @param parent Required. The parent, which owns this collection of custom classes. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListCustomClassesPagedResponse listCustomClasses(String parent) {
@@ -1034,7 +1078,12 @@ public final ListCustomClassesPagedResponse listCustomClasses(ListCustomClassesR
*
* @param customClass Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be updated.
- * Format: {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @param updateMask The list of fields to be updated.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -1109,7 +1158,11 @@ public final UnaryCallable `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteCustomClass(CustomClassName name) {
@@ -1134,7 +1187,11 @@ public final void deleteCustomClass(CustomClassName name) {
* }
*
* @param name Required. The name of the custom class to delete. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu`
+ * (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global`
+ * location. To specify a region, use a [regional endpoint](/speech-to-text/docs/endpoints)
+ * with matching `us` or `eu` location value.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteCustomClass(String name) {
diff --git a/google-cloud-speech/src/test/java/com/google/cloud/speech/v1/SpeechClientTest.java b/google-cloud-speech/src/test/java/com/google/cloud/speech/v1/SpeechClientTest.java
index d22b17977..e51c52020 100644
--- a/google-cloud-speech/src/test/java/com/google/cloud/speech/v1/SpeechClientTest.java
+++ b/google-cloud-speech/src/test/java/com/google/cloud/speech/v1/SpeechClientTest.java
@@ -133,6 +133,8 @@ public void longRunningRecognizeTest() throws Exception {
LongRunningRecognizeResponse.newBuilder()
.addAllResults(new ArrayList
+ * A set of words or phrases that represents a common concept likely to appear
+ * in your audio, for example a list of passenger ship names. CustomClass items
+ * can be substituted into placeholders that you set in PhraseSet phrases.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.CustomClass}
+ */
+public final class CustomClass extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.CustomClass)
+ CustomClassOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use CustomClass.newBuilder() to construct.
+ private CustomClass(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private CustomClass() {
+ name_ = "";
+ customClassId_ = "";
+ items_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new CustomClass();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private CustomClass(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ customClassId_ = s;
+ break;
+ }
+ case 26:
+ {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ items_ =
+ new java.util.ArrayList
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The value.
+ */
+ java.lang.String getValue();
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ com.google.protobuf.ByteString getValueBytes();
+ }
+ /**
+ *
+ *
+ *
+ * An item of the class.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.CustomClass.ClassItem}
+ */
+ public static final class ClassItem extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.CustomClass.ClassItem)
+ ClassItemOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use ClassItem.newBuilder() to construct.
+ private ClassItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ClassItem() {
+ value_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new ClassItem();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private ClassItem(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ value_ = s;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.speech.v1.SpeechResourceProto
+ .internal_static_google_cloud_speech_v1_CustomClass_ClassItem_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.speech.v1.SpeechResourceProto
+ .internal_static_google_cloud_speech_v1_CustomClass_ClassItem_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.speech.v1.CustomClass.ClassItem.class,
+ com.google.cloud.speech.v1.CustomClass.ClassItem.Builder.class);
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 1;
+ private volatile java.lang.Object value_;
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The value.
+ */
+ @java.lang.Override
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ 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();
+ value_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.speech.v1.CustomClass.ClassItem)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.speech.v1.CustomClass.ClassItem other =
+ (com.google.cloud.speech.v1.CustomClass.ClassItem) obj;
+
+ if (!getValue().equals(other.getValue())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValue().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.speech.v1.CustomClass.ClassItem prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * An item of the class.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.CustomClass.ClassItem}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The value.
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ value_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ public com.google.protobuf.ByteString getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ value_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+
+ value_ = getDefaultInstance().getValue();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The class item's value.
+ *
+ *
+ * string value = 1;
+ *
+ * @param value The bytes for value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValueBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ value_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1.CustomClass.ClassItem)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.CustomClass.ClassItem)
+ private static final com.google.cloud.speech.v1.CustomClass.ClassItem DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.speech.v1.CustomClass.ClassItem();
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass.ClassItem getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ 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();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CUSTOM_CLASS_ID_FIELD_NUMBER = 2;
+ private volatile java.lang.Object customClassId_;
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return The customClassId.
+ */
+ @java.lang.Override
+ public java.lang.String getCustomClassId() {
+ java.lang.Object ref = customClassId_;
+ 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();
+ customClassId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return The bytes for customClassId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getCustomClassIdBytes() {
+ java.lang.Object ref = customClassId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ customClassId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ITEMS_FIELD_NUMBER = 3;
+ private java.util.List
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ @java.lang.Override
+ public java.util.List
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.speech.v1.CustomClass.ClassItemOrBuilder>
+ getItemsOrBuilderList() {
+ return items_;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ @java.lang.Override
+ public int getItemsCount() {
+ return items_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.CustomClass.ClassItem getItems(int index) {
+ return items_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.CustomClass.ClassItemOrBuilder getItemsOrBuilder(int index) {
+ return items_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customClassId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customClassId_);
+ }
+ for (int i = 0; i < items_.size(); i++) {
+ output.writeMessage(3, items_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customClassId_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customClassId_);
+ }
+ for (int i = 0; i < items_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, items_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.speech.v1.CustomClass)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.speech.v1.CustomClass other = (com.google.cloud.speech.v1.CustomClass) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getCustomClassId().equals(other.getCustomClassId())) return false;
+ if (!getItemsList().equals(other.getItemsList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + CUSTOM_CLASS_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getCustomClassId().hashCode();
+ if (getItemsCount() > 0) {
+ hash = (37 * hash) + ITEMS_FIELD_NUMBER;
+ hash = (53 * hash) + getItemsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.CustomClass parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.speech.v1.CustomClass prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * A set of words or phrases that represents a common concept likely to appear
+ * in your audio, for example a list of passenger ship names. CustomClass items
+ * can be substituted into placeholders that you set in PhraseSet phrases.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.CustomClass}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object customClassId_ = "";
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return The customClassId.
+ */
+ public java.lang.String getCustomClassId() {
+ java.lang.Object ref = customClassId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ customClassId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return The bytes for customClassId.
+ */
+ public com.google.protobuf.ByteString getCustomClassIdBytes() {
+ java.lang.Object ref = customClassId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ customClassId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @param value The customClassId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCustomClassId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ customClassId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearCustomClassId() {
+
+ customClassId_ = getDefaultInstance().getCustomClassId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @param value The bytes for customClassId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCustomClassIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ customClassId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public java.util.List
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public int getItemsCount() {
+ if (itemsBuilder_ == null) {
+ return items_.size();
+ } else {
+ return itemsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.ClassItem getItems(int index) {
+ if (itemsBuilder_ == null) {
+ return items_.get(index);
+ } else {
+ return itemsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder setItems(int index, com.google.cloud.speech.v1.CustomClass.ClassItem value) {
+ if (itemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.set(index, value);
+ onChanged();
+ } else {
+ itemsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder setItems(
+ int index, com.google.cloud.speech.v1.CustomClass.ClassItem.Builder builderForValue) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ itemsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder addItems(com.google.cloud.speech.v1.CustomClass.ClassItem value) {
+ if (itemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.add(value);
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder addItems(int index, com.google.cloud.speech.v1.CustomClass.ClassItem value) {
+ if (itemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.add(index, value);
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder addItems(
+ com.google.cloud.speech.v1.CustomClass.ClassItem.Builder builderForValue) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.add(builderForValue.build());
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder addItems(
+ int index, com.google.cloud.speech.v1.CustomClass.ClassItem.Builder builderForValue) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder addAllItems(
+ java.lang.Iterable extends com.google.cloud.speech.v1.CustomClass.ClassItem> values) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_);
+ onChanged();
+ } else {
+ itemsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder clearItems() {
+ if (itemsBuilder_ == null) {
+ items_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ itemsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public Builder removeItems(int index) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.remove(index);
+ onChanged();
+ } else {
+ itemsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.ClassItem.Builder getItemsBuilder(int index) {
+ return getItemsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.ClassItemOrBuilder getItemsOrBuilder(int index) {
+ if (itemsBuilder_ == null) {
+ return items_.get(index);
+ } else {
+ return itemsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public java.util.List extends com.google.cloud.speech.v1.CustomClass.ClassItemOrBuilder>
+ getItemsOrBuilderList() {
+ if (itemsBuilder_ != null) {
+ return itemsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(items_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.ClassItem.Builder addItemsBuilder() {
+ return getItemsFieldBuilder()
+ .addBuilder(com.google.cloud.speech.v1.CustomClass.ClassItem.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.ClassItem.Builder addItemsBuilder(int index) {
+ return getItemsFieldBuilder()
+ .addBuilder(index, com.google.cloud.speech.v1.CustomClass.ClassItem.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ public java.util.List
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * The resource name of the custom class.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return The customClassId.
+ */
+ java.lang.String getCustomClassId();
+ /**
+ *
+ *
+ *
+ * If this custom class is a resource, the custom_class_id is the resource id
+ * of the CustomClass. Case sensitive.
+ *
+ *
+ * string custom_class_id = 2;
+ *
+ * @return The bytes for customClassId.
+ */
+ com.google.protobuf.ByteString getCustomClassIdBytes();
+
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ java.util.List
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ com.google.cloud.speech.v1.CustomClass.ClassItem getItems(int index);
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ int getItemsCount();
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ java.util.List extends com.google.cloud.speech.v1.CustomClass.ClassItemOrBuilder>
+ getItemsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * A collection of class items.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
+ */
+ com.google.cloud.speech.v1.CustomClass.ClassItemOrBuilder getItemsOrBuilder(int index);
+}
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponse.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponse.java
index 7666b9149..9ab646c0c 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponse.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponse.java
@@ -101,6 +101,37 @@ private LongRunningRecognizeResponse(
totalBilledTime_ = subBuilder.buildPartial();
}
+ break;
+ }
+ case 50:
+ {
+ com.google.cloud.speech.v1.TranscriptOutputConfig.Builder subBuilder = null;
+ if (outputConfig_ != null) {
+ subBuilder = outputConfig_.toBuilder();
+ }
+ outputConfig_ =
+ input.readMessage(
+ com.google.cloud.speech.v1.TranscriptOutputConfig.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(outputConfig_);
+ outputConfig_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 58:
+ {
+ com.google.rpc.Status.Builder subBuilder = null;
+ if (outputError_ != null) {
+ subBuilder = outputError_.toBuilder();
+ }
+ outputError_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(outputError_);
+ outputError_ = subBuilder.buildPartial();
+ }
+
break;
}
default:
@@ -263,6 +294,100 @@ public com.google.protobuf.DurationOrBuilder getTotalBilledTimeOrBuilder() {
return getTotalBilledTime();
}
+ public static final int OUTPUT_CONFIG_FIELD_NUMBER = 6;
+ private com.google.cloud.speech.v1.TranscriptOutputConfig outputConfig_;
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputConfig() {
+ return outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ *
+ * @return The outputConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.TranscriptOutputConfig getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.speech.v1.TranscriptOutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.TranscriptOutputConfigOrBuilder getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ public static final int OUTPUT_ERROR_FIELD_NUMBER = 7;
+ private com.google.rpc.Status outputError_;
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ *
+ * @return Whether the outputError field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputError() {
+ return outputError_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ *
+ * @return The outputError.
+ */
+ @java.lang.Override
+ public com.google.rpc.Status getOutputError() {
+ return outputError_ == null ? com.google.rpc.Status.getDefaultInstance() : outputError_;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ @java.lang.Override
+ public com.google.rpc.StatusOrBuilder getOutputErrorOrBuilder() {
+ return getOutputError();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -283,6 +408,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (totalBilledTime_ != null) {
output.writeMessage(3, getTotalBilledTime());
}
+ if (outputConfig_ != null) {
+ output.writeMessage(6, getOutputConfig());
+ }
+ if (outputError_ != null) {
+ output.writeMessage(7, getOutputError());
+ }
unknownFields.writeTo(output);
}
@@ -298,6 +429,12 @@ public int getSerializedSize() {
if (totalBilledTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTotalBilledTime());
}
+ if (outputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOutputConfig());
+ }
+ if (outputError_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getOutputError());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -319,6 +456,14 @@ public boolean equals(final java.lang.Object obj) {
if (hasTotalBilledTime()) {
if (!getTotalBilledTime().equals(other.getTotalBilledTime())) return false;
}
+ if (hasOutputConfig() != other.hasOutputConfig()) return false;
+ if (hasOutputConfig()) {
+ if (!getOutputConfig().equals(other.getOutputConfig())) return false;
+ }
+ if (hasOutputError() != other.hasOutputError()) return false;
+ if (hasOutputError()) {
+ if (!getOutputError().equals(other.getOutputError())) return false;
+ }
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -338,6 +483,14 @@ public int hashCode() {
hash = (37 * hash) + TOTAL_BILLED_TIME_FIELD_NUMBER;
hash = (53 * hash) + getTotalBilledTime().hashCode();
}
+ if (hasOutputConfig()) {
+ hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputConfig().hashCode();
+ }
+ if (hasOutputError()) {
+ hash = (37 * hash) + OUTPUT_ERROR_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputError().hashCode();
+ }
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -502,6 +655,18 @@ public Builder clear() {
totalBilledTime_ = null;
totalBilledTimeBuilder_ = null;
}
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+ if (outputErrorBuilder_ == null) {
+ outputError_ = null;
+ } else {
+ outputError_ = null;
+ outputErrorBuilder_ = null;
+ }
return this;
}
@@ -544,6 +709,16 @@ public com.google.cloud.speech.v1.LongRunningRecognizeResponse buildPartial() {
} else {
result.totalBilledTime_ = totalBilledTimeBuilder_.build();
}
+ if (outputConfigBuilder_ == null) {
+ result.outputConfig_ = outputConfig_;
+ } else {
+ result.outputConfig_ = outputConfigBuilder_.build();
+ }
+ if (outputErrorBuilder_ == null) {
+ result.outputError_ = outputError_;
+ } else {
+ result.outputError_ = outputErrorBuilder_.build();
+ }
onBuilt();
return result;
}
@@ -624,6 +799,12 @@ public Builder mergeFrom(com.google.cloud.speech.v1.LongRunningRecognizeResponse
if (other.hasTotalBilledTime()) {
mergeTotalBilledTime(other.getTotalBilledTime());
}
+ if (other.hasOutputConfig()) {
+ mergeOutputConfig(other.getOutputConfig());
+ }
+ if (other.hasOutputError()) {
+ mergeOutputError(other.getOutputError());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1212,6 +1393,367 @@ public com.google.protobuf.DurationOrBuilder getTotalBilledTimeOrBuilder() {
return totalBilledTimeBuilder_;
}
+ private com.google.cloud.speech.v1.TranscriptOutputConfig outputConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.speech.v1.TranscriptOutputConfig,
+ com.google.cloud.speech.v1.TranscriptOutputConfig.Builder,
+ com.google.cloud.speech.v1.TranscriptOutputConfigOrBuilder>
+ outputConfigBuilder_;
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ public boolean hasOutputConfig() {
+ return outputConfigBuilder_ != null || outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ *
+ * @return The outputConfig.
+ */
+ public com.google.cloud.speech.v1.TranscriptOutputConfig getOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ return outputConfig_ == null
+ ? com.google.cloud.speech.v1.TranscriptOutputConfig.getDefaultInstance()
+ : outputConfig_;
+ } else {
+ return outputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ public Builder setOutputConfig(com.google.cloud.speech.v1.TranscriptOutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputConfig_ = value;
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.speech.v1.TranscriptOutputConfig.Builder builderForValue) {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ public Builder mergeOutputConfig(com.google.cloud.speech.v1.TranscriptOutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (outputConfig_ != null) {
+ outputConfig_ =
+ com.google.cloud.speech.v1.TranscriptOutputConfig.newBuilder(outputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ outputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ outputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ public Builder clearOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ onChanged();
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ public com.google.cloud.speech.v1.TranscriptOutputConfig.Builder getOutputConfigBuilder() {
+
+ onChanged();
+ return getOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ public com.google.cloud.speech.v1.TranscriptOutputConfigOrBuilder getOutputConfigOrBuilder() {
+ if (outputConfigBuilder_ != null) {
+ return outputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return outputConfig_ == null
+ ? com.google.cloud.speech.v1.TranscriptOutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.speech.v1.TranscriptOutputConfig,
+ com.google.cloud.speech.v1.TranscriptOutputConfig.Builder,
+ com.google.cloud.speech.v1.TranscriptOutputConfigOrBuilder>
+ getOutputConfigFieldBuilder() {
+ if (outputConfigBuilder_ == null) {
+ outputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.speech.v1.TranscriptOutputConfig,
+ com.google.cloud.speech.v1.TranscriptOutputConfig.Builder,
+ com.google.cloud.speech.v1.TranscriptOutputConfigOrBuilder>(
+ getOutputConfig(), getParentForChildren(), isClean());
+ outputConfig_ = null;
+ }
+ return outputConfigBuilder_;
+ }
+
+ private com.google.rpc.Status outputError_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ outputErrorBuilder_;
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ *
+ * @return Whether the outputError field is set.
+ */
+ public boolean hasOutputError() {
+ return outputErrorBuilder_ != null || outputError_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ *
+ * @return The outputError.
+ */
+ public com.google.rpc.Status getOutputError() {
+ if (outputErrorBuilder_ == null) {
+ return outputError_ == null ? com.google.rpc.Status.getDefaultInstance() : outputError_;
+ } else {
+ return outputErrorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ public Builder setOutputError(com.google.rpc.Status value) {
+ if (outputErrorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputError_ = value;
+ onChanged();
+ } else {
+ outputErrorBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ public Builder setOutputError(com.google.rpc.Status.Builder builderForValue) {
+ if (outputErrorBuilder_ == null) {
+ outputError_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputErrorBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ public Builder mergeOutputError(com.google.rpc.Status value) {
+ if (outputErrorBuilder_ == null) {
+ if (outputError_ != null) {
+ outputError_ =
+ com.google.rpc.Status.newBuilder(outputError_).mergeFrom(value).buildPartial();
+ } else {
+ outputError_ = value;
+ }
+ onChanged();
+ } else {
+ outputErrorBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ public Builder clearOutputError() {
+ if (outputErrorBuilder_ == null) {
+ outputError_ = null;
+ onChanged();
+ } else {
+ outputError_ = null;
+ outputErrorBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ public com.google.rpc.Status.Builder getOutputErrorBuilder() {
+
+ onChanged();
+ return getOutputErrorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ public com.google.rpc.StatusOrBuilder getOutputErrorOrBuilder() {
+ if (outputErrorBuilder_ != null) {
+ return outputErrorBuilder_.getMessageOrBuilder();
+ } else {
+ return outputError_ == null ? com.google.rpc.Status.getDefaultInstance() : outputError_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ getOutputErrorFieldBuilder() {
+ if (outputErrorBuilder_ == null) {
+ outputErrorBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status,
+ com.google.rpc.Status.Builder,
+ com.google.rpc.StatusOrBuilder>(
+ getOutputError(), getParentForChildren(), isClean());
+ outputError_ = null;
+ }
+ return outputErrorBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponseOrBuilder.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponseOrBuilder.java
index 125eddb24..5078fa81a 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponseOrBuilder.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/LongRunningRecognizeResponseOrBuilder.java
@@ -114,4 +114,74 @@ public interface LongRunningRecognizeResponseOrBuilder
* .google.protobuf.Duration total_billed_time = 3;
*/
com.google.protobuf.DurationOrBuilder getTotalBilledTimeOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ boolean hasOutputConfig();
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ *
+ * @return The outputConfig.
+ */
+ com.google.cloud.speech.v1.TranscriptOutputConfig getOutputConfig();
+ /**
+ *
+ *
+ *
+ * Original output config if present in the request.
+ *
+ *
+ * .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
+ */
+ com.google.cloud.speech.v1.TranscriptOutputConfigOrBuilder getOutputConfigOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ *
+ * @return Whether the outputError field is set.
+ */
+ boolean hasOutputError();
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ *
+ * @return The outputError.
+ */
+ com.google.rpc.Status getOutputError();
+ /**
+ *
+ *
+ *
+ * If the transcript output fails this field contains the relevant error.
+ *
+ *
+ * .google.rpc.Status output_error = 7;
+ */
+ com.google.rpc.StatusOrBuilder getOutputErrorOrBuilder();
}
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/PhraseSet.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/PhraseSet.java
new file mode 100644
index 000000000..9789fd000
--- /dev/null
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/PhraseSet.java
@@ -0,0 +1,2086 @@
+/*
+ * 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/speech/v1/resource.proto
+
+package com.google.cloud.speech.v1;
+
+/**
+ *
+ *
+ *
+ * Provides "hints" to the speech recognizer to favor specific words and phrases
+ * in the results.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.PhraseSet}
+ */
+public final class PhraseSet extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.PhraseSet)
+ PhraseSetOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use PhraseSet.newBuilder() to construct.
+ private PhraseSet(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private PhraseSet() {
+ name_ = "";
+ phrases_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new PhraseSet();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private PhraseSet(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 18:
+ {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ phrases_ = new java.util.ArrayList
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The value.
+ */
+ java.lang.String getValue();
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ com.google.protobuf.ByteString getValueBytes();
+
+ /**
+ *
+ *
+ *
+ * Hint Boost. Overrides the boost set at the phrase set level.
+ * Positive value will increase the probability that a specific phrase will
+ * be recognized over other similar sounding phrases. The higher the boost,
+ * the higher the chance of false positive recognition as well. Negative
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
+ * with values between 0 and 20. We recommend using a binary search approach
+ * to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 2;
+ *
+ * @return The boost.
+ */
+ float getBoost();
+ }
+ /**
+ *
+ *
+ *
+ * A phrases containing words and phrase "hints" so that
+ * the speech recognition is more likely to recognize them. This can be used
+ * to improve the accuracy for specific words and phrases, for example, if
+ * specific commands are typically spoken by the user. This can also be used
+ * to add additional words to the vocabulary of the recognizer. See
+ * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
+ * List items can also include pre-built or custom classes containing groups
+ * of words that represent common concepts that occur in natural language. For
+ * example, rather than providing a phrase hint for every month of the
+ * year (e.g. "i was born in january", "i was born in febuary", ...), use the
+ * pre-built `$MONTH` class improves the likelihood of correctly transcribing
+ * audio that includes months (e.g. "i was born in $month").
+ * To refer to pre-built classes, use the class' symbol prepended with `$`
+ * e.g. `$MONTH`. To refer to custom classes that were defined inline in the
+ * request, set the class's `custom_class_id` to a string unique to all class
+ * resources and inline classes. Then use the class' id wrapped in $`{...}`
+ * e.g. "${my-months}". To refer to custom classes resources, use the class'
+ * id wrapped in `${}` (e.g. `${my-months}`).
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.PhraseSet.Phrase}
+ */
+ public static final class Phrase extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.PhraseSet.Phrase)
+ PhraseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use Phrase.newBuilder() to construct.
+ private Phrase(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Phrase() {
+ value_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new Phrase();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private Phrase(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ value_ = s;
+ break;
+ }
+ case 21:
+ {
+ boost_ = input.readFloat();
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.speech.v1.SpeechResourceProto
+ .internal_static_google_cloud_speech_v1_PhraseSet_Phrase_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.speech.v1.SpeechResourceProto
+ .internal_static_google_cloud_speech_v1_PhraseSet_Phrase_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.speech.v1.PhraseSet.Phrase.class,
+ com.google.cloud.speech.v1.PhraseSet.Phrase.Builder.class);
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 1;
+ private volatile java.lang.Object value_;
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The value.
+ */
+ @java.lang.Override
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ 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();
+ value_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int BOOST_FIELD_NUMBER = 2;
+ private float boost_;
+ /**
+ *
+ *
+ *
+ * Hint Boost. Overrides the boost set at the phrase set level.
+ * Positive value will increase the probability that a specific phrase will
+ * be recognized over other similar sounding phrases. The higher the boost,
+ * the higher the chance of false positive recognition as well. Negative
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
+ * with values between 0 and 20. We recommend using a binary search approach
+ * to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 2;
+ *
+ * @return The boost.
+ */
+ @java.lang.Override
+ public float getBoost() {
+ return boost_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
+ }
+ if (boost_ != 0F) {
+ output.writeFloat(2, boost_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
+ }
+ if (boost_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.speech.v1.PhraseSet.Phrase)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.speech.v1.PhraseSet.Phrase other =
+ (com.google.cloud.speech.v1.PhraseSet.Phrase) obj;
+
+ if (!getValue().equals(other.getValue())) return false;
+ if (java.lang.Float.floatToIntBits(getBoost())
+ != java.lang.Float.floatToIntBits(other.getBoost())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValue().hashCode();
+ hash = (37 * hash) + BOOST_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.speech.v1.PhraseSet.Phrase prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * A phrases containing words and phrase "hints" so that
+ * the speech recognition is more likely to recognize them. This can be used
+ * to improve the accuracy for specific words and phrases, for example, if
+ * specific commands are typically spoken by the user. This can also be used
+ * to add additional words to the vocabulary of the recognizer. See
+ * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
+ * List items can also include pre-built or custom classes containing groups
+ * of words that represent common concepts that occur in natural language. For
+ * example, rather than providing a phrase hint for every month of the
+ * year (e.g. "i was born in january", "i was born in febuary", ...), use the
+ * pre-built `$MONTH` class improves the likelihood of correctly transcribing
+ * audio that includes months (e.g. "i was born in $month").
+ * To refer to pre-built classes, use the class' symbol prepended with `$`
+ * e.g. `$MONTH`. To refer to custom classes that were defined inline in the
+ * request, set the class's `custom_class_id` to a string unique to all class
+ * resources and inline classes. Then use the class' id wrapped in $`{...}`
+ * e.g. "${my-months}". To refer to custom classes resources, use the class'
+ * id wrapped in `${}` (e.g. `${my-months}`).
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.PhraseSet.Phrase}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The value.
+ */
+ public java.lang.String getValue() {
+ java.lang.Object ref = value_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ value_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return The bytes for value.
+ */
+ public com.google.protobuf.ByteString getValueBytes() {
+ java.lang.Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ value_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+
+ value_ = getDefaultInstance().getValue();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The phrase itself.
+ *
+ *
+ * string value = 1;
+ *
+ * @param value The bytes for value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValueBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ value_ = value;
+ onChanged();
+ return this;
+ }
+
+ private float boost_;
+ /**
+ *
+ *
+ *
+ * Hint Boost. Overrides the boost set at the phrase set level.
+ * Positive value will increase the probability that a specific phrase will
+ * be recognized over other similar sounding phrases. The higher the boost,
+ * the higher the chance of false positive recognition as well. Negative
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
+ * with values between 0 and 20. We recommend using a binary search approach
+ * to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 2;
+ *
+ * @return The boost.
+ */
+ @java.lang.Override
+ public float getBoost() {
+ return boost_;
+ }
+ /**
+ *
+ *
+ *
+ * Hint Boost. Overrides the boost set at the phrase set level.
+ * Positive value will increase the probability that a specific phrase will
+ * be recognized over other similar sounding phrases. The higher the boost,
+ * the higher the chance of false positive recognition as well. Negative
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
+ * with values between 0 and 20. We recommend using a binary search approach
+ * to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 2;
+ *
+ * @param value The boost to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBoost(float value) {
+
+ boost_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Hint Boost. Overrides the boost set at the phrase set level.
+ * Positive value will increase the probability that a specific phrase will
+ * be recognized over other similar sounding phrases. The higher the boost,
+ * the higher the chance of false positive recognition as well. Negative
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
+ * with values between 0 and 20. We recommend using a binary search approach
+ * to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearBoost() {
+
+ boost_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1.PhraseSet.Phrase)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.PhraseSet.Phrase)
+ private static final com.google.cloud.speech.v1.PhraseSet.Phrase DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.speech.v1.PhraseSet.Phrase();
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet.Phrase getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ 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();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PHRASES_FIELD_NUMBER = 2;
+ private java.util.List
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ @java.lang.Override
+ public java.util.List
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder>
+ getPhrasesOrBuilderList() {
+ return phrases_;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ @java.lang.Override
+ public int getPhrasesCount() {
+ return phrases_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.PhraseSet.Phrase getPhrases(int index) {
+ return phrases_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index) {
+ return phrases_.get(index);
+ }
+
+ public static final int BOOST_FIELD_NUMBER = 4;
+ private float boost_;
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 (exclusive) and 20. We recommend using a binary search
+ * approach to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return The boost.
+ */
+ @java.lang.Override
+ public float getBoost() {
+ return boost_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ for (int i = 0; i < phrases_.size(); i++) {
+ output.writeMessage(2, phrases_.get(i));
+ }
+ if (boost_ != 0F) {
+ output.writeFloat(4, boost_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ for (int i = 0; i < phrases_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, phrases_.get(i));
+ }
+ if (boost_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, boost_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.speech.v1.PhraseSet)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.speech.v1.PhraseSet other = (com.google.cloud.speech.v1.PhraseSet) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getPhrasesList().equals(other.getPhrasesList())) return false;
+ if (java.lang.Float.floatToIntBits(getBoost())
+ != java.lang.Float.floatToIntBits(other.getBoost())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (getPhrasesCount() > 0) {
+ hash = (37 * hash) + PHRASES_FIELD_NUMBER;
+ hash = (53 * hash) + getPhrasesList().hashCode();
+ }
+ hash = (37 * hash) + BOOST_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.speech.v1.PhraseSet prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Provides "hints" to the speech recognizer to favor specific words and phrases
+ * in the results.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.PhraseSet}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public java.util.List
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public int getPhrasesCount() {
+ if (phrasesBuilder_ == null) {
+ return phrases_.size();
+ } else {
+ return phrasesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Phrase getPhrases(int index) {
+ if (phrasesBuilder_ == null) {
+ return phrases_.get(index);
+ } else {
+ return phrasesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder setPhrases(int index, com.google.cloud.speech.v1.PhraseSet.Phrase value) {
+ if (phrasesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhrasesIsMutable();
+ phrases_.set(index, value);
+ onChanged();
+ } else {
+ phrasesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder setPhrases(
+ int index, com.google.cloud.speech.v1.PhraseSet.Phrase.Builder builderForValue) {
+ if (phrasesBuilder_ == null) {
+ ensurePhrasesIsMutable();
+ phrases_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ phrasesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder addPhrases(com.google.cloud.speech.v1.PhraseSet.Phrase value) {
+ if (phrasesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhrasesIsMutable();
+ phrases_.add(value);
+ onChanged();
+ } else {
+ phrasesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder addPhrases(int index, com.google.cloud.speech.v1.PhraseSet.Phrase value) {
+ if (phrasesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhrasesIsMutable();
+ phrases_.add(index, value);
+ onChanged();
+ } else {
+ phrasesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder addPhrases(com.google.cloud.speech.v1.PhraseSet.Phrase.Builder builderForValue) {
+ if (phrasesBuilder_ == null) {
+ ensurePhrasesIsMutable();
+ phrases_.add(builderForValue.build());
+ onChanged();
+ } else {
+ phrasesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder addPhrases(
+ int index, com.google.cloud.speech.v1.PhraseSet.Phrase.Builder builderForValue) {
+ if (phrasesBuilder_ == null) {
+ ensurePhrasesIsMutable();
+ phrases_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ phrasesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder addAllPhrases(
+ java.lang.Iterable extends com.google.cloud.speech.v1.PhraseSet.Phrase> values) {
+ if (phrasesBuilder_ == null) {
+ ensurePhrasesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phrases_);
+ onChanged();
+ } else {
+ phrasesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder clearPhrases() {
+ if (phrasesBuilder_ == null) {
+ phrases_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ phrasesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public Builder removePhrases(int index) {
+ if (phrasesBuilder_ == null) {
+ ensurePhrasesIsMutable();
+ phrases_.remove(index);
+ onChanged();
+ } else {
+ phrasesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Phrase.Builder getPhrasesBuilder(int index) {
+ return getPhrasesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index) {
+ if (phrasesBuilder_ == null) {
+ return phrases_.get(index);
+ } else {
+ return phrasesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public java.util.List extends com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder>
+ getPhrasesOrBuilderList() {
+ if (phrasesBuilder_ != null) {
+ return phrasesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(phrases_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Phrase.Builder addPhrasesBuilder() {
+ return getPhrasesFieldBuilder()
+ .addBuilder(com.google.cloud.speech.v1.PhraseSet.Phrase.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Phrase.Builder addPhrasesBuilder(int index) {
+ return getPhrasesFieldBuilder()
+ .addBuilder(index, com.google.cloud.speech.v1.PhraseSet.Phrase.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ public java.util.List
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 (exclusive) and 20. We recommend using a binary search
+ * approach to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return The boost.
+ */
+ @java.lang.Override
+ public float getBoost() {
+ return boost_;
+ }
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 (exclusive) and 20. We recommend using a binary search
+ * approach to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 4;
+ *
+ * @param value The boost to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBoost(float value) {
+
+ boost_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 (exclusive) and 20. We recommend using a binary search
+ * approach to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearBoost() {
+
+ boost_ = 0F;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1.PhraseSet)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.PhraseSet)
+ private static final com.google.cloud.speech.v1.PhraseSet DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.speech.v1.PhraseSet();
+ }
+
+ public static com.google.cloud.speech.v1.PhraseSet getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ *
+ * The resource name of the phrase set.
+ *
+ *
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ java.util.List
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ com.google.cloud.speech.v1.PhraseSet.Phrase getPhrases(int index);
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ int getPhrasesCount();
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ java.util.List extends com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder>
+ getPhrasesOrBuilderList();
+ /**
+ *
+ *
+ *
+ * A list of word and phrases.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
+ */
+ com.google.cloud.speech.v1.PhraseSet.PhraseOrBuilder getPhrasesOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 (exclusive) and 20. We recommend using a binary search
+ * approach to finding the optimal value for your use case. Speech recognition
+ * will skip PhraseSets with a boost value of 0.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return The boost.
+ */
+ float getBoost();
+}
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfig.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfig.java
index 1e417f9b1..7ebbfe32e 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfig.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfig.java
@@ -41,6 +41,7 @@ private RecognitionConfig(com.google.protobuf.GeneratedMessageV3.Builder> buil
private RecognitionConfig() {
encoding_ = 0;
languageCode_ = "";
+ alternativeLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
speechContexts_ = java.util.Collections.emptyList();
model_ = "";
}
@@ -106,10 +107,10 @@ private RecognitionConfig(
}
case 50:
{
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
speechContexts_ =
new java.util.ArrayListSPEEX_WITH_HEADER_BYTE = 7;
*/
SPEEX_WITH_HEADER_BYTE(7),
+ /**
+ *
+ *
+ *
+ * Opus encoded audio frames in WebM container
+ * ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
+ * one of 8000, 12000, 16000, 24000, or 48000.
+ *
+ *
+ * WEBM_OPUS = 9;
+ */
+ WEBM_OPUS(9),
UNRECOGNIZED(-1),
;
@@ -447,6 +525,18 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
* SPEEX_WITH_HEADER_BYTE = 7;
*/
public static final int SPEEX_WITH_HEADER_BYTE_VALUE = 7;
+ /**
+ *
+ *
+ *
+ * Opus encoded audio frames in WebM container
+ * ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
+ * one of 8000, 12000, 16000, 24000, or 48000.
+ *
+ *
+ * WEBM_OPUS = 9;
+ */
+ public static final int WEBM_OPUS_VALUE = 9;
public final int getNumber() {
if (this == UNRECOGNIZED) {
@@ -488,6 +578,8 @@ public static AudioEncoding forNumber(int value) {
return OGG_OPUS;
case 7:
return SPEEX_WITH_HEADER_BYTE;
+ case 9:
+ return WEBM_OPUS;
default:
return null;
}
@@ -715,6 +807,111 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() {
}
}
+ public static final int ALTERNATIVE_LANGUAGE_CODES_FIELD_NUMBER = 18;
+ private com.google.protobuf.LazyStringList alternativeLanguageCodes_;
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return A list containing the alternativeLanguageCodes.
+ */
+ public com.google.protobuf.ProtocolStringList getAlternativeLanguageCodesList() {
+ return alternativeLanguageCodes_;
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return The count of alternativeLanguageCodes.
+ */
+ public int getAlternativeLanguageCodesCount() {
+ return alternativeLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index of the element to return.
+ * @return The alternativeLanguageCodes at the given index.
+ */
+ public java.lang.String getAlternativeLanguageCodes(int index) {
+ return alternativeLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the alternativeLanguageCodes at the given index.
+ */
+ public com.google.protobuf.ByteString getAlternativeLanguageCodesBytes(int index) {
+ return alternativeLanguageCodes_.getByteString(index);
+ }
+
public static final int MAX_ALTERNATIVES_FIELD_NUMBER = 4;
private int maxAlternatives_;
/**
@@ -759,6 +956,66 @@ public boolean getProfanityFilter() {
return profanityFilter_;
}
+ public static final int ADAPTATION_FIELD_NUMBER = 20;
+ private com.google.cloud.speech.v1.SpeechAdaptation adaptation_;
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ *
+ * @return Whether the adaptation field is set.
+ */
+ @java.lang.Override
+ public boolean hasAdaptation() {
+ return adaptation_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ *
+ * @return The adaptation.
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.SpeechAdaptation getAdaptation() {
+ return adaptation_ == null
+ ? com.google.cloud.speech.v1.SpeechAdaptation.getDefaultInstance()
+ : adaptation_;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.SpeechAdaptationOrBuilder getAdaptationOrBuilder() {
+ return getAdaptation();
+ }
+
public static final int SPEECH_CONTEXTS_FIELD_NUMBER = 6;
private java.util.List
+ * If `true`, the top result includes a list of words and the
+ * confidence for those words. If `false`, no word-level confidence
+ * information is returned. The default is `false`.
+ *
+ *
+ * bool enable_word_confidence = 15;
+ *
+ * @return The enableWordConfidence.
+ */
+ @java.lang.Override
+ public boolean getEnableWordConfidence() {
+ return enableWordConfidence_;
+ }
+
public static final int ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER = 11;
private boolean enableAutomaticPunctuation_;
/**
@@ -890,6 +1167,132 @@ public boolean getEnableAutomaticPunctuation() {
return enableAutomaticPunctuation_;
}
+ public static final int ENABLE_SPOKEN_PUNCTUATION_FIELD_NUMBER = 22;
+ private com.google.protobuf.BoolValue enableSpokenPunctuation_;
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ *
+ * @return Whether the enableSpokenPunctuation field is set.
+ */
+ @java.lang.Override
+ public boolean hasEnableSpokenPunctuation() {
+ return enableSpokenPunctuation_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ *
+ * @return The enableSpokenPunctuation.
+ */
+ @java.lang.Override
+ public com.google.protobuf.BoolValue getEnableSpokenPunctuation() {
+ return enableSpokenPunctuation_ == null
+ ? com.google.protobuf.BoolValue.getDefaultInstance()
+ : enableSpokenPunctuation_;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ @java.lang.Override
+ public com.google.protobuf.BoolValueOrBuilder getEnableSpokenPunctuationOrBuilder() {
+ return getEnableSpokenPunctuation();
+ }
+
+ public static final int ENABLE_SPOKEN_EMOJIS_FIELD_NUMBER = 23;
+ private com.google.protobuf.BoolValue enableSpokenEmojis_;
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ *
+ * @return Whether the enableSpokenEmojis field is set.
+ */
+ @java.lang.Override
+ public boolean hasEnableSpokenEmojis() {
+ return enableSpokenEmojis_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ *
+ * @return The enableSpokenEmojis.
+ */
+ @java.lang.Override
+ public com.google.protobuf.BoolValue getEnableSpokenEmojis() {
+ return enableSpokenEmojis_ == null
+ ? com.google.protobuf.BoolValue.getDefaultInstance()
+ : enableSpokenEmojis_;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ @java.lang.Override
+ public com.google.protobuf.BoolValueOrBuilder getEnableSpokenEmojisOrBuilder() {
+ return getEnableSpokenEmojis();
+ }
+
public static final int DIARIZATION_CONFIG_FIELD_NUMBER = 19;
private com.google.cloud.speech.v1.SpeakerDiarizationConfig diarizationConfig_;
/**
@@ -1198,9 +1601,25 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (useEnhanced_ != false) {
output.writeBool(14, useEnhanced_);
}
+ if (enableWordConfidence_ != false) {
+ output.writeBool(15, enableWordConfidence_);
+ }
+ for (int i = 0; i < alternativeLanguageCodes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(
+ output, 18, alternativeLanguageCodes_.getRaw(i));
+ }
if (diarizationConfig_ != null) {
output.writeMessage(19, getDiarizationConfig());
}
+ if (adaptation_ != null) {
+ output.writeMessage(20, getAdaptation());
+ }
+ if (enableSpokenPunctuation_ != null) {
+ output.writeMessage(22, getEnableSpokenPunctuation());
+ }
+ if (enableSpokenEmojis_ != null) {
+ output.writeMessage(23, getEnableSpokenEmojis());
+ }
unknownFields.writeTo(output);
}
@@ -1254,9 +1673,31 @@ public int getSerializedSize() {
if (useEnhanced_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, useEnhanced_);
}
+ if (enableWordConfidence_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, enableWordConfidence_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < alternativeLanguageCodes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(alternativeLanguageCodes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 2 * getAlternativeLanguageCodesList().size();
+ }
if (diarizationConfig_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getDiarizationConfig());
}
+ if (adaptation_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getAdaptation());
+ }
+ if (enableSpokenPunctuation_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 22, getEnableSpokenPunctuation());
+ }
+ if (enableSpokenEmojis_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getEnableSpokenEmojis());
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -1279,11 +1720,26 @@ public boolean equals(final java.lang.Object obj) {
if (getEnableSeparateRecognitionPerChannel() != other.getEnableSeparateRecognitionPerChannel())
return false;
if (!getLanguageCode().equals(other.getLanguageCode())) return false;
+ if (!getAlternativeLanguageCodesList().equals(other.getAlternativeLanguageCodesList()))
+ return false;
if (getMaxAlternatives() != other.getMaxAlternatives()) return false;
if (getProfanityFilter() != other.getProfanityFilter()) return false;
+ if (hasAdaptation() != other.hasAdaptation()) return false;
+ if (hasAdaptation()) {
+ if (!getAdaptation().equals(other.getAdaptation())) return false;
+ }
if (!getSpeechContextsList().equals(other.getSpeechContextsList())) return false;
if (getEnableWordTimeOffsets() != other.getEnableWordTimeOffsets()) return false;
+ if (getEnableWordConfidence() != other.getEnableWordConfidence()) return false;
if (getEnableAutomaticPunctuation() != other.getEnableAutomaticPunctuation()) return false;
+ if (hasEnableSpokenPunctuation() != other.hasEnableSpokenPunctuation()) return false;
+ if (hasEnableSpokenPunctuation()) {
+ if (!getEnableSpokenPunctuation().equals(other.getEnableSpokenPunctuation())) return false;
+ }
+ if (hasEnableSpokenEmojis() != other.hasEnableSpokenEmojis()) return false;
+ if (hasEnableSpokenEmojis()) {
+ if (!getEnableSpokenEmojis().equals(other.getEnableSpokenEmojis())) return false;
+ }
if (hasDiarizationConfig() != other.hasDiarizationConfig()) return false;
if (hasDiarizationConfig()) {
if (!getDiarizationConfig().equals(other.getDiarizationConfig())) return false;
@@ -1317,18 +1773,36 @@ public int hashCode() {
+ com.google.protobuf.Internal.hashBoolean(getEnableSeparateRecognitionPerChannel());
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
+ if (getAlternativeLanguageCodesCount() > 0) {
+ hash = (37 * hash) + ALTERNATIVE_LANGUAGE_CODES_FIELD_NUMBER;
+ hash = (53 * hash) + getAlternativeLanguageCodesList().hashCode();
+ }
hash = (37 * hash) + MAX_ALTERNATIVES_FIELD_NUMBER;
hash = (53 * hash) + getMaxAlternatives();
hash = (37 * hash) + PROFANITY_FILTER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getProfanityFilter());
+ if (hasAdaptation()) {
+ hash = (37 * hash) + ADAPTATION_FIELD_NUMBER;
+ hash = (53 * hash) + getAdaptation().hashCode();
+ }
if (getSpeechContextsCount() > 0) {
hash = (37 * hash) + SPEECH_CONTEXTS_FIELD_NUMBER;
hash = (53 * hash) + getSpeechContextsList().hashCode();
}
hash = (37 * hash) + ENABLE_WORD_TIME_OFFSETS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableWordTimeOffsets());
+ hash = (37 * hash) + ENABLE_WORD_CONFIDENCE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableWordConfidence());
hash = (37 * hash) + ENABLE_AUTOMATIC_PUNCTUATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableAutomaticPunctuation());
+ if (hasEnableSpokenPunctuation()) {
+ hash = (37 * hash) + ENABLE_SPOKEN_PUNCTUATION_FIELD_NUMBER;
+ hash = (53 * hash) + getEnableSpokenPunctuation().hashCode();
+ }
+ if (hasEnableSpokenEmojis()) {
+ hash = (37 * hash) + ENABLE_SPOKEN_EMOJIS_FIELD_NUMBER;
+ hash = (53 * hash) + getEnableSpokenEmojis().hashCode();
+ }
if (hasDiarizationConfig()) {
hash = (37 * hash) + DIARIZATION_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getDiarizationConfig().hashCode();
@@ -1499,20 +1973,42 @@ public Builder clear() {
languageCode_ = "";
+ alternativeLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
maxAlternatives_ = 0;
profanityFilter_ = false;
+ if (adaptationBuilder_ == null) {
+ adaptation_ = null;
+ } else {
+ adaptation_ = null;
+ adaptationBuilder_ = null;
+ }
if (speechContextsBuilder_ == null) {
speechContexts_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000002);
} else {
speechContextsBuilder_.clear();
}
enableWordTimeOffsets_ = false;
+ enableWordConfidence_ = false;
+
enableAutomaticPunctuation_ = false;
+ if (enableSpokenPunctuationBuilder_ == null) {
+ enableSpokenPunctuation_ = null;
+ } else {
+ enableSpokenPunctuation_ = null;
+ enableSpokenPunctuationBuilder_ = null;
+ }
+ if (enableSpokenEmojisBuilder_ == null) {
+ enableSpokenEmojis_ = null;
+ } else {
+ enableSpokenEmojis_ = null;
+ enableSpokenEmojisBuilder_ = null;
+ }
if (diarizationConfigBuilder_ == null) {
diarizationConfig_ = null;
} else {
@@ -1562,19 +2058,40 @@ public com.google.cloud.speech.v1.RecognitionConfig buildPartial() {
result.audioChannelCount_ = audioChannelCount_;
result.enableSeparateRecognitionPerChannel_ = enableSeparateRecognitionPerChannel_;
result.languageCode_ = languageCode_;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ alternativeLanguageCodes_ = alternativeLanguageCodes_.getUnmodifiableView();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.alternativeLanguageCodes_ = alternativeLanguageCodes_;
result.maxAlternatives_ = maxAlternatives_;
result.profanityFilter_ = profanityFilter_;
+ if (adaptationBuilder_ == null) {
+ result.adaptation_ = adaptation_;
+ } else {
+ result.adaptation_ = adaptationBuilder_.build();
+ }
if (speechContextsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
+ if (((bitField0_ & 0x00000002) != 0)) {
speechContexts_ = java.util.Collections.unmodifiableList(speechContexts_);
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000002);
}
result.speechContexts_ = speechContexts_;
} else {
result.speechContexts_ = speechContextsBuilder_.build();
}
result.enableWordTimeOffsets_ = enableWordTimeOffsets_;
+ result.enableWordConfidence_ = enableWordConfidence_;
result.enableAutomaticPunctuation_ = enableAutomaticPunctuation_;
+ if (enableSpokenPunctuationBuilder_ == null) {
+ result.enableSpokenPunctuation_ = enableSpokenPunctuation_;
+ } else {
+ result.enableSpokenPunctuation_ = enableSpokenPunctuationBuilder_.build();
+ }
+ if (enableSpokenEmojisBuilder_ == null) {
+ result.enableSpokenEmojis_ = enableSpokenEmojis_;
+ } else {
+ result.enableSpokenEmojis_ = enableSpokenEmojisBuilder_.build();
+ }
if (diarizationConfigBuilder_ == null) {
result.diarizationConfig_ = diarizationConfig_;
} else {
@@ -1652,17 +2169,30 @@ public Builder mergeFrom(com.google.cloud.speech.v1.RecognitionConfig other) {
languageCode_ = other.languageCode_;
onChanged();
}
+ if (!other.alternativeLanguageCodes_.isEmpty()) {
+ if (alternativeLanguageCodes_.isEmpty()) {
+ alternativeLanguageCodes_ = other.alternativeLanguageCodes_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureAlternativeLanguageCodesIsMutable();
+ alternativeLanguageCodes_.addAll(other.alternativeLanguageCodes_);
+ }
+ onChanged();
+ }
if (other.getMaxAlternatives() != 0) {
setMaxAlternatives(other.getMaxAlternatives());
}
if (other.getProfanityFilter() != false) {
setProfanityFilter(other.getProfanityFilter());
}
+ if (other.hasAdaptation()) {
+ mergeAdaptation(other.getAdaptation());
+ }
if (speechContextsBuilder_ == null) {
if (!other.speechContexts_.isEmpty()) {
if (speechContexts_.isEmpty()) {
speechContexts_ = other.speechContexts_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSpeechContextsIsMutable();
speechContexts_.addAll(other.speechContexts_);
@@ -1675,7 +2205,7 @@ public Builder mergeFrom(com.google.cloud.speech.v1.RecognitionConfig other) {
speechContextsBuilder_.dispose();
speechContextsBuilder_ = null;
speechContexts_ = other.speechContexts_;
- bitField0_ = (bitField0_ & ~0x00000001);
+ bitField0_ = (bitField0_ & ~0x00000002);
speechContextsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getSpeechContextsFieldBuilder()
@@ -1688,9 +2218,18 @@ public Builder mergeFrom(com.google.cloud.speech.v1.RecognitionConfig other) {
if (other.getEnableWordTimeOffsets() != false) {
setEnableWordTimeOffsets(other.getEnableWordTimeOffsets());
}
+ if (other.getEnableWordConfidence() != false) {
+ setEnableWordConfidence(other.getEnableWordConfidence());
+ }
if (other.getEnableAutomaticPunctuation() != false) {
setEnableAutomaticPunctuation(other.getEnableAutomaticPunctuation());
}
+ if (other.hasEnableSpokenPunctuation()) {
+ mergeEnableSpokenPunctuation(other.getEnableSpokenPunctuation());
+ }
+ if (other.hasEnableSpokenEmojis()) {
+ mergeEnableSpokenEmojis(other.getEnableSpokenEmojis());
+ }
if (other.hasDiarizationConfig()) {
mergeDiarizationConfig(other.getDiarizationConfig());
}
@@ -2182,18 +2721,286 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
return this;
}
- private int maxAlternatives_;
+ private com.google.protobuf.LazyStringList alternativeLanguageCodes_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureAlternativeLanguageCodesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ alternativeLanguageCodes_ =
+ new com.google.protobuf.LazyStringArrayList(alternativeLanguageCodes_);
+ bitField0_ |= 0x00000001;
+ }
+ }
/**
*
*
*
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return A list containing the alternativeLanguageCodes.
+ */
+ public com.google.protobuf.ProtocolStringList getAlternativeLanguageCodesList() {
+ return alternativeLanguageCodes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return The count of alternativeLanguageCodes.
+ */
+ public int getAlternativeLanguageCodesCount() {
+ return alternativeLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index of the element to return.
+ * @return The alternativeLanguageCodes at the given index.
+ */
+ public java.lang.String getAlternativeLanguageCodes(int index) {
+ return alternativeLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the alternativeLanguageCodes at the given index.
+ */
+ public com.google.protobuf.ByteString getAlternativeLanguageCodesBytes(int index) {
+ return alternativeLanguageCodes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index to set the value at.
+ * @param value The alternativeLanguageCodes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAlternativeLanguageCodes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAlternativeLanguageCodesIsMutable();
+ alternativeLanguageCodes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param value The alternativeLanguageCodes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAlternativeLanguageCodes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAlternativeLanguageCodesIsMutable();
+ alternativeLanguageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param values The alternativeLanguageCodes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAlternativeLanguageCodes(java.lang.Iterable
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAlternativeLanguageCodes() {
+ alternativeLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param value The bytes of the alternativeLanguageCodes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAlternativeLanguageCodesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAlternativeLanguageCodesIsMutable();
+ alternativeLanguageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private int maxAlternatives_;
+ /**
+ *
+ *
+ *
+ * Maximum number of recognition hypotheses to be returned.
+ * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
+ * within each `SpeechRecognitionResult`.
+ * The server may return fewer than `max_alternatives`.
+ * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
+ * one. If omitted, will return a maximum of one.
+ *
*
* int32 max_alternatives = 4;
*
@@ -2310,14 +3117,236 @@ public Builder clearProfanityFilter() {
return this;
}
+ private com.google.cloud.speech.v1.SpeechAdaptation adaptation_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.speech.v1.SpeechAdaptation,
+ com.google.cloud.speech.v1.SpeechAdaptation.Builder,
+ com.google.cloud.speech.v1.SpeechAdaptationOrBuilder>
+ adaptationBuilder_;
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ *
+ * @return Whether the adaptation field is set.
+ */
+ public boolean hasAdaptation() {
+ return adaptationBuilder_ != null || adaptation_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ *
+ * @return The adaptation.
+ */
+ public com.google.cloud.speech.v1.SpeechAdaptation getAdaptation() {
+ if (adaptationBuilder_ == null) {
+ return adaptation_ == null
+ ? com.google.cloud.speech.v1.SpeechAdaptation.getDefaultInstance()
+ : adaptation_;
+ } else {
+ return adaptationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ public Builder setAdaptation(com.google.cloud.speech.v1.SpeechAdaptation value) {
+ if (adaptationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ adaptation_ = value;
+ onChanged();
+ } else {
+ adaptationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ public Builder setAdaptation(
+ com.google.cloud.speech.v1.SpeechAdaptation.Builder builderForValue) {
+ if (adaptationBuilder_ == null) {
+ adaptation_ = builderForValue.build();
+ onChanged();
+ } else {
+ adaptationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ public Builder mergeAdaptation(com.google.cloud.speech.v1.SpeechAdaptation value) {
+ if (adaptationBuilder_ == null) {
+ if (adaptation_ != null) {
+ adaptation_ =
+ com.google.cloud.speech.v1.SpeechAdaptation.newBuilder(adaptation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ adaptation_ = value;
+ }
+ onChanged();
+ } else {
+ adaptationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ public Builder clearAdaptation() {
+ if (adaptationBuilder_ == null) {
+ adaptation_ = null;
+ onChanged();
+ } else {
+ adaptation_ = null;
+ adaptationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ public com.google.cloud.speech.v1.SpeechAdaptation.Builder getAdaptationBuilder() {
+
+ onChanged();
+ return getAdaptationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ public com.google.cloud.speech.v1.SpeechAdaptationOrBuilder getAdaptationOrBuilder() {
+ if (adaptationBuilder_ != null) {
+ return adaptationBuilder_.getMessageOrBuilder();
+ } else {
+ return adaptation_ == null
+ ? com.google.cloud.speech.v1.SpeechAdaptation.getDefaultInstance()
+ : adaptation_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.speech.v1.SpeechAdaptation,
+ com.google.cloud.speech.v1.SpeechAdaptation.Builder,
+ com.google.cloud.speech.v1.SpeechAdaptationOrBuilder>
+ getAdaptationFieldBuilder() {
+ if (adaptationBuilder_ == null) {
+ adaptationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.speech.v1.SpeechAdaptation,
+ com.google.cloud.speech.v1.SpeechAdaptation.Builder,
+ com.google.cloud.speech.v1.SpeechAdaptationOrBuilder>(
+ getAdaptation(), getParentForChildren(), isClean());
+ adaptation_ = null;
+ }
+ return adaptationBuilder_;
+ }
+
private java.util.List
+ * If `true`, the top result includes a list of words and the
+ * confidence for those words. If `false`, no word-level confidence
+ * information is returned. The default is `false`.
+ *
+ *
+ * bool enable_word_confidence = 15;
+ *
+ * @return The enableWordConfidence.
+ */
+ @java.lang.Override
+ public boolean getEnableWordConfidence() {
+ return enableWordConfidence_;
+ }
+ /**
+ *
+ *
+ *
+ * If `true`, the top result includes a list of words and the
+ * confidence for those words. If `false`, no word-level confidence
+ * information is returned. The default is `false`.
+ *
+ *
+ * bool enable_word_confidence = 15;
+ *
+ * @param value The enableWordConfidence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEnableWordConfidence(boolean value) {
+
+ enableWordConfidence_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If `true`, the top result includes a list of words and the
+ * confidence for those words. If `false`, no word-level confidence
+ * information is returned. The default is `false`.
+ *
+ *
+ * bool enable_word_confidence = 15;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEnableWordConfidence() {
+
+ enableWordConfidence_ = false;
+ onChanged();
+ return this;
+ }
+
private boolean enableAutomaticPunctuation_;
/**
*
@@ -2858,6 +3945,467 @@ public Builder clearEnableAutomaticPunctuation() {
return this;
}
+ private com.google.protobuf.BoolValue enableSpokenPunctuation_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.BoolValue,
+ com.google.protobuf.BoolValue.Builder,
+ com.google.protobuf.BoolValueOrBuilder>
+ enableSpokenPunctuationBuilder_;
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ *
+ * @return Whether the enableSpokenPunctuation field is set.
+ */
+ public boolean hasEnableSpokenPunctuation() {
+ return enableSpokenPunctuationBuilder_ != null || enableSpokenPunctuation_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ *
+ * @return The enableSpokenPunctuation.
+ */
+ public com.google.protobuf.BoolValue getEnableSpokenPunctuation() {
+ if (enableSpokenPunctuationBuilder_ == null) {
+ return enableSpokenPunctuation_ == null
+ ? com.google.protobuf.BoolValue.getDefaultInstance()
+ : enableSpokenPunctuation_;
+ } else {
+ return enableSpokenPunctuationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ public Builder setEnableSpokenPunctuation(com.google.protobuf.BoolValue value) {
+ if (enableSpokenPunctuationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ enableSpokenPunctuation_ = value;
+ onChanged();
+ } else {
+ enableSpokenPunctuationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ public Builder setEnableSpokenPunctuation(
+ com.google.protobuf.BoolValue.Builder builderForValue) {
+ if (enableSpokenPunctuationBuilder_ == null) {
+ enableSpokenPunctuation_ = builderForValue.build();
+ onChanged();
+ } else {
+ enableSpokenPunctuationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ public Builder mergeEnableSpokenPunctuation(com.google.protobuf.BoolValue value) {
+ if (enableSpokenPunctuationBuilder_ == null) {
+ if (enableSpokenPunctuation_ != null) {
+ enableSpokenPunctuation_ =
+ com.google.protobuf.BoolValue.newBuilder(enableSpokenPunctuation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ enableSpokenPunctuation_ = value;
+ }
+ onChanged();
+ } else {
+ enableSpokenPunctuationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ public Builder clearEnableSpokenPunctuation() {
+ if (enableSpokenPunctuationBuilder_ == null) {
+ enableSpokenPunctuation_ = null;
+ onChanged();
+ } else {
+ enableSpokenPunctuation_ = null;
+ enableSpokenPunctuationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ public com.google.protobuf.BoolValue.Builder getEnableSpokenPunctuationBuilder() {
+
+ onChanged();
+ return getEnableSpokenPunctuationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ public com.google.protobuf.BoolValueOrBuilder getEnableSpokenPunctuationOrBuilder() {
+ if (enableSpokenPunctuationBuilder_ != null) {
+ return enableSpokenPunctuationBuilder_.getMessageOrBuilder();
+ } else {
+ return enableSpokenPunctuation_ == null
+ ? com.google.protobuf.BoolValue.getDefaultInstance()
+ : enableSpokenPunctuation_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.BoolValue,
+ com.google.protobuf.BoolValue.Builder,
+ com.google.protobuf.BoolValueOrBuilder>
+ getEnableSpokenPunctuationFieldBuilder() {
+ if (enableSpokenPunctuationBuilder_ == null) {
+ enableSpokenPunctuationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.BoolValue,
+ com.google.protobuf.BoolValue.Builder,
+ com.google.protobuf.BoolValueOrBuilder>(
+ getEnableSpokenPunctuation(), getParentForChildren(), isClean());
+ enableSpokenPunctuation_ = null;
+ }
+ return enableSpokenPunctuationBuilder_;
+ }
+
+ private com.google.protobuf.BoolValue enableSpokenEmojis_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.BoolValue,
+ com.google.protobuf.BoolValue.Builder,
+ com.google.protobuf.BoolValueOrBuilder>
+ enableSpokenEmojisBuilder_;
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ *
+ * @return Whether the enableSpokenEmojis field is set.
+ */
+ public boolean hasEnableSpokenEmojis() {
+ return enableSpokenEmojisBuilder_ != null || enableSpokenEmojis_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ *
+ * @return The enableSpokenEmojis.
+ */
+ public com.google.protobuf.BoolValue getEnableSpokenEmojis() {
+ if (enableSpokenEmojisBuilder_ == null) {
+ return enableSpokenEmojis_ == null
+ ? com.google.protobuf.BoolValue.getDefaultInstance()
+ : enableSpokenEmojis_;
+ } else {
+ return enableSpokenEmojisBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ public Builder setEnableSpokenEmojis(com.google.protobuf.BoolValue value) {
+ if (enableSpokenEmojisBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ enableSpokenEmojis_ = value;
+ onChanged();
+ } else {
+ enableSpokenEmojisBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ public Builder setEnableSpokenEmojis(com.google.protobuf.BoolValue.Builder builderForValue) {
+ if (enableSpokenEmojisBuilder_ == null) {
+ enableSpokenEmojis_ = builderForValue.build();
+ onChanged();
+ } else {
+ enableSpokenEmojisBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ public Builder mergeEnableSpokenEmojis(com.google.protobuf.BoolValue value) {
+ if (enableSpokenEmojisBuilder_ == null) {
+ if (enableSpokenEmojis_ != null) {
+ enableSpokenEmojis_ =
+ com.google.protobuf.BoolValue.newBuilder(enableSpokenEmojis_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ enableSpokenEmojis_ = value;
+ }
+ onChanged();
+ } else {
+ enableSpokenEmojisBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ public Builder clearEnableSpokenEmojis() {
+ if (enableSpokenEmojisBuilder_ == null) {
+ enableSpokenEmojis_ = null;
+ onChanged();
+ } else {
+ enableSpokenEmojis_ = null;
+ enableSpokenEmojisBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ public com.google.protobuf.BoolValue.Builder getEnableSpokenEmojisBuilder() {
+
+ onChanged();
+ return getEnableSpokenEmojisFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ public com.google.protobuf.BoolValueOrBuilder getEnableSpokenEmojisOrBuilder() {
+ if (enableSpokenEmojisBuilder_ != null) {
+ return enableSpokenEmojisBuilder_.getMessageOrBuilder();
+ } else {
+ return enableSpokenEmojis_ == null
+ ? com.google.protobuf.BoolValue.getDefaultInstance()
+ : enableSpokenEmojis_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.BoolValue,
+ com.google.protobuf.BoolValue.Builder,
+ com.google.protobuf.BoolValueOrBuilder>
+ getEnableSpokenEmojisFieldBuilder() {
+ if (enableSpokenEmojisBuilder_ == null) {
+ enableSpokenEmojisBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.BoolValue,
+ com.google.protobuf.BoolValue.Builder,
+ com.google.protobuf.BoolValueOrBuilder>(
+ getEnableSpokenEmojis(), getParentForChildren(), isClean());
+ enableSpokenEmojis_ = null;
+ }
+ return enableSpokenEmojisBuilder_;
+ }
+
private com.google.cloud.speech.v1.SpeakerDiarizationConfig diarizationConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.speech.v1.SpeakerDiarizationConfig,
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfigOrBuilder.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfigOrBuilder.java
index 6e5c48e17..751985a74 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfigOrBuilder.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/RecognitionConfigOrBuilder.java
@@ -145,6 +145,101 @@ public interface RecognitionConfigOrBuilder
*/
com.google.protobuf.ByteString getLanguageCodeBytes();
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return A list containing the alternativeLanguageCodes.
+ */
+ java.util.List
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @return The count of alternativeLanguageCodes.
+ */
+ int getAlternativeLanguageCodesCount();
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index of the element to return.
+ * @return The alternativeLanguageCodes at the given index.
+ */
+ java.lang.String getAlternativeLanguageCodes(int index);
+ /**
+ *
+ *
+ *
+ * A list of up to 3 additional
+ * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ * listing possible alternative languages of the supplied audio.
+ * See [Language
+ * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ * of the currently supported language codes. If alternative languages are
+ * listed, recognition result will contain recognition in the most likely
+ * language detected including the main language_code. The recognition result
+ * will include the language tag of the language detected in the audio. Note:
+ * This feature is only supported for Voice Command and Voice Search use cases
+ * and performance may vary for other use cases (e.g., phone call
+ * transcription).
+ *
+ *
+ * repeated string alternative_language_codes = 18;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the alternativeLanguageCodes at the given index.
+ */
+ com.google.protobuf.ByteString getAlternativeLanguageCodesBytes(int index);
+
/**
*
*
@@ -179,6 +274,53 @@ public interface RecognitionConfigOrBuilder
*/
boolean getProfanityFilter();
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ *
+ * @return Whether the adaptation field is set.
+ */
+ boolean hasAdaptation();
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ *
+ * @return The adaptation.
+ */
+ com.google.cloud.speech.v1.SpeechAdaptation getAdaptation();
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration improves the accuracy of speech
+ * recognition. For more information, see the [speech
+ * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ * documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
+ *
+ *
+ * .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
+ */
+ com.google.cloud.speech.v1.SpeechAdaptationOrBuilder getAdaptationOrBuilder();
+
/**
*
*
@@ -267,6 +409,21 @@ public interface RecognitionConfigOrBuilder
*/
boolean getEnableWordTimeOffsets();
+ /**
+ *
+ *
+ *
+ * If `true`, the top result includes a list of words and the
+ * confidence for those words. If `false`, no word-level confidence
+ * information is returned. The default is `false`.
+ *
+ *
+ * bool enable_word_confidence = 15;
+ *
+ * @return The enableWordConfidence.
+ */
+ boolean getEnableWordConfidence();
+
/**
*
*
@@ -283,6 +440,106 @@ public interface RecognitionConfigOrBuilder
*/
boolean getEnableAutomaticPunctuation();
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ *
+ * @return Whether the enableSpokenPunctuation field is set.
+ */
+ boolean hasEnableSpokenPunctuation();
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ *
+ * @return The enableSpokenPunctuation.
+ */
+ com.google.protobuf.BoolValue getEnableSpokenPunctuation();
+ /**
+ *
+ *
+ *
+ * The spoken punctuation behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * e.g. command_and_search will enable spoken punctuation by default
+ * If 'true', replaces spoken punctuation with the corresponding symbols in
+ * the request. For example, "how are you question mark" becomes "how are
+ * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ * for support. If 'false', spoken punctuation is not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_punctuation = 22;
+ */
+ com.google.protobuf.BoolValueOrBuilder getEnableSpokenPunctuationOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ *
+ * @return Whether the enableSpokenEmojis field is set.
+ */
+ boolean hasEnableSpokenEmojis();
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ *
+ * @return The enableSpokenEmojis.
+ */
+ com.google.protobuf.BoolValue getEnableSpokenEmojis();
+ /**
+ *
+ *
+ *
+ * The spoken emoji behavior for the call
+ * If not set, uses default behavior based on model of choice
+ * If 'true', adds spoken emoji formatting for the request. This will replace
+ * spoken emojis with the corresponding Unicode symbols in the final
+ * transcript. If 'false', spoken emojis are not replaced.
+ *
+ *
+ * .google.protobuf.BoolValue enable_spoken_emojis = 23;
+ */
+ com.google.protobuf.BoolValueOrBuilder getEnableSpokenEmojisOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechAdaptation.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechAdaptation.java
new file mode 100644
index 000000000..106a91b7e
--- /dev/null
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechAdaptation.java
@@ -0,0 +1,1842 @@
+/*
+ * 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/speech/v1/resource.proto
+
+package com.google.cloud.speech.v1;
+
+/**
+ *
+ *
+ *
+ * Speech adaptation configuration.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.SpeechAdaptation}
+ */
+public final class SpeechAdaptation extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.SpeechAdaptation)
+ SpeechAdaptationOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use SpeechAdaptation.newBuilder() to construct.
+ private SpeechAdaptation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private SpeechAdaptation() {
+ phraseSets_ = java.util.Collections.emptyList();
+ phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ customClasses_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new SpeechAdaptation();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private SpeechAdaptation(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ phraseSets_ = new java.util.ArrayList
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ @java.lang.Override
+ public java.util.List
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.speech.v1.PhraseSetOrBuilder>
+ getPhraseSetsOrBuilderList() {
+ return phraseSets_;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ @java.lang.Override
+ public int getPhraseSetsCount() {
+ return phraseSets_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.PhraseSet getPhraseSets(int index) {
+ return phraseSets_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int index) {
+ return phraseSets_.get(index);
+ }
+
+ public static final int PHRASE_SET_REFERENCES_FIELD_NUMBER = 2;
+ private com.google.protobuf.LazyStringList phraseSetReferences_;
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the phraseSetReferences.
+ */
+ public com.google.protobuf.ProtocolStringList getPhraseSetReferencesList() {
+ return phraseSetReferences_;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of phraseSetReferences.
+ */
+ public int getPhraseSetReferencesCount() {
+ return phraseSetReferences_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The phraseSetReferences at the given index.
+ */
+ public java.lang.String getPhraseSetReferences(int index) {
+ return phraseSetReferences_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the phraseSetReferences at the given index.
+ */
+ public com.google.protobuf.ByteString getPhraseSetReferencesBytes(int index) {
+ return phraseSetReferences_.getByteString(index);
+ }
+
+ public static final int CUSTOM_CLASSES_FIELD_NUMBER = 3;
+ private java.util.List
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ @java.lang.Override
+ public java.util.List
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.speech.v1.CustomClassOrBuilder>
+ getCustomClassesOrBuilderList() {
+ return customClasses_;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ @java.lang.Override
+ public int getCustomClassesCount() {
+ return customClasses_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.CustomClass getCustomClasses(int index) {
+ return customClasses_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.speech.v1.CustomClassOrBuilder getCustomClassesOrBuilder(int index) {
+ return customClasses_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < phraseSets_.size(); i++) {
+ output.writeMessage(1, phraseSets_.get(i));
+ }
+ for (int i = 0; i < phraseSetReferences_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, phraseSetReferences_.getRaw(i));
+ }
+ for (int i = 0; i < customClasses_.size(); i++) {
+ output.writeMessage(3, customClasses_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < phraseSets_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, phraseSets_.get(i));
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < phraseSetReferences_.size(); i++) {
+ dataSize += computeStringSizeNoTag(phraseSetReferences_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getPhraseSetReferencesList().size();
+ }
+ for (int i = 0; i < customClasses_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, customClasses_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.speech.v1.SpeechAdaptation)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.speech.v1.SpeechAdaptation other =
+ (com.google.cloud.speech.v1.SpeechAdaptation) obj;
+
+ if (!getPhraseSetsList().equals(other.getPhraseSetsList())) return false;
+ if (!getPhraseSetReferencesList().equals(other.getPhraseSetReferencesList())) return false;
+ if (!getCustomClassesList().equals(other.getCustomClassesList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getPhraseSetsCount() > 0) {
+ hash = (37 * hash) + PHRASE_SETS_FIELD_NUMBER;
+ hash = (53 * hash) + getPhraseSetsList().hashCode();
+ }
+ if (getPhraseSetReferencesCount() > 0) {
+ hash = (37 * hash) + PHRASE_SET_REFERENCES_FIELD_NUMBER;
+ hash = (53 * hash) + getPhraseSetReferencesList().hashCode();
+ }
+ if (getCustomClassesCount() > 0) {
+ hash = (37 * hash) + CUSTOM_CLASSES_FIELD_NUMBER;
+ hash = (53 * hash) + getCustomClassesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.speech.v1.SpeechAdaptation parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.cloud.speech.v1.SpeechAdaptation prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Speech adaptation configuration.
+ *
+ *
+ * Protobuf type {@code google.cloud.speech.v1.SpeechAdaptation}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public java.util.List
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public int getPhraseSetsCount() {
+ if (phraseSetsBuilder_ == null) {
+ return phraseSets_.size();
+ } else {
+ return phraseSetsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public com.google.cloud.speech.v1.PhraseSet getPhraseSets(int index) {
+ if (phraseSetsBuilder_ == null) {
+ return phraseSets_.get(index);
+ } else {
+ return phraseSetsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder setPhraseSets(int index, com.google.cloud.speech.v1.PhraseSet value) {
+ if (phraseSetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhraseSetsIsMutable();
+ phraseSets_.set(index, value);
+ onChanged();
+ } else {
+ phraseSetsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder setPhraseSets(
+ int index, com.google.cloud.speech.v1.PhraseSet.Builder builderForValue) {
+ if (phraseSetsBuilder_ == null) {
+ ensurePhraseSetsIsMutable();
+ phraseSets_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ phraseSetsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder addPhraseSets(com.google.cloud.speech.v1.PhraseSet value) {
+ if (phraseSetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhraseSetsIsMutable();
+ phraseSets_.add(value);
+ onChanged();
+ } else {
+ phraseSetsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder addPhraseSets(int index, com.google.cloud.speech.v1.PhraseSet value) {
+ if (phraseSetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhraseSetsIsMutable();
+ phraseSets_.add(index, value);
+ onChanged();
+ } else {
+ phraseSetsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder addPhraseSets(com.google.cloud.speech.v1.PhraseSet.Builder builderForValue) {
+ if (phraseSetsBuilder_ == null) {
+ ensurePhraseSetsIsMutable();
+ phraseSets_.add(builderForValue.build());
+ onChanged();
+ } else {
+ phraseSetsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder addPhraseSets(
+ int index, com.google.cloud.speech.v1.PhraseSet.Builder builderForValue) {
+ if (phraseSetsBuilder_ == null) {
+ ensurePhraseSetsIsMutable();
+ phraseSets_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ phraseSetsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder addAllPhraseSets(
+ java.lang.Iterable extends com.google.cloud.speech.v1.PhraseSet> values) {
+ if (phraseSetsBuilder_ == null) {
+ ensurePhraseSetsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phraseSets_);
+ onChanged();
+ } else {
+ phraseSetsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder clearPhraseSets() {
+ if (phraseSetsBuilder_ == null) {
+ phraseSets_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ phraseSetsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public Builder removePhraseSets(int index) {
+ if (phraseSetsBuilder_ == null) {
+ ensurePhraseSetsIsMutable();
+ phraseSets_.remove(index);
+ onChanged();
+ } else {
+ phraseSetsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Builder getPhraseSetsBuilder(int index) {
+ return getPhraseSetsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public com.google.cloud.speech.v1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int index) {
+ if (phraseSetsBuilder_ == null) {
+ return phraseSets_.get(index);
+ } else {
+ return phraseSetsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public java.util.List extends com.google.cloud.speech.v1.PhraseSetOrBuilder>
+ getPhraseSetsOrBuilderList() {
+ if (phraseSetsBuilder_ != null) {
+ return phraseSetsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(phraseSets_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Builder addPhraseSetsBuilder() {
+ return getPhraseSetsFieldBuilder()
+ .addBuilder(com.google.cloud.speech.v1.PhraseSet.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public com.google.cloud.speech.v1.PhraseSet.Builder addPhraseSetsBuilder(int index) {
+ return getPhraseSetsFieldBuilder()
+ .addBuilder(index, com.google.cloud.speech.v1.PhraseSet.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ public java.util.List
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the phraseSetReferences.
+ */
+ public com.google.protobuf.ProtocolStringList getPhraseSetReferencesList() {
+ return phraseSetReferences_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of phraseSetReferences.
+ */
+ public int getPhraseSetReferencesCount() {
+ return phraseSetReferences_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The phraseSetReferences at the given index.
+ */
+ public java.lang.String getPhraseSetReferences(int index) {
+ return phraseSetReferences_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the phraseSetReferences at the given index.
+ */
+ public com.google.protobuf.ByteString getPhraseSetReferencesBytes(int index) {
+ return phraseSetReferences_.getByteString(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The phraseSetReferences to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPhraseSetReferences(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhraseSetReferencesIsMutable();
+ phraseSetReferences_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The phraseSetReferences to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPhraseSetReferences(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePhraseSetReferencesIsMutable();
+ phraseSetReferences_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param values The phraseSetReferences to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPhraseSetReferences(java.lang.Iterable
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPhraseSetReferences() {
+ phraseSetReferences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes of the phraseSetReferences to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPhraseSetReferencesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensurePhraseSetReferencesIsMutable();
+ phraseSetReferences_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public java.util.List
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public int getCustomClassesCount() {
+ if (customClassesBuilder_ == null) {
+ return customClasses_.size();
+ } else {
+ return customClassesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass getCustomClasses(int index) {
+ if (customClassesBuilder_ == null) {
+ return customClasses_.get(index);
+ } else {
+ return customClassesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder setCustomClasses(int index, com.google.cloud.speech.v1.CustomClass value) {
+ if (customClassesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureCustomClassesIsMutable();
+ customClasses_.set(index, value);
+ onChanged();
+ } else {
+ customClassesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder setCustomClasses(
+ int index, com.google.cloud.speech.v1.CustomClass.Builder builderForValue) {
+ if (customClassesBuilder_ == null) {
+ ensureCustomClassesIsMutable();
+ customClasses_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ customClassesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder addCustomClasses(com.google.cloud.speech.v1.CustomClass value) {
+ if (customClassesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureCustomClassesIsMutable();
+ customClasses_.add(value);
+ onChanged();
+ } else {
+ customClassesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder addCustomClasses(int index, com.google.cloud.speech.v1.CustomClass value) {
+ if (customClassesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureCustomClassesIsMutable();
+ customClasses_.add(index, value);
+ onChanged();
+ } else {
+ customClassesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder addCustomClasses(
+ com.google.cloud.speech.v1.CustomClass.Builder builderForValue) {
+ if (customClassesBuilder_ == null) {
+ ensureCustomClassesIsMutable();
+ customClasses_.add(builderForValue.build());
+ onChanged();
+ } else {
+ customClassesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder addCustomClasses(
+ int index, com.google.cloud.speech.v1.CustomClass.Builder builderForValue) {
+ if (customClassesBuilder_ == null) {
+ ensureCustomClassesIsMutable();
+ customClasses_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ customClassesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder addAllCustomClasses(
+ java.lang.Iterable extends com.google.cloud.speech.v1.CustomClass> values) {
+ if (customClassesBuilder_ == null) {
+ ensureCustomClassesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customClasses_);
+ onChanged();
+ } else {
+ customClassesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder clearCustomClasses() {
+ if (customClassesBuilder_ == null) {
+ customClasses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ customClassesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public Builder removeCustomClasses(int index) {
+ if (customClassesBuilder_ == null) {
+ ensureCustomClassesIsMutable();
+ customClasses_.remove(index);
+ onChanged();
+ } else {
+ customClassesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.Builder getCustomClassesBuilder(int index) {
+ return getCustomClassesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClassOrBuilder getCustomClassesOrBuilder(int index) {
+ if (customClassesBuilder_ == null) {
+ return customClasses_.get(index);
+ } else {
+ return customClassesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public java.util.List extends com.google.cloud.speech.v1.CustomClassOrBuilder>
+ getCustomClassesOrBuilderList() {
+ if (customClassesBuilder_ != null) {
+ return customClassesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(customClasses_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.Builder addCustomClassesBuilder() {
+ return getCustomClassesFieldBuilder()
+ .addBuilder(com.google.cloud.speech.v1.CustomClass.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public com.google.cloud.speech.v1.CustomClass.Builder addCustomClassesBuilder(int index) {
+ return getCustomClassesFieldBuilder()
+ .addBuilder(index, com.google.cloud.speech.v1.CustomClass.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ public java.util.List
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ java.util.List
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ com.google.cloud.speech.v1.PhraseSet getPhraseSets(int index);
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ int getPhraseSetsCount();
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ java.util.List extends com.google.cloud.speech.v1.PhraseSetOrBuilder>
+ getPhraseSetsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * A collection of phrase sets. To specify the hints inline, leave the
+ * phrase set's `name` blank and fill in the rest of its fields. Any
+ * phrase set can use any custom class.
+ *
+ *
+ * repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
+ */
+ com.google.cloud.speech.v1.PhraseSetOrBuilder getPhraseSetsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the phraseSetReferences.
+ */
+ java.util.List
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of phraseSetReferences.
+ */
+ int getPhraseSetReferencesCount();
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The phraseSetReferences at the given index.
+ */
+ java.lang.String getPhraseSetReferences(int index);
+ /**
+ *
+ *
+ *
+ * A collection of phrase set resource names to use.
+ *
+ *
+ * repeated string phrase_set_references = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the phraseSetReferences at the given index.
+ */
+ com.google.protobuf.ByteString getPhraseSetReferencesBytes(int index);
+
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ java.util.List
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ com.google.cloud.speech.v1.CustomClass getCustomClasses(int index);
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ int getCustomClassesCount();
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ java.util.List extends com.google.cloud.speech.v1.CustomClassOrBuilder>
+ getCustomClassesOrBuilderList();
+ /**
+ *
+ *
+ *
+ * A collection of custom classes. To specify the classes inline, leave the
+ * class' `name` blank and fill in the rest of its fields, giving it a unique
+ * `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ * `custom_class_id`.
+ *
+ *
+ * repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
+ */
+ com.google.cloud.speech.v1.CustomClassOrBuilder getCustomClassesOrBuilder(int index);
+}
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContext.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContext.java
index 90fbab884..38e2523de 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContext.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContext.java
@@ -82,6 +82,11 @@ private SpeechContext(
phrases_.add(s);
break;
}
+ case 37:
+ {
+ boost_ = input.readFloat();
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -220,6 +225,31 @@ public com.google.protobuf.ByteString getPhrasesBytes(int index) {
return phrases_.getByteString(index);
}
+ public static final int BOOST_FIELD_NUMBER = 4;
+ private float boost_;
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 and 20. We recommend using a binary search approach to
+ * finding the optimal value for your use case.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return The boost.
+ */
+ @java.lang.Override
+ public float getBoost() {
+ return boost_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -237,6 +267,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < phrases_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, phrases_.getRaw(i));
}
+ if (boost_ != 0F) {
+ output.writeFloat(4, boost_);
+ }
unknownFields.writeTo(output);
}
@@ -254,6 +287,9 @@ public int getSerializedSize() {
size += dataSize;
size += 1 * getPhrasesList().size();
}
+ if (boost_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, boost_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -270,6 +306,8 @@ public boolean equals(final java.lang.Object obj) {
com.google.cloud.speech.v1.SpeechContext other = (com.google.cloud.speech.v1.SpeechContext) obj;
if (!getPhrasesList().equals(other.getPhrasesList())) return false;
+ if (java.lang.Float.floatToIntBits(getBoost())
+ != java.lang.Float.floatToIntBits(other.getBoost())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -285,6 +323,8 @@ public int hashCode() {
hash = (37 * hash) + PHRASES_FIELD_NUMBER;
hash = (53 * hash) + getPhrasesList().hashCode();
}
+ hash = (37 * hash) + BOOST_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -433,6 +473,8 @@ public Builder clear() {
super.clear();
phrases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
+ boost_ = 0F;
+
return this;
}
@@ -466,6 +508,7 @@ public com.google.cloud.speech.v1.SpeechContext buildPartial() {
bitField0_ = (bitField0_ & ~0x00000001);
}
result.phrases_ = phrases_;
+ result.boost_ = boost_;
onBuilt();
return result;
}
@@ -525,6 +568,9 @@ public Builder mergeFrom(com.google.cloud.speech.v1.SpeechContext other) {
}
onChanged();
}
+ if (other.getBoost() != 0F) {
+ setBoost(other.getBoost());
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -814,6 +860,79 @@ public Builder addPhrasesBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private float boost_;
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 and 20. We recommend using a binary search approach to
+ * finding the optimal value for your use case.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return The boost.
+ */
+ @java.lang.Override
+ public float getBoost() {
+ return boost_;
+ }
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 and 20. We recommend using a binary search approach to
+ * finding the optimal value for your use case.
+ *
+ *
+ * float boost = 4;
+ *
+ * @param value The boost to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBoost(float value) {
+
+ boost_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 and 20. We recommend using a binary search approach to
+ * finding the optimal value for your use case.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearBoost() {
+
+ boost_ = 0F;
+ 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-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContextOrBuilder.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContextOrBuilder.java
index 04daade92..a529f0428 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContextOrBuilder.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechContextOrBuilder.java
@@ -113,4 +113,24 @@ public interface SpeechContextOrBuilder
* @return The bytes of the phrases at the given index.
*/
com.google.protobuf.ByteString getPhrasesBytes(int index);
+
+ /**
+ *
+ *
+ *
+ * Hint Boost. Positive value will increase the probability that a specific
+ * phrase will be recognized over other similar sounding phrases. The higher
+ * the boost, the higher the chance of false positive recognition as well.
+ * Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ * enabled, so negative boost will simply be ignored. Though `boost` can
+ * accept a wide range of positive values, most use cases are best served with
+ * values between 0 and 20. We recommend using a binary search approach to
+ * finding the optimal value for your use case.
+ *
+ *
+ * float boost = 4;
+ *
+ * @return The boost.
+ */
+ float getBoost();
}
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechProto.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechProto.java
index c1edd1a04..fa6632209 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechProto.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechProto.java
@@ -111,137 +111,150 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"\n)google/cloud/speech/v1/cloud_speech.pr"
+ "oto\022\026google.cloud.speech.v1\032\034google/api/"
+ "annotations.proto\032\027google/api/client.pro"
- + "to\032\037google/api/field_behavior.proto\032#goo"
- + "gle/longrunning/operations.proto\032\031google"
- + "/protobuf/any.proto\032\036google/protobuf/dur"
- + "ation.proto\032\037google/protobuf/timestamp.p"
- + "roto\032\036google/protobuf/wrappers.proto\032\027go"
- + "ogle/rpc/status.proto\"\220\001\n\020RecognizeReque"
- + "st\022>\n\006config\030\001 \001(\0132).google.cloud.speech"
- + ".v1.RecognitionConfigB\003\340A\002\022<\n\005audio\030\002 \001("
- + "\0132(.google.cloud.speech.v1.RecognitionAu"
- + "dioB\003\340A\002\"\347\001\n\033LongRunningRecognizeRequest"
- + "\022>\n\006config\030\001 \001(\0132).google.cloud.speech.v"
- + "1.RecognitionConfigB\003\340A\002\022<\n\005audio\030\002 \001(\0132"
- + "(.google.cloud.speech.v1.RecognitionAudi"
- + "oB\003\340A\002\022J\n\routput_config\030\004 \001(\0132..google.c"
- + "loud.speech.v1.TranscriptOutputConfigB\003\340"
- + "A\001\":\n\026TranscriptOutputConfig\022\021\n\007gcs_uri\030"
- + "\001 \001(\tH\000B\r\n\013output_type\"\231\001\n\031StreamingReco"
- + "gnizeRequest\022N\n\020streaming_config\030\001 \001(\01322"
- + ".google.cloud.speech.v1.StreamingRecogni"
- + "tionConfigH\000\022\027\n\raudio_content\030\002 \001(\014H\000B\023\n"
- + "\021streaming_request\"\217\001\n\032StreamingRecognit"
- + "ionConfig\022>\n\006config\030\001 \001(\0132).google.cloud"
- + ".speech.v1.RecognitionConfigB\003\340A\002\022\030\n\020sin"
- + "gle_utterance\030\002 \001(\010\022\027\n\017interim_results\030\003"
- + " \001(\010\"\337\005\n\021RecognitionConfig\022I\n\010encoding\030\001"
- + " \001(\01627.google.cloud.speech.v1.Recognitio"
- + "nConfig.AudioEncoding\022\031\n\021sample_rate_her"
- + "tz\030\002 \001(\005\022\033\n\023audio_channel_count\030\007 \001(\005\022/\n"
- + "\'enable_separate_recognition_per_channel"
- + "\030\014 \001(\010\022\032\n\rlanguage_code\030\003 \001(\tB\003\340A\002\022\030\n\020ma"
- + "x_alternatives\030\004 \001(\005\022\030\n\020profanity_filter"
- + "\030\005 \001(\010\022>\n\017speech_contexts\030\006 \003(\0132%.google"
- + ".cloud.speech.v1.SpeechContext\022 \n\030enable"
- + "_word_time_offsets\030\010 \001(\010\022$\n\034enable_autom"
- + "atic_punctuation\030\013 \001(\010\022L\n\022diarization_co"
- + "nfig\030\023 \001(\01320.google.cloud.speech.v1.Spea"
- + "kerDiarizationConfig\022=\n\010metadata\030\t \001(\0132+"
- + ".google.cloud.speech.v1.RecognitionMetad"
- + "ata\022\r\n\005model\030\r \001(\t\022\024\n\014use_enhanced\030\016 \001(\010"
- + "\"\213\001\n\rAudioEncoding\022\030\n\024ENCODING_UNSPECIFI"
- + "ED\020\000\022\014\n\010LINEAR16\020\001\022\010\n\004FLAC\020\002\022\t\n\005MULAW\020\003\022"
- + "\007\n\003AMR\020\004\022\n\n\006AMR_WB\020\005\022\014\n\010OGG_OPUS\020\006\022\032\n\026SP"
- + "EEX_WITH_HEADER_BYTE\020\007\"\220\001\n\030SpeakerDiariz"
- + "ationConfig\022\"\n\032enable_speaker_diarizatio"
- + "n\030\001 \001(\010\022\031\n\021min_speaker_count\030\002 \001(\005\022\031\n\021ma"
- + "x_speaker_count\030\003 \001(\005\022\032\n\013speaker_tag\030\005 \001"
- + "(\005B\005\030\001\340A\003\"\240\010\n\023RecognitionMetadata\022U\n\020int"
- + "eraction_type\030\001 \001(\0162;.google.cloud.speec"
- + "h.v1.RecognitionMetadata.InteractionType"
- + "\022$\n\034industry_naics_code_of_audio\030\003 \001(\r\022["
- + "\n\023microphone_distance\030\004 \001(\0162>.google.clo"
- + "ud.speech.v1.RecognitionMetadata.Microph"
- + "oneDistance\022Z\n\023original_media_type\030\005 \001(\016"
- + "2=.google.cloud.speech.v1.RecognitionMet"
- + "adata.OriginalMediaType\022^\n\025recording_dev"
- + "ice_type\030\006 \001(\0162?.google.cloud.speech.v1."
- + "RecognitionMetadata.RecordingDeviceType\022"
- + "\035\n\025recording_device_name\030\007 \001(\t\022\032\n\022origin"
- + "al_mime_type\030\010 \001(\t\022\023\n\013audio_topic\030\n \001(\t\""
- + "\305\001\n\017InteractionType\022 \n\034INTERACTION_TYPE_"
- + "UNSPECIFIED\020\000\022\016\n\nDISCUSSION\020\001\022\020\n\014PRESENT"
- + "ATION\020\002\022\016\n\nPHONE_CALL\020\003\022\r\n\tVOICEMAIL\020\004\022\033"
- + "\n\027PROFESSIONALLY_PRODUCED\020\005\022\020\n\014VOICE_SEA"
- + "RCH\020\006\022\021\n\rVOICE_COMMAND\020\007\022\r\n\tDICTATION\020\010\""
- + "d\n\022MicrophoneDistance\022#\n\037MICROPHONE_DIST"
- + "ANCE_UNSPECIFIED\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010MID"
- + "FIELD\020\002\022\014\n\010FARFIELD\020\003\"N\n\021OriginalMediaTy"
- + "pe\022#\n\037ORIGINAL_MEDIA_TYPE_UNSPECIFIED\020\000\022"
- + "\t\n\005AUDIO\020\001\022\t\n\005VIDEO\020\002\"\244\001\n\023RecordingDevic"
- + "eType\022%\n!RECORDING_DEVICE_TYPE_UNSPECIFI"
- + "ED\020\000\022\016\n\nSMARTPHONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE_LI"
- + "NE\020\003\022\013\n\007VEHICLE\020\004\022\030\n\024OTHER_OUTDOOR_DEVIC"
- + "E\020\005\022\027\n\023OTHER_INDOOR_DEVICE\020\006\" \n\rSpeechCo"
- + "ntext\022\017\n\007phrases\030\001 \003(\t\"D\n\020RecognitionAud"
+ + "to\032\037google/api/field_behavior.proto\032%goo"
+ + "gle/cloud/speech/v1/resource.proto\032#goog"
+ + "le/longrunning/operations.proto\032\031google/"
+ + "protobuf/any.proto\032\036google/protobuf/dura"
+ + "tion.proto\032\037google/protobuf/timestamp.pr"
+ + "oto\032\036google/protobuf/wrappers.proto\032\027goo"
+ + "gle/rpc/status.proto\"\220\001\n\020RecognizeReques"
+ + "t\022>\n\006config\030\001 \001(\0132).google.cloud.speech."
+ + "v1.RecognitionConfigB\003\340A\002\022<\n\005audio\030\002 \001(\013"
+ + "2(.google.cloud.speech.v1.RecognitionAud"
+ + "ioB\003\340A\002\"\347\001\n\033LongRunningRecognizeRequest\022"
+ + ">\n\006config\030\001 \001(\0132).google.cloud.speech.v1"
+ + ".RecognitionConfigB\003\340A\002\022<\n\005audio\030\002 \001(\0132("
+ + ".google.cloud.speech.v1.RecognitionAudio"
+ + "B\003\340A\002\022J\n\routput_config\030\004 \001(\0132..google.cl"
+ + "oud.speech.v1.TranscriptOutputConfigB\003\340A"
+ + "\001\":\n\026TranscriptOutputConfig\022\021\n\007gcs_uri\030\001"
+ + " \001(\tH\000B\r\n\013output_type\"\231\001\n\031StreamingRecog"
+ + "nizeRequest\022N\n\020streaming_config\030\001 \001(\01322."
+ + "google.cloud.speech.v1.StreamingRecognit"
+ + "ionConfigH\000\022\027\n\raudio_content\030\002 \001(\014H\000B\023\n\021"
+ + "streaming_request\"\217\001\n\032StreamingRecogniti"
+ + "onConfig\022>\n\006config\030\001 \001(\0132).google.cloud."
+ + "speech.v1.RecognitionConfigB\003\340A\002\022\030\n\020sing"
+ + "le_utterance\030\002 \001(\010\022\027\n\017interim_results\030\003 "
+ + "\001(\010\"\351\007\n\021RecognitionConfig\022I\n\010encoding\030\001 "
+ + "\001(\01627.google.cloud.speech.v1.Recognition"
+ + "Config.AudioEncoding\022\031\n\021sample_rate_hert"
+ + "z\030\002 \001(\005\022\033\n\023audio_channel_count\030\007 \001(\005\022/\n\'"
+ + "enable_separate_recognition_per_channel\030"
+ + "\014 \001(\010\022\032\n\rlanguage_code\030\003 \001(\tB\003\340A\002\022\"\n\032alt"
+ + "ernative_language_codes\030\022 \003(\t\022\030\n\020max_alt"
+ + "ernatives\030\004 \001(\005\022\030\n\020profanity_filter\030\005 \001("
+ + "\010\022<\n\nadaptation\030\024 \001(\0132(.google.cloud.spe"
+ + "ech.v1.SpeechAdaptation\022>\n\017speech_contex"
+ + "ts\030\006 \003(\0132%.google.cloud.speech.v1.Speech"
+ + "Context\022 \n\030enable_word_time_offsets\030\010 \001("
+ + "\010\022\036\n\026enable_word_confidence\030\017 \001(\010\022$\n\034ena"
+ + "ble_automatic_punctuation\030\013 \001(\010\022=\n\031enabl"
+ + "e_spoken_punctuation\030\026 \001(\0132\032.google.prot"
+ + "obuf.BoolValue\0228\n\024enable_spoken_emojis\030\027"
+ + " \001(\0132\032.google.protobuf.BoolValue\022L\n\022diar"
+ + "ization_config\030\023 \001(\01320.google.cloud.spee"
+ + "ch.v1.SpeakerDiarizationConfig\022=\n\010metada"
+ + "ta\030\t \001(\0132+.google.cloud.speech.v1.Recogn"
+ + "itionMetadata\022\r\n\005model\030\r \001(\t\022\024\n\014use_enha"
+ + "nced\030\016 \001(\010\"\232\001\n\rAudioEncoding\022\030\n\024ENCODING"
+ + "_UNSPECIFIED\020\000\022\014\n\010LINEAR16\020\001\022\010\n\004FLAC\020\002\022\t"
+ + "\n\005MULAW\020\003\022\007\n\003AMR\020\004\022\n\n\006AMR_WB\020\005\022\014\n\010OGG_OP"
+ + "US\020\006\022\032\n\026SPEEX_WITH_HEADER_BYTE\020\007\022\r\n\tWEBM"
+ + "_OPUS\020\t\"\220\001\n\030SpeakerDiarizationConfig\022\"\n\032"
+ + "enable_speaker_diarization\030\001 \001(\010\022\031\n\021min_"
+ + "speaker_count\030\002 \001(\005\022\031\n\021max_speaker_count"
+ + "\030\003 \001(\005\022\032\n\013speaker_tag\030\005 \001(\005B\005\030\001\340A\003\"\240\010\n\023R"
+ + "ecognitionMetadata\022U\n\020interaction_type\030\001"
+ + " \001(\0162;.google.cloud.speech.v1.Recognitio"
+ + "nMetadata.InteractionType\022$\n\034industry_na"
+ + "ics_code_of_audio\030\003 \001(\r\022[\n\023microphone_di"
+ + "stance\030\004 \001(\0162>.google.cloud.speech.v1.Re"
+ + "cognitionMetadata.MicrophoneDistance\022Z\n\023"
+ + "original_media_type\030\005 \001(\0162=.google.cloud"
+ + ".speech.v1.RecognitionMetadata.OriginalM"
+ + "ediaType\022^\n\025recording_device_type\030\006 \001(\0162"
+ + "?.google.cloud.speech.v1.RecognitionMeta"
+ + "data.RecordingDeviceType\022\035\n\025recording_de"
+ + "vice_name\030\007 \001(\t\022\032\n\022original_mime_type\030\010 "
+ + "\001(\t\022\023\n\013audio_topic\030\n \001(\t\"\305\001\n\017Interaction"
+ + "Type\022 \n\034INTERACTION_TYPE_UNSPECIFIED\020\000\022\016"
+ + "\n\nDISCUSSION\020\001\022\020\n\014PRESENTATION\020\002\022\016\n\nPHON"
+ + "E_CALL\020\003\022\r\n\tVOICEMAIL\020\004\022\033\n\027PROFESSIONALL"
+ + "Y_PRODUCED\020\005\022\020\n\014VOICE_SEARCH\020\006\022\021\n\rVOICE_"
+ + "COMMAND\020\007\022\r\n\tDICTATION\020\010\"d\n\022MicrophoneDi"
+ + "stance\022#\n\037MICROPHONE_DISTANCE_UNSPECIFIE"
+ + "D\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010MIDFIELD\020\002\022\014\n\010FARF"
+ + "IELD\020\003\"N\n\021OriginalMediaType\022#\n\037ORIGINAL_"
+ + "MEDIA_TYPE_UNSPECIFIED\020\000\022\t\n\005AUDIO\020\001\022\t\n\005V"
+ + "IDEO\020\002\"\244\001\n\023RecordingDeviceType\022%\n!RECORD"
+ + "ING_DEVICE_TYPE_UNSPECIFIED\020\000\022\016\n\nSMARTPH"
+ + "ONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE_LINE\020\003\022\013\n\007VEHICLE"
+ + "\020\004\022\030\n\024OTHER_OUTDOOR_DEVICE\020\005\022\027\n\023OTHER_IN"
+ + "DOOR_DEVICE\020\006\"/\n\rSpeechContext\022\017\n\007phrase"
+ + "s\030\001 \003(\t\022\r\n\005boost\030\004 \001(\002\"D\n\020RecognitionAud"
+ "io\022\021\n\007content\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001(\tH\000B\016\n\014"
+ "audio_source\"\213\001\n\021RecognizeResponse\022@\n\007re"
+ "sults\030\002 \003(\0132/.google.cloud.speech.v1.Spe"
+ "echRecognitionResult\0224\n\021total_billed_tim"
- + "e\030\003 \001(\0132\031.google.protobuf.Duration\"\226\001\n\034L"
+ + "e\030\003 \001(\0132\031.google.protobuf.Duration\"\207\002\n\034L"
+ "ongRunningRecognizeResponse\022@\n\007results\030\002"
+ " \003(\0132/.google.cloud.speech.v1.SpeechReco"
+ "gnitionResult\0224\n\021total_billed_time\030\003 \001(\013"
- + "2\031.google.protobuf.Duration\"\260\001\n\034LongRunn"
- + "ingRecognizeMetadata\022\030\n\020progress_percent"
- + "\030\001 \001(\005\022.\n\nstart_time\030\002 \001(\0132\032.google.prot"
- + "obuf.Timestamp\0224\n\020last_update_time\030\003 \001(\013"
- + "2\032.google.protobuf.Timestamp\022\020\n\003uri\030\004 \001("
- + "\tB\003\340A\003\"\347\002\n\032StreamingRecognizeResponse\022!\n"
- + "\005error\030\001 \001(\0132\022.google.rpc.Status\022C\n\007resu"
- + "lts\030\002 \003(\01322.google.cloud.speech.v1.Strea"
- + "mingRecognitionResult\022]\n\021speech_event_ty"
- + "pe\030\004 \001(\0162B.google.cloud.speech.v1.Stream"
- + "ingRecognizeResponse.SpeechEventType\0224\n\021"
- + "total_billed_time\030\005 \001(\0132\031.google.protobu"
- + "f.Duration\"L\n\017SpeechEventType\022\034\n\030SPEECH_"
- + "EVENT_UNSPECIFIED\020\000\022\033\n\027END_OF_SINGLE_UTT"
- + "ERANCE\020\001\"\362\001\n\032StreamingRecognitionResult\022"
- + "J\n\014alternatives\030\001 \003(\01324.google.cloud.spe"
- + "ech.v1.SpeechRecognitionAlternative\022\020\n\010i"
- + "s_final\030\002 \001(\010\022\021\n\tstability\030\003 \001(\002\0222\n\017resu"
- + "lt_end_time\030\004 \001(\0132\031.google.protobuf.Dura"
- + "tion\022\023\n\013channel_tag\030\005 \001(\005\022\032\n\rlanguage_co"
- + "de\030\006 \001(\tB\003\340A\003\"z\n\027SpeechRecognitionResult"
- + "\022J\n\014alternatives\030\001 \003(\01324.google.cloud.sp"
- + "eech.v1.SpeechRecognitionAlternative\022\023\n\013"
- + "channel_tag\030\002 \001(\005\"w\n\034SpeechRecognitionAl"
- + "ternative\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfide"
- + "nce\030\002 \001(\002\022/\n\005words\030\003 \003(\0132 .google.cloud."
- + "speech.v1.WordInfo\"\216\001\n\010WordInfo\022-\n\nstart"
- + "_time\030\001 \001(\0132\031.google.protobuf.Duration\022+"
- + "\n\010end_time\030\002 \001(\0132\031.google.protobuf.Durat"
- + "ion\022\014\n\004word\030\003 \001(\t\022\030\n\013speaker_tag\030\005 \001(\005B\003"
- + "\340A\0032\321\004\n\006Speech\022\220\001\n\tRecognize\022(.google.cl"
- + "oud.speech.v1.RecognizeRequest\032).google."
- + "cloud.speech.v1.RecognizeResponse\".\202\323\344\223\002"
- + "\031\"\024/v1/speech:recognize:\001*\332A\014config,audi"
- + "o\022\344\001\n\024LongRunningRecognize\0223.google.clou"
- + "d.speech.v1.LongRunningRecognizeRequest\032"
- + "\035.google.longrunning.Operation\"x\202\323\344\223\002$\"\037"
- + "/v1/speech:longrunningrecognize:\001*\332A\014con"
- + "fig,audio\312A<\n\034LongRunningRecognizeRespon"
- + "se\022\034LongRunningRecognizeMetadata\022\201\001\n\022Str"
- + "eamingRecognize\0221.google.cloud.speech.v1"
- + ".StreamingRecognizeRequest\0322.google.clou"
- + "d.speech.v1.StreamingRecognizeResponse\"\000"
- + "(\0010\001\032I\312A\025speech.googleapis.com\322A.https:/"
- + "/www.googleapis.com/auth/cloud-platformB"
- + "r\n\032com.google.cloud.speech.v1B\013SpeechPro"
- + "toP\001Z.google.protobuf.Duration result_end_time = 4;
+ *
+ * @return Whether the resultEndTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasResultEndTime() {
+ return resultEndTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return The resultEndTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getResultEndTime() {
+ return resultEndTime_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : resultEndTime_;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder() {
+ return getResultEndTime();
+ }
+
+ public static final int LANGUAGE_CODE_FIELD_NUMBER = 5;
+ private volatile java.lang.Object languageCode_;
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The languageCode.
+ */
+ @java.lang.Override
+ public java.lang.String getLanguageCode() {
+ java.lang.Object ref = languageCode_;
+ 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();
+ languageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for languageCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getLanguageCodeBytes() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ languageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -253,6 +380,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (channelTag_ != 0) {
output.writeInt32(2, channelTag_);
}
+ if (resultEndTime_ != null) {
+ output.writeMessage(4, getResultEndTime());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_);
+ }
unknownFields.writeTo(output);
}
@@ -268,6 +401,12 @@ public int getSerializedSize() {
if (channelTag_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, channelTag_);
}
+ if (resultEndTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResultEndTime());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -286,6 +425,11 @@ public boolean equals(final java.lang.Object obj) {
if (!getAlternativesList().equals(other.getAlternativesList())) return false;
if (getChannelTag() != other.getChannelTag()) return false;
+ if (hasResultEndTime() != other.hasResultEndTime()) return false;
+ if (hasResultEndTime()) {
+ if (!getResultEndTime().equals(other.getResultEndTime())) return false;
+ }
+ if (!getLanguageCode().equals(other.getLanguageCode())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@@ -303,6 +447,12 @@ public int hashCode() {
}
hash = (37 * hash) + CHANNEL_TAG_FIELD_NUMBER;
hash = (53 * hash) + getChannelTag();
+ if (hasResultEndTime()) {
+ hash = (37 * hash) + RESULT_END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getResultEndTime().hashCode();
+ }
+ hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getLanguageCode().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
@@ -458,6 +608,14 @@ public Builder clear() {
}
channelTag_ = 0;
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTime_ = null;
+ } else {
+ resultEndTime_ = null;
+ resultEndTimeBuilder_ = null;
+ }
+ languageCode_ = "";
+
return this;
}
@@ -496,6 +654,12 @@ public com.google.cloud.speech.v1.SpeechRecognitionResult buildPartial() {
result.alternatives_ = alternativesBuilder_.build();
}
result.channelTag_ = channelTag_;
+ if (resultEndTimeBuilder_ == null) {
+ result.resultEndTime_ = resultEndTime_;
+ } else {
+ result.resultEndTime_ = resultEndTimeBuilder_.build();
+ }
+ result.languageCode_ = languageCode_;
onBuilt();
return result;
}
@@ -576,6 +740,13 @@ public Builder mergeFrom(com.google.cloud.speech.v1.SpeechRecognitionResult othe
if (other.getChannelTag() != 0) {
setChannelTag(other.getChannelTag());
}
+ if (other.hasResultEndTime()) {
+ mergeResultEndTime(other.getResultEndTime());
+ }
+ if (!other.getLanguageCode().isEmpty()) {
+ languageCode_ = other.languageCode_;
+ onChanged();
+ }
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
@@ -1084,6 +1255,316 @@ public Builder clearChannelTag() {
return this;
}
+ private com.google.protobuf.Duration resultEndTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ resultEndTimeBuilder_;
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return Whether the resultEndTime field is set.
+ */
+ public boolean hasResultEndTime() {
+ return resultEndTimeBuilder_ != null || resultEndTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return The resultEndTime.
+ */
+ public com.google.protobuf.Duration getResultEndTime() {
+ if (resultEndTimeBuilder_ == null) {
+ return resultEndTime_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : resultEndTime_;
+ } else {
+ return resultEndTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder setResultEndTime(com.google.protobuf.Duration value) {
+ if (resultEndTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ resultEndTime_ = value;
+ onChanged();
+ } else {
+ resultEndTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder setResultEndTime(com.google.protobuf.Duration.Builder builderForValue) {
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ resultEndTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder mergeResultEndTime(com.google.protobuf.Duration value) {
+ if (resultEndTimeBuilder_ == null) {
+ if (resultEndTime_ != null) {
+ resultEndTime_ =
+ com.google.protobuf.Duration.newBuilder(resultEndTime_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ resultEndTime_ = value;
+ }
+ onChanged();
+ } else {
+ resultEndTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder clearResultEndTime() {
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTime_ = null;
+ onChanged();
+ } else {
+ resultEndTime_ = null;
+ resultEndTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public com.google.protobuf.Duration.Builder getResultEndTimeBuilder() {
+
+ onChanged();
+ return getResultEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder() {
+ if (resultEndTimeBuilder_ != null) {
+ return resultEndTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return resultEndTime_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : resultEndTime_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getResultEndTimeFieldBuilder() {
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getResultEndTime(), getParentForChildren(), isClean());
+ resultEndTime_ = null;
+ }
+ return resultEndTimeBuilder_;
+ }
+
+ private java.lang.Object languageCode_ = "";
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The languageCode.
+ */
+ public java.lang.String getLanguageCode() {
+ java.lang.Object ref = languageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ languageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for languageCode.
+ */
+ public com.google.protobuf.ByteString getLanguageCodeBytes() {
+ java.lang.Object ref = languageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ languageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The languageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ languageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLanguageCode() {
+
+ languageCode_ = getDefaultInstance().getLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @param value The bytes for languageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ languageCode_ = 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-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechRecognitionResultOrBuilder.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechRecognitionResultOrBuilder.java
index cfb90df9c..50085b974 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechRecognitionResultOrBuilder.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechRecognitionResultOrBuilder.java
@@ -105,4 +105,71 @@ com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder getAlternatives
* @return The channelTag.
*/
int getChannelTag();
+
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return Whether the resultEndTime field is set.
+ */
+ boolean hasResultEndTime();
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return The resultEndTime.
+ */
+ com.google.protobuf.Duration getResultEndTime();
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The languageCode.
+ */
+ java.lang.String getLanguageCode();
+ /**
+ *
+ *
+ *
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
+ *
+ *
+ * string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The bytes for languageCode.
+ */
+ com.google.protobuf.ByteString getLanguageCodeBytes();
}
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechResourceProto.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechResourceProto.java
new file mode 100644
index 000000000..871a1bc16
--- /dev/null
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechResourceProto.java
@@ -0,0 +1,145 @@
+/*
+ * 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/speech/v1/resource.proto
+
+package com.google.cloud.speech.v1;
+
+public final class SpeechResourceProto {
+ private SpeechResourceProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_speech_v1_CustomClass_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_speech_v1_CustomClass_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_speech_v1_CustomClass_ClassItem_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_speech_v1_CustomClass_ClassItem_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_speech_v1_PhraseSet_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_speech_v1_PhraseSet_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_speech_v1_PhraseSet_Phrase_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_speech_v1_PhraseSet_Phrase_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_speech_v1_SpeechAdaptation_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_speech_v1_SpeechAdaptation_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n%google/cloud/speech/v1/resource.proto\022"
+ + "\026google.cloud.speech.v1\032\031google/api/reso"
+ + "urce.proto\032\037google/protobuf/timestamp.pr"
+ + "oto\032\034google/api/annotations.proto\"\374\001\n\013Cu"
+ + "stomClass\022\014\n\004name\030\001 \001(\t\022\027\n\017custom_class_"
+ + "id\030\002 \001(\t\022<\n\005items\030\003 \003(\0132-.google.cloud.s"
+ + "peech.v1.CustomClass.ClassItem\032\032\n\tClassI"
+ + "tem\022\r\n\005value\030\001 \001(\t:l\352Ai\n!speech.googleap"
+ + "is.com/CustomClass\022Dprojects/{project}/l"
+ + "ocations/{location}/customClasses/{custo"
+ + "m_class}\"\362\001\n\tPhraseSet\022\014\n\004name\030\001 \001(\t\0229\n\007"
+ + "phrases\030\002 \003(\0132(.google.cloud.speech.v1.P"
+ + "hraseSet.Phrase\022\r\n\005boost\030\004 \001(\002\032&\n\006Phrase"
+ + "\022\r\n\005value\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002:e\352Ab\n\037spe"
+ + "ech.googleapis.com/PhraseSet\022?projects/{"
+ + "project}/locations/{location}/phraseSets"
+ + "/{phrase_set}\"\314\001\n\020SpeechAdaptation\0226\n\013ph"
+ + "rase_sets\030\001 \003(\0132!.google.cloud.speech.v1"
+ + ".PhraseSet\022C\n\025phrase_set_references\030\002 \003("
+ + "\tB$\372A!\n\037speech.googleapis.com/PhraseSet\022"
+ + ";\n\016custom_classes\030\003 \003(\0132#.google.cloud.s"
+ + "peech.v1.CustomClassBz\n\032com.google.cloud"
+ + ".speech.v1B\023SpeechResourceProtoP\001Zstring language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -393,9 +393,9 @@ public java.lang.String getLanguageCode() {
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1670,9 +1670,9 @@ public Builder clearChannelTag() {
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1694,9 +1694,9 @@ public java.lang.String getLanguageCode() {
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1718,9 +1718,9 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() {
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1741,9 +1741,9 @@ public Builder setLanguageCode(java.lang.String value) {
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -1760,9 +1760,9 @@ public Builder clearLanguageCode() {
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/StreamingRecognitionResultOrBuilder.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/StreamingRecognitionResultOrBuilder.java
index 1954365c9..21ef917f1 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/StreamingRecognitionResultOrBuilder.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/StreamingRecognitionResultOrBuilder.java
@@ -182,9 +182,9 @@ com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder getAlternatives
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -196,9 +196,9 @@ com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder getAlternatives
*
*
*
- * The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- * the language in this result. This language code was detected to have the
- * most likelihood of being spoken in the audio.
+ * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ * of the language in this result. This language code was detected to have
+ * the most likelihood of being spoken in the audio.
*
*
* string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfo.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfo.java
index c2dd24bd7..0acf4170a 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfo.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfo.java
@@ -107,6 +107,11 @@ private WordInfo(
word_ = s;
break;
}
+ case 37:
+ {
+ confidence_ = input.readFloat();
+ break;
+ }
case 40:
{
speakerTag_ = input.readInt32();
@@ -317,6 +322,30 @@ public com.google.protobuf.ByteString getWordBytes() {
}
}
+ public static final int CONFIDENCE_FIELD_NUMBER = 4;
+ private float confidence_;
+ /**
+ *
+ *
+ *
+ * The confidence estimate between 0.0 and 1.0. A higher number
+ * indicates an estimated greater likelihood that the recognized words are
+ * correct. This field is set only for the top alternative of a non-streaming
+ * result or, of a streaming result where `is_final=true`.
+ * This field is not guaranteed to be accurate and users should not rely on it
+ * to be always provided.
+ * The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ *
+ *
+ * float confidence = 4;
+ *
+ * @return The confidence.
+ */
+ @java.lang.Override
+ public float getConfidence() {
+ return confidence_;
+ }
+
public static final int SPEAKER_TAG_FIELD_NUMBER = 5;
private int speakerTag_;
/**
@@ -362,6 +391,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(word_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, word_);
}
+ if (confidence_ != 0F) {
+ output.writeFloat(4, confidence_);
+ }
if (speakerTag_ != 0) {
output.writeInt32(5, speakerTag_);
}
@@ -383,6 +415,9 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(word_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, word_);
}
+ if (confidence_ != 0F) {
+ size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, confidence_);
+ }
if (speakerTag_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, speakerTag_);
}
@@ -410,6 +445,8 @@ public boolean equals(final java.lang.Object obj) {
if (!getEndTime().equals(other.getEndTime())) return false;
}
if (!getWord().equals(other.getWord())) return false;
+ if (java.lang.Float.floatToIntBits(getConfidence())
+ != java.lang.Float.floatToIntBits(other.getConfidence())) return false;
if (getSpeakerTag() != other.getSpeakerTag()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
@@ -432,6 +469,8 @@ public int hashCode() {
}
hash = (37 * hash) + WORD_FIELD_NUMBER;
hash = (53 * hash) + getWord().hashCode();
+ hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidence());
hash = (37 * hash) + SPEAKER_TAG_FIELD_NUMBER;
hash = (53 * hash) + getSpeakerTag();
hash = (29 * hash) + unknownFields.hashCode();
@@ -592,6 +631,8 @@ public Builder clear() {
}
word_ = "";
+ confidence_ = 0F;
+
speakerTag_ = 0;
return this;
@@ -631,6 +672,7 @@ public com.google.cloud.speech.v1.WordInfo buildPartial() {
result.endTime_ = endTimeBuilder_.build();
}
result.word_ = word_;
+ result.confidence_ = confidence_;
result.speakerTag_ = speakerTag_;
onBuilt();
return result;
@@ -691,6 +733,9 @@ public Builder mergeFrom(com.google.cloud.speech.v1.WordInfo other) {
word_ = other.word_;
onChanged();
}
+ if (other.getConfidence() != 0F) {
+ setConfidence(other.getConfidence());
+ }
if (other.getSpeakerTag() != 0) {
setSpeakerTag(other.getSpeakerTag());
}
@@ -1277,6 +1322,76 @@ public Builder setWordBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private float confidence_;
+ /**
+ *
+ *
+ *
+ * The confidence estimate between 0.0 and 1.0. A higher number
+ * indicates an estimated greater likelihood that the recognized words are
+ * correct. This field is set only for the top alternative of a non-streaming
+ * result or, of a streaming result where `is_final=true`.
+ * This field is not guaranteed to be accurate and users should not rely on it
+ * to be always provided.
+ * The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ *
+ *
+ * float confidence = 4;
+ *
+ * @return The confidence.
+ */
+ @java.lang.Override
+ public float getConfidence() {
+ return confidence_;
+ }
+ /**
+ *
+ *
+ *
+ * The confidence estimate between 0.0 and 1.0. A higher number
+ * indicates an estimated greater likelihood that the recognized words are
+ * correct. This field is set only for the top alternative of a non-streaming
+ * result or, of a streaming result where `is_final=true`.
+ * This field is not guaranteed to be accurate and users should not rely on it
+ * to be always provided.
+ * The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ *
+ *
+ * float confidence = 4;
+ *
+ * @param value The confidence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setConfidence(float value) {
+
+ confidence_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The confidence estimate between 0.0 and 1.0. A higher number
+ * indicates an estimated greater likelihood that the recognized words are
+ * correct. This field is set only for the top alternative of a non-streaming
+ * result or, of a streaming result where `is_final=true`.
+ * This field is not guaranteed to be accurate and users should not rely on it
+ * to be always provided.
+ * The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ *
+ *
+ * float confidence = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearConfidence() {
+
+ confidence_ = 0F;
+ onChanged();
+ return this;
+ }
+
private int speakerTag_;
/**
*
diff --git a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfoOrBuilder.java b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfoOrBuilder.java
index a5b2da35e..45ed38fc6 100644
--- a/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfoOrBuilder.java
+++ b/proto-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/WordInfoOrBuilder.java
@@ -148,6 +148,25 @@ public interface WordInfoOrBuilder
*/
com.google.protobuf.ByteString getWordBytes();
+ /**
+ *
+ *
+ *
+ * The confidence estimate between 0.0 and 1.0. A higher number
+ * indicates an estimated greater likelihood that the recognized words are
+ * correct. This field is set only for the top alternative of a non-streaming
+ * result or, of a streaming result where `is_final=true`.
+ * This field is not guaranteed to be accurate and users should not rely on it
+ * to be always provided.
+ * The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ *
+ *
+ * float confidence = 4;
+ *
+ * @return The confidence.
+ */
+ float getConfidence();
+
/**
*
*
diff --git a/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/cloud_speech.proto b/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/cloud_speech.proto
index 4651fc9e0..875ea250e 100644
--- a/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/cloud_speech.proto
+++ b/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/cloud_speech.proto
@@ -19,6 +19,7 @@ package google.cloud.speech.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
+import "google/cloud/speech/v1/resource.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
@@ -181,7 +182,8 @@ message RecognitionConfig {
// a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
// recognition can be reduced if lossy codecs are used to capture or transmit
// audio, particularly if background noise is present. Lossy codecs include
- // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`.
+ // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`,
+ // and `WEBM_OPUS`.
//
// The `FLAC` and `WAV` audio file formats include a header that describes the
// included audio content. You can request recognition for `WAV` files that
@@ -236,6 +238,11 @@ message RecognitionConfig {
// is replaced with a single byte containing the block length. Only Speex
// wideband is supported. `sample_rate_hertz` must be 16000.
SPEEX_WITH_HEADER_BYTE = 7;
+
+ // Opus encoded audio frames in WebM container
+ // ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
+ // one of 8000, 12000, 16000, 24000, or 48000.
+ WEBM_OPUS = 9;
}
// Encoding of audio data sent in all `RecognitionAudio` messages.
@@ -279,6 +286,20 @@ message RecognitionConfig {
// of the currently supported language codes.
string language_code = 3 [(google.api.field_behavior) = REQUIRED];
+ // A list of up to 3 additional
+ // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
+ // listing possible alternative languages of the supplied audio.
+ // See [Language
+ // Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
+ // of the currently supported language codes. If alternative languages are
+ // listed, recognition result will contain recognition in the most likely
+ // language detected including the main language_code. The recognition result
+ // will include the language tag of the language detected in the audio. Note:
+ // This feature is only supported for Voice Command and Voice Search use cases
+ // and performance may vary for other use cases (e.g., phone call
+ // transcription).
+ repeated string alternative_language_codes = 18;
+
// Maximum number of recognition hypotheses to be returned.
// Specifically, the maximum number of `SpeechRecognitionAlternative` messages
// within each `SpeechRecognitionResult`.
@@ -293,6 +314,13 @@ message RecognitionConfig {
// won't be filtered out.
bool profanity_filter = 5;
+ // Speech adaptation configuration improves the accuracy of speech
+ // recognition. For more information, see the [speech
+ // adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
+ // documentation.
+ // When speech adaptation is set it supersedes the `speech_contexts` field.
+ SpeechAdaptation adaptation = 20;
+
// Array of [SpeechContext][google.cloud.speech.v1.SpeechContext].
// A means to provide context to assist the speech recognition. For more
// information, see
@@ -306,12 +334,33 @@ message RecognitionConfig {
// `false`.
bool enable_word_time_offsets = 8;
+ // If `true`, the top result includes a list of words and the
+ // confidence for those words. If `false`, no word-level confidence
+ // information is returned. The default is `false`.
+ bool enable_word_confidence = 15;
+
// If 'true', adds punctuation to recognition result hypotheses.
// This feature is only available in select languages. Setting this for
// requests in other languages has no effect at all.
// The default 'false' value does not add punctuation to result hypotheses.
bool enable_automatic_punctuation = 11;
+ // The spoken punctuation behavior for the call
+ // If not set, uses default behavior based on model of choice
+ // e.g. command_and_search will enable spoken punctuation by default
+ // If 'true', replaces spoken punctuation with the corresponding symbols in
+ // the request. For example, "how are you question mark" becomes "how are
+ // you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
+ // for support. If 'false', spoken punctuation is not replaced.
+ google.protobuf.BoolValue enable_spoken_punctuation = 22;
+
+ // The spoken emoji behavior for the call
+ // If not set, uses default behavior based on model of choice
+ // If 'true', adds spoken emoji formatting for the request. This will replace
+ // spoken emojis with the corresponding Unicode symbols in the final
+ // transcript. If 'false', spoken emojis are not replaced.
+ google.protobuf.BoolValue enable_spoken_emojis = 23;
+
// Config to enable speaker diarization and set additional
// parameters to make diarization better suited for your application.
// Note: When this is enabled, we send all the words from the beginning of the
@@ -537,6 +586,16 @@ message SpeechContext {
// improves the likelihood of correctly transcribing audio that includes
// months.
repeated string phrases = 1;
+
+ // Hint Boost. Positive value will increase the probability that a specific
+ // phrase will be recognized over other similar sounding phrases. The higher
+ // the boost, the higher the chance of false positive recognition as well.
+ // Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ // enabled, so negative boost will simply be ignored. Though `boost` can
+ // accept a wide range of positive values, most use cases are best served with
+ // values between 0 and 20. We recommend using a binary search approach to
+ // finding the optimal value for your use case.
+ float boost = 4;
}
// Contains audio data in the encoding specified in the `RecognitionConfig`.
@@ -587,6 +646,12 @@ message LongRunningRecognizeResponse {
// When available, billed audio seconds for the corresponding request.
google.protobuf.Duration total_billed_time = 3;
+
+ // Original output config if present in the request.
+ TranscriptOutputConfig output_config = 6;
+
+ // If the transcript output fails this field contains the relevant error.
+ google.rpc.Status output_error = 7;
}
// Describes the progress of a long-running `LongRunningRecognize` call. It is
@@ -723,11 +788,10 @@ message StreamingRecognitionResult {
// For audio_channel_count = N, its output values can range from '1' to 'N'.
int32 channel_tag = 5;
- // The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of
- // the language in this result. This language code was detected to have the
- // most likelihood of being spoken in the audio.
- string language_code = 6
- [(google.api.field_behavior) = OUTPUT_ONLY];
+ // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ // of the language in this result. This language code was detected to have
+ // the most likelihood of being spoken in the audio.
+ string language_code = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// A speech recognition result corresponding to a portion of the audio.
@@ -742,6 +806,15 @@ message SpeechRecognitionResult {
// recognized result for the audio from that channel.
// For audio_channel_count = N, its output values can range from '1' to 'N'.
int32 channel_tag = 2;
+
+ // Time offset of the end of this result relative to the
+ // beginning of the audio.
+ google.protobuf.Duration result_end_time = 4;
+
+ // Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
+ // of the language in this result. This language code was detected to have
+ // the most likelihood of being spoken in the audio.
+ string language_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Alternative hypotheses (a.k.a. n-best list).
@@ -785,6 +858,15 @@ message WordInfo {
// The word corresponding to this set of information.
string word = 3;
+ // The confidence estimate between 0.0 and 1.0. A higher number
+ // indicates an estimated greater likelihood that the recognized words are
+ // correct. This field is set only for the top alternative of a non-streaming
+ // result or, of a streaming result where `is_final=true`.
+ // This field is not guaranteed to be accurate and users should not rely on it
+ // to be always provided.
+ // The default of 0.0 is a sentinel value indicating `confidence` was not set.
+ float confidence = 4;
+
// Output only. A distinct integer value is assigned for every speaker within
// the audio. This field specifies which one of those speakers was detected to
// have spoken this word. Value ranges from '1' to diarization_speaker_count.
diff --git a/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/resource.proto b/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/resource.proto
new file mode 100644
index 000000000..edaeeff23
--- /dev/null
+++ b/proto-google-cloud-speech-v1/src/main/proto/google/cloud/speech/v1/resource.proto
@@ -0,0 +1,140 @@
+// 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.
+// You may obtain a copy of the License at
+//
+// http://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.
+
+syntax = "proto3";
+
+package google.cloud.speech.v1;
+
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1;speech";
+option java_multiple_files = true;
+option java_outer_classname = "SpeechResourceProto";
+option java_package = "com.google.cloud.speech.v1";
+option objc_class_prefix = "GCS";
+
+// A set of words or phrases that represents a common concept likely to appear
+// in your audio, for example a list of passenger ship names. CustomClass items
+// can be substituted into placeholders that you set in PhraseSet phrases.
+message CustomClass {
+ option (google.api.resource) = {
+ type: "speech.googleapis.com/CustomClass"
+ pattern: "projects/{project}/locations/{location}/customClasses/{custom_class}"
+ };
+
+ // An item of the class.
+ message ClassItem {
+ // The class item's value.
+ string value = 1;
+ }
+
+ // The resource name of the custom class.
+ string name = 1;
+
+ // If this custom class is a resource, the custom_class_id is the resource id
+ // of the CustomClass. Case sensitive.
+ string custom_class_id = 2;
+
+ // A collection of class items.
+ repeated ClassItem items = 3;
+}
+
+// Provides "hints" to the speech recognizer to favor specific words and phrases
+// in the results.
+message PhraseSet {
+ option (google.api.resource) = {
+ type: "speech.googleapis.com/PhraseSet"
+ pattern: "projects/{project}/locations/{location}/phraseSets/{phrase_set}"
+ };
+
+ // A phrases containing words and phrase "hints" so that
+ // the speech recognition is more likely to recognize them. This can be used
+ // to improve the accuracy for specific words and phrases, for example, if
+ // specific commands are typically spoken by the user. This can also be used
+ // to add additional words to the vocabulary of the recognizer. See
+ // [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
+ //
+ // List items can also include pre-built or custom classes containing groups
+ // of words that represent common concepts that occur in natural language. For
+ // example, rather than providing a phrase hint for every month of the
+ // year (e.g. "i was born in january", "i was born in febuary", ...), use the
+ // pre-built `$MONTH` class improves the likelihood of correctly transcribing
+ // audio that includes months (e.g. "i was born in $month").
+ // To refer to pre-built classes, use the class' symbol prepended with `$`
+ // e.g. `$MONTH`. To refer to custom classes that were defined inline in the
+ // request, set the class's `custom_class_id` to a string unique to all class
+ // resources and inline classes. Then use the class' id wrapped in $`{...}`
+ // e.g. "${my-months}". To refer to custom classes resources, use the class'
+ // id wrapped in `${}` (e.g. `${my-months}`).
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
+ message Phrase {
+ // The phrase itself.
+ string value = 1;
+
+ // Hint Boost. Overrides the boost set at the phrase set level.
+ // Positive value will increase the probability that a specific phrase will
+ // be recognized over other similar sounding phrases. The higher the boost,
+ // the higher the chance of false positive recognition as well. Negative
+ // boost will simply be ignored. Though `boost` can accept a wide range of
+ // positive values, most use cases are best served
+ // with values between 0 and 20. We recommend using a binary search approach
+ // to finding the optimal value for your use case. Speech recognition
+ // will skip PhraseSets with a boost value of 0.
+ float boost = 2;
+ }
+
+ // The resource name of the phrase set.
+ string name = 1;
+
+ // A list of word and phrases.
+ repeated Phrase phrases = 2;
+
+ // Hint Boost. Positive value will increase the probability that a specific
+ // phrase will be recognized over other similar sounding phrases. The higher
+ // the boost, the higher the chance of false positive recognition as well.
+ // Negative boost values would correspond to anti-biasing. Anti-biasing is not
+ // enabled, so negative boost will simply be ignored. Though `boost` can
+ // accept a wide range of positive values, most use cases are best served with
+ // values between 0 (exclusive) and 20. We recommend using a binary search
+ // approach to finding the optimal value for your use case. Speech recognition
+ // will skip PhraseSets with a boost value of 0.
+ float boost = 4;
+}
+
+// Speech adaptation configuration.
+message SpeechAdaptation {
+ // A collection of phrase sets. To specify the hints inline, leave the
+ // phrase set's `name` blank and fill in the rest of its fields. Any
+ // phrase set can use any custom class.
+ repeated PhraseSet phrase_sets = 1;
+
+ // A collection of phrase set resource names to use.
+ repeated string phrase_set_references = 2 [(google.api.resource_reference) = {
+ type: "speech.googleapis.com/PhraseSet"
+ }];
+
+ // A collection of custom classes. To specify the classes inline, leave the
+ // class' `name` blank and fill in the rest of its fields, giving it a unique
+ // `custom_class_id`. Refer to the inline defined class in phrase hints by its
+ // `custom_class_id`.
+ repeated CustomClass custom_classes = 3;
+}
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequest.java
index a3903d0da..e504c5aec 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequest.java
@@ -141,9 +141,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -168,9 +172,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -669,9 +677,13 @@ public Builder mergeFrom(
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -695,9 +707,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -721,9 +737,13 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -746,9 +766,13 @@ public Builder setParent(java.lang.String value) {
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -767,9 +791,13 @@ public Builder clearParent() {
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequestOrBuilder.java
index aaa1d09ec..7380bc4df 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreateCustomClassRequestOrBuilder.java
@@ -27,9 +27,13 @@ public interface CreateCustomClassRequestOrBuilder
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -43,9 +47,13 @@ public interface CreateCustomClassRequestOrBuilder
*
*
*
- * Required. The parent resource where this custom class will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent resource where this custom class will be created. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequest.java
index 6f835537f..8fcbc6727 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequest.java
@@ -141,9 +141,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -168,9 +172,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -669,9 +677,13 @@ public Builder mergeFrom(
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -695,9 +707,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -721,9 +737,13 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -746,9 +766,13 @@ public Builder setParent(java.lang.String value) {
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -767,9 +791,13 @@ public Builder clearParent() {
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequestOrBuilder.java
index aa70f07c3..c5e1da3ee 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/CreatePhraseSetRequestOrBuilder.java
@@ -27,9 +27,13 @@ public interface CreatePhraseSetRequestOrBuilder
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -43,9 +47,13 @@ public interface CreatePhraseSetRequestOrBuilder
*
*
*
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets
+ * Required. The parent resource where this phrase set will be created. Format:
+ * `projects/{project}/locations/{location}/phraseSets`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequest.java
index 4b3c91169..7c33bb7a8 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequest.java
@@ -117,9 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -144,9 +148,13 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -492,9 +500,13 @@ public Builder mergeFrom(
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -518,9 +530,13 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -544,9 +560,13 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -569,9 +589,13 @@ public Builder setName(java.lang.String value) {
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -590,9 +614,13 @@ public Builder clearName() {
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequestOrBuilder.java
index 198fc72fc..29f90c2ea 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeleteCustomClassRequestOrBuilder.java
@@ -27,9 +27,13 @@ public interface DeleteCustomClassRequestOrBuilder
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -43,9 +47,13 @@ public interface DeleteCustomClassRequestOrBuilder
*
*
*
- * Required. The name of the custom class to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to delete. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequest.java
index a65f40cdd..19d61461d 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequest.java
@@ -117,9 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -144,9 +143,8 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -492,9 +490,8 @@ public Builder mergeFrom(
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -518,9 +515,8 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -544,9 +540,8 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -569,9 +564,8 @@ public Builder setName(java.lang.String value) {
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -590,9 +584,8 @@ public Builder clearName() {
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequestOrBuilder.java
index 7a6a2edba..f6228f5da 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/DeletePhraseSetRequestOrBuilder.java
@@ -27,9 +27,8 @@ public interface DeletePhraseSetRequestOrBuilder
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
@@ -43,9 +42,8 @@ public interface DeletePhraseSetRequestOrBuilder
*
*
*
- * Required. The name of the phrase set to delete.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to delete. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequest.java
index 39b5a0f6c..fe9c530e9 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequest.java
@@ -117,9 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -144,9 +143,8 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -492,9 +490,8 @@ public Builder mergeFrom(
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -518,9 +515,8 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -544,9 +540,8 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -569,9 +564,8 @@ public Builder setName(java.lang.String value) {
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -590,9 +584,8 @@ public Builder clearName() {
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequestOrBuilder.java
index 6bd4958e0..05350941a 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetCustomClassRequestOrBuilder.java
@@ -27,9 +27,8 @@ public interface GetCustomClassRequestOrBuilder
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
@@ -43,9 +42,8 @@ public interface GetCustomClassRequestOrBuilder
*
*
*
- * Required. The name of the custom class to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * Required. The name of the custom class to retrieve. Format:
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequest.java
index 8e6536212..858f21155 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequest.java
@@ -117,9 +117,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -144,9 +148,13 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -492,9 +500,13 @@ public Builder mergeFrom(
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -518,9 +530,13 @@ public java.lang.String getName() {
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -544,9 +560,13 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -569,9 +589,13 @@ public Builder setName(java.lang.String value) {
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -590,9 +614,13 @@ public Builder clearName() {
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequestOrBuilder.java
index 40d0f81c6..b5ff46839 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/GetPhraseSetRequestOrBuilder.java
@@ -27,9 +27,13 @@ public interface GetPhraseSetRequestOrBuilder
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -43,9 +47,13 @@ public interface GetPhraseSetRequestOrBuilder
*
*
*
- * Required. The name of the phrase set to retrieve.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * Required. The name of the phrase set to retrieve. Format:
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequest.java
index b30e09ea4..48407776d 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequest.java
@@ -130,9 +130,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -157,9 +161,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -612,9 +620,13 @@ public Builder mergeFrom(
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -638,9 +650,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -664,9 +680,13 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -689,9 +709,13 @@ public Builder setParent(java.lang.String value) {
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -710,9 +734,13 @@ public Builder clearParent() {
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequestOrBuilder.java
index fe040690a..c74ed3745 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListCustomClassesRequestOrBuilder.java
@@ -27,9 +27,13 @@ public interface ListCustomClassesRequestOrBuilder
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -43,9 +47,13 @@ public interface ListCustomClassesRequestOrBuilder
*
*
*
- * Required. The parent, which owns this collection of custom classes.
- * Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses
+ * Required. The parent, which owns this collection of custom classes. Format:
+ * `projects/{project}/locations/{location}/customClasses`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequest.java
index 540249154..06bf1a8b0 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequest.java
@@ -130,9 +130,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -157,9 +161,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -612,9 +620,13 @@ public Builder mergeFrom(
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -638,9 +650,13 @@ public java.lang.String getParent() {
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -664,9 +680,13 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -689,9 +709,13 @@ public Builder setParent(java.lang.String value) {
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -710,9 +734,13 @@ public Builder clearParent() {
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequestOrBuilder.java
index b514303ec..bb7eca8aa 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/ListPhraseSetRequestOrBuilder.java
@@ -27,9 +27,13 @@ public interface ListPhraseSetRequestOrBuilder
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -43,9 +47,13 @@ public interface ListPhraseSetRequestOrBuilder
*
*
*
- * Required. The parent, which owns this collection of phrase set.
- * Format:
- * projects/{project}/locations/{location}
+ * Required. The parent, which owns this collection of phrase set. Format:
+ * `projects/{project}/locations/{location}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java
index 07e4156a4..663595375 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/PhraseSet.java
@@ -173,9 +173,8 @@ public interface PhraseOrBuilder
* Positive value will increase the probability that a specific phrase will
* be recognized over other similar sounding phrases. The higher the boost,
* the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
@@ -209,6 +208,11 @@ public interface PhraseOrBuilder
* resources and inline classes. Then use the class' id wrapped in $`{...}`
* e.g. "${my-months}". To refer to custom classes resources, use the class'
* id wrapped in `${}` (e.g. `${my-months}`).
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
* Protobuf type {@code google.cloud.speech.v1p1beta1.PhraseSet.Phrase}
@@ -361,9 +365,8 @@ public com.google.protobuf.ByteString getValueBytes() {
* Positive value will increase the probability that a specific phrase will
* be recognized over other similar sounding phrases. The higher the boost,
* the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
@@ -570,6 +573,11 @@ protected Builder newBuilderForType(
* resources and inline classes. Then use the class' id wrapped in $`{...}`
* e.g. "${my-months}". To refer to custom classes resources, use the class'
* id wrapped in `${}` (e.g. `${my-months}`).
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
* Protobuf type {@code google.cloud.speech.v1p1beta1.PhraseSet.Phrase}
@@ -848,9 +856,8 @@ public Builder setValueBytes(com.google.protobuf.ByteString value) {
* Positive value will increase the probability that a specific phrase will
* be recognized over other similar sounding phrases. The higher the boost,
* the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
@@ -872,9 +879,8 @@ public float getBoost() {
* Positive value will increase the probability that a specific phrase will
* be recognized over other similar sounding phrases. The higher the boost,
* the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
@@ -899,9 +905,8 @@ public Builder setBoost(float value) {
* Positive value will increase the probability that a specific phrase will
* be recognized over other similar sounding phrases. The higher the boost,
* the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served
+ * boost will simply be ignored. Though `boost` can accept a wide range of
+ * positive values, most use cases are best served
* with values between 0 and 20. We recommend using a binary search approach
* to finding the optimal value for your use case. Speech recognition
* will skip PhraseSets with a boost value of 0.
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java
index eaf945cf9..720bfd14c 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java
@@ -324,7 +324,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
* recognition can be reduced if lossy codecs are used to capture or transmit
* audio, particularly if background noise is present. Lossy codecs include
- * `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`.
+ * `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`,
+ * and `WEBM_OPUS`.
* The `FLAC` and `WAV` audio file formats include a header that describes the
* included audio content. You can request recognition for `WAV` files that
* contain either `LINEAR16` or `MULAW` encoded audio.
@@ -457,9 +458,8 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
*
*
* Opus encoded audio frames in WebM container
- * ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
- * only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
- * 12000, 16000, 24000, or 48000.
+ * ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
+ * one of 8000, 12000, 16000, 24000, or 48000.
*
*
* WEBM_OPUS = 9;
@@ -585,9 +585,8 @@ public enum AudioEncoding implements com.google.protobuf.ProtocolMessageEnum {
*
*
* Opus encoded audio frames in WebM container
- * ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
- * only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
- * 12000, 16000, 24000, or 48000.
+ * ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
+ * one of 8000, 12000, 16000, 24000, or 48000.
*
*
* WEBM_OPUS = 9;
@@ -1023,10 +1022,10 @@ public boolean getProfanityFilter() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -1042,10 +1041,10 @@ public boolean hasAdaptation() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -1063,10 +1062,10 @@ public com.google.cloud.speech.v1p1beta1.SpeechAdaptation getAdaptation() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3356,10 +3355,10 @@ public Builder clearProfanityFilter() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3374,10 +3373,10 @@ public boolean hasAdaptation() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3398,10 +3397,10 @@ public com.google.cloud.speech.v1p1beta1.SpeechAdaptation getAdaptation() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3424,10 +3423,10 @@ public Builder setAdaptation(com.google.cloud.speech.v1p1beta1.SpeechAdaptation
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3448,10 +3447,10 @@ public Builder setAdaptation(
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3478,10 +3477,10 @@ public Builder mergeAdaptation(com.google.cloud.speech.v1p1beta1.SpeechAdaptatio
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3502,10 +3501,10 @@ public Builder clearAdaptation() {
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3520,10 +3519,10 @@ public com.google.cloud.speech.v1p1beta1.SpeechAdaptation.Builder getAdaptationB
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -3542,10 +3541,10 @@ public com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptation
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java
index c136ef3a5..2f29f3761 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java
@@ -279,10 +279,10 @@ public interface RecognitionConfigOrBuilder
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -295,10 +295,10 @@ public interface RecognitionConfigOrBuilder
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
@@ -311,10 +311,10 @@ public interface RecognitionConfigOrBuilder
*
*
* Speech adaptation configuration improves the accuracy of speech
- * recognition. When speech adaptation is set it supersedes the
- * `speech_contexts` field. For more information, see the [speech
+ * recognition. For more information, see the [speech
* adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
* documentation.
+ * When speech adaptation is set it supersedes the `speech_contexts` field.
*
*
* .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java
index 37c859935..e858c793b 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java
@@ -235,38 +235,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "Alternative\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstabili"
+ "ty\030\003 \001(\002\0222\n\017result_end_time\030\004 \001(\0132\031.goog"
+ "le.protobuf.Duration\022\023\n\013channel_tag\030\005 \001("
- + "\005\022\032\n\rlanguage_code\030\006 \001(\tB\003\340A\003\"\235\001\n\027Speech"
+ + "\005\022\032\n\rlanguage_code\030\006 \001(\tB\003\340A\003\"\321\001\n\027Speech"
+ "RecognitionResult\022Q\n\014alternatives\030\001 \003(\0132"
+ ";.google.cloud.speech.v1p1beta1.SpeechRe"
+ "cognitionAlternative\022\023\n\013channel_tag\030\002 \001("
- + "\005\022\032\n\rlanguage_code\030\005 \001(\tB\003\340A\003\"~\n\034SpeechR"
- + "ecognitionAlternative\022\022\n\ntranscript\030\001 \001("
- + "\t\022\022\n\nconfidence\030\002 \001(\002\0226\n\005words\030\003 \003(\0132\'.g"
- + "oogle.cloud.speech.v1p1beta1.WordInfo\"\242\001"
- + "\n\010WordInfo\022-\n\nstart_time\030\001 \001(\0132\031.google."
- + "protobuf.Duration\022+\n\010end_time\030\002 \001(\0132\031.go"
- + "ogle.protobuf.Duration\022\014\n\004word\030\003 \001(\t\022\022\n\n"
- + "confidence\030\004 \001(\002\022\030\n\013speaker_tag\030\005 \001(\005B\003\340"
- + "A\0032\202\005\n\006Speech\022\245\001\n\tRecognize\022/.google.clo"
- + "ud.speech.v1p1beta1.RecognizeRequest\0320.g"
- + "oogle.cloud.speech.v1p1beta1.RecognizeRe"
- + "sponse\"5\202\323\344\223\002 \"\033/v1p1beta1/speech:recogn"
- + "ize:\001*\332A\014config,audio\022\362\001\n\024LongRunningRec"
- + "ognize\022:.google.cloud.speech.v1p1beta1.L"
- + "ongRunningRecognizeRequest\032\035.google.long"
- + "running.Operation\"\177\202\323\344\223\002+\"&/v1p1beta1/sp"
- + "eech:longrunningrecognize:\001*\332A\014config,au"
- + "dio\312A<\n\034LongRunningRecognizeResponse\022\034Lo"
- + "ngRunningRecognizeMetadata\022\217\001\n\022Streaming"
- + "Recognize\0228.google.cloud.speech.v1p1beta"
- + "1.StreamingRecognizeRequest\0329.google.clo"
- + "ud.speech.v1p1beta1.StreamingRecognizeRe"
- + "sponse\"\000(\0010\001\032I\312A\025speech.googleapis.com\322A"
- + ".https://www.googleapis.com/auth/cloud-p"
- + "latformB\200\001\n!com.google.cloud.speech.v1p1"
- + "beta1B\013SpeechProtoP\001ZCgoogle.golang.org/"
- + "genproto/googleapis/cloud/speech/v1p1bet"
- + "a1;speech\370\001\001\242\002\003GCSb\006proto3"
+ + "\005\0222\n\017result_end_time\030\004 \001(\0132\031.google.prot"
+ + "obuf.Duration\022\032\n\rlanguage_code\030\005 \001(\tB\003\340A"
+ + "\003\"~\n\034SpeechRecognitionAlternative\022\022\n\ntra"
+ + "nscript\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\0226\n\005wor"
+ + "ds\030\003 \003(\0132\'.google.cloud.speech.v1p1beta1"
+ + ".WordInfo\"\242\001\n\010WordInfo\022-\n\nstart_time\030\001 \001"
+ + "(\0132\031.google.protobuf.Duration\022+\n\010end_tim"
+ + "e\030\002 \001(\0132\031.google.protobuf.Duration\022\014\n\004wo"
+ + "rd\030\003 \001(\t\022\022\n\nconfidence\030\004 \001(\002\022\030\n\013speaker_"
+ + "tag\030\005 \001(\005B\003\340A\0032\202\005\n\006Speech\022\245\001\n\tRecognize\022"
+ + "/.google.cloud.speech.v1p1beta1.Recogniz"
+ + "eRequest\0320.google.cloud.speech.v1p1beta1"
+ + ".RecognizeResponse\"5\202\323\344\223\002 \"\033/v1p1beta1/s"
+ + "peech:recognize:\001*\332A\014config,audio\022\362\001\n\024Lo"
+ + "ngRunningRecognize\022:.google.cloud.speech"
+ + ".v1p1beta1.LongRunningRecognizeRequest\032\035"
+ + ".google.longrunning.Operation\"\177\202\323\344\223\002+\"&/"
+ + "v1p1beta1/speech:longrunningrecognize:\001*"
+ + "\332A\014config,audio\312A<\n\034LongRunningRecognize"
+ + "Response\022\034LongRunningRecognizeMetadata\022\217"
+ + "\001\n\022StreamingRecognize\0228.google.cloud.spe"
+ + "ech.v1p1beta1.StreamingRecognizeRequest\032"
+ + "9.google.cloud.speech.v1p1beta1.Streamin"
+ + "gRecognizeResponse\"\000(\0010\001\032I\312A\025speech.goog"
+ + "leapis.com\322A.https://www.googleapis.com/"
+ + "auth/cloud-platformB\200\001\n!com.google.cloud"
+ + ".speech.v1p1beta1B\013SpeechProtoP\001ZCgoogle"
+ + ".golang.org/genproto/googleapis/cloud/sp"
+ + "eech/v1p1beta1;speech\370\001\001\242\002\003GCSb\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -438,7 +439,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_speech_v1p1beta1_SpeechRecognitionResult_descriptor,
new java.lang.String[] {
- "Alternatives", "ChannelTag", "LanguageCode",
+ "Alternatives", "ChannelTag", "ResultEndTime", "LanguageCode",
});
internal_static_google_cloud_speech_v1p1beta1_SpeechRecognitionAlternative_descriptor =
getDescriptor().getMessageTypes().get(16);
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java
index 9c842c5ce..50eda7566 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResult.java
@@ -89,6 +89,21 @@ private SpeechRecognitionResult(
case 16:
{
channelTag_ = input.readInt32();
+ break;
+ }
+ case 34:
+ {
+ com.google.protobuf.Duration.Builder subBuilder = null;
+ if (resultEndTime_ != null) {
+ subBuilder = resultEndTime_.toBuilder();
+ }
+ resultEndTime_ =
+ input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(resultEndTime_);
+ resultEndTime_ = subBuilder.buildPartial();
+ }
+
break;
}
case 42:
@@ -248,6 +263,57 @@ public int getChannelTag() {
return channelTag_;
}
+ public static final int RESULT_END_TIME_FIELD_NUMBER = 4;
+ private com.google.protobuf.Duration resultEndTime_;
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return Whether the resultEndTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasResultEndTime() {
+ return resultEndTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return The resultEndTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getResultEndTime() {
+ return resultEndTime_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : resultEndTime_;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder() {
+ return getResultEndTime();
+ }
+
public static final int LANGUAGE_CODE_FIELD_NUMBER = 5;
private volatile java.lang.Object languageCode_;
/**
@@ -321,6 +387,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (channelTag_ != 0) {
output.writeInt32(2, channelTag_);
}
+ if (resultEndTime_ != null) {
+ output.writeMessage(4, getResultEndTime());
+ }
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_);
}
@@ -339,6 +408,9 @@ public int getSerializedSize() {
if (channelTag_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, channelTag_);
}
+ if (resultEndTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResultEndTime());
+ }
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_);
}
@@ -360,6 +432,10 @@ public boolean equals(final java.lang.Object obj) {
if (!getAlternativesList().equals(other.getAlternativesList())) return false;
if (getChannelTag() != other.getChannelTag()) return false;
+ if (hasResultEndTime() != other.hasResultEndTime()) return false;
+ if (hasResultEndTime()) {
+ if (!getResultEndTime().equals(other.getResultEndTime())) return false;
+ }
if (!getLanguageCode().equals(other.getLanguageCode())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
@@ -378,6 +454,10 @@ public int hashCode() {
}
hash = (37 * hash) + CHANNEL_TAG_FIELD_NUMBER;
hash = (53 * hash) + getChannelTag();
+ if (hasResultEndTime()) {
+ hash = (37 * hash) + RESULT_END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getResultEndTime().hashCode();
+ }
hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
@@ -536,6 +616,12 @@ public Builder clear() {
}
channelTag_ = 0;
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTime_ = null;
+ } else {
+ resultEndTime_ = null;
+ resultEndTimeBuilder_ = null;
+ }
languageCode_ = "";
return this;
@@ -576,6 +662,11 @@ public com.google.cloud.speech.v1p1beta1.SpeechRecognitionResult buildPartial()
result.alternatives_ = alternativesBuilder_.build();
}
result.channelTag_ = channelTag_;
+ if (resultEndTimeBuilder_ == null) {
+ result.resultEndTime_ = resultEndTime_;
+ } else {
+ result.resultEndTime_ = resultEndTimeBuilder_.build();
+ }
result.languageCode_ = languageCode_;
onBuilt();
return result;
@@ -657,6 +748,9 @@ public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.SpeechRecognitionResu
if (other.getChannelTag() != 0) {
setChannelTag(other.getChannelTag());
}
+ if (other.hasResultEndTime()) {
+ mergeResultEndTime(other.getResultEndTime());
+ }
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
onChanged();
@@ -1191,6 +1285,200 @@ public Builder clearChannelTag() {
return this;
}
+ private com.google.protobuf.Duration resultEndTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ resultEndTimeBuilder_;
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return Whether the resultEndTime field is set.
+ */
+ public boolean hasResultEndTime() {
+ return resultEndTimeBuilder_ != null || resultEndTime_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return The resultEndTime.
+ */
+ public com.google.protobuf.Duration getResultEndTime() {
+ if (resultEndTimeBuilder_ == null) {
+ return resultEndTime_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : resultEndTime_;
+ } else {
+ return resultEndTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder setResultEndTime(com.google.protobuf.Duration value) {
+ if (resultEndTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ resultEndTime_ = value;
+ onChanged();
+ } else {
+ resultEndTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder setResultEndTime(com.google.protobuf.Duration.Builder builderForValue) {
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ resultEndTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder mergeResultEndTime(com.google.protobuf.Duration value) {
+ if (resultEndTimeBuilder_ == null) {
+ if (resultEndTime_ != null) {
+ resultEndTime_ =
+ com.google.protobuf.Duration.newBuilder(resultEndTime_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ resultEndTime_ = value;
+ }
+ onChanged();
+ } else {
+ resultEndTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public Builder clearResultEndTime() {
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTime_ = null;
+ onChanged();
+ } else {
+ resultEndTime_ = null;
+ resultEndTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public com.google.protobuf.Duration.Builder getResultEndTimeBuilder() {
+
+ onChanged();
+ return getResultEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder() {
+ if (resultEndTimeBuilder_ != null) {
+ return resultEndTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return resultEndTime_ == null
+ ? com.google.protobuf.Duration.getDefaultInstance()
+ : resultEndTime_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getResultEndTimeFieldBuilder() {
+ if (resultEndTimeBuilder_ == null) {
+ resultEndTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getResultEndTime(), getParentForChildren(), isClean());
+ resultEndTime_ = null;
+ }
+ return resultEndTimeBuilder_;
+ }
+
private java.lang.Object languageCode_ = "";
/**
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java
index a41fb3df8..b836a20e7 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechRecognitionResultOrBuilder.java
@@ -112,6 +112,44 @@ com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternativeOrBuilder getAlter
*/
int getChannelTag();
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return Whether the resultEndTime field is set.
+ */
+ boolean hasResultEndTime();
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ *
+ * @return The resultEndTime.
+ */
+ com.google.protobuf.Duration getResultEndTime();
+ /**
+ *
+ *
+ *
+ * Time offset of the end of this result relative to the
+ * beginning of the audio.
+ *
+ *
+ * .google.protobuf.Duration result_end_time = 4;
+ */
+ com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequest.java
index 2a17b16ab..a2ddd097c 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequest.java
@@ -142,7 +142,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -162,7 +167,12 @@ public boolean hasCustomClass() {
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -184,7 +194,12 @@ public com.google.cloud.speech.v1p1beta1.CustomClass getCustomClass() {
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -614,7 +629,12 @@ public Builder mergeFrom(
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -633,7 +653,12 @@ public boolean hasCustomClass() {
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -658,7 +683,12 @@ public com.google.cloud.speech.v1p1beta1.CustomClass getCustomClass() {
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -685,7 +715,12 @@ public Builder setCustomClass(com.google.cloud.speech.v1p1beta1.CustomClass valu
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -710,7 +745,12 @@ public Builder setCustomClass(
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -741,7 +781,12 @@ public Builder mergeCustomClass(com.google.cloud.speech.v1p1beta1.CustomClass va
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -766,7 +811,12 @@ public Builder clearCustomClass() {
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -785,7 +835,12 @@ public com.google.cloud.speech.v1p1beta1.CustomClass.Builder getCustomClassBuild
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -808,7 +863,12 @@ public com.google.cloud.speech.v1p1beta1.CustomClassOrBuilder getCustomClassOrBu
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequestOrBuilder.java
index c57f6e028..1792176d9 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequestOrBuilder.java
@@ -30,7 +30,12 @@ public interface UpdateCustomClassRequestOrBuilder
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -47,7 +52,12 @@ public interface UpdateCustomClassRequestOrBuilder
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -64,7 +74,12 @@ public interface UpdateCustomClassRequestOrBuilder
* Required. The custom class to update.
* The custom class's `name` field is used to identify the custom class to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ * `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequest.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequest.java
index 8165d2765..1b6fb853b 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequest.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequest.java
@@ -142,7 +142,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -162,7 +167,12 @@ public boolean hasPhraseSet() {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -184,7 +194,12 @@ public com.google.cloud.speech.v1p1beta1.PhraseSet getPhraseSet() {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -614,7 +629,12 @@ public Builder mergeFrom(
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -633,7 +653,12 @@ public boolean hasPhraseSet() {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -658,7 +683,12 @@ public com.google.cloud.speech.v1p1beta1.PhraseSet getPhraseSet() {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -685,7 +715,12 @@ public Builder setPhraseSet(com.google.cloud.speech.v1p1beta1.PhraseSet value) {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -710,7 +745,12 @@ public Builder setPhraseSet(
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -741,7 +781,12 @@ public Builder mergePhraseSet(com.google.cloud.speech.v1p1beta1.PhraseSet value)
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -766,7 +811,12 @@ public Builder clearPhraseSet() {
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -785,7 +835,12 @@ public com.google.cloud.speech.v1p1beta1.PhraseSet.Builder getPhraseSetBuilder()
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -808,7 +863,12 @@ public com.google.cloud.speech.v1p1beta1.PhraseSetOrBuilder getPhraseSetOrBuilde
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequestOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequestOrBuilder.java
index 939c27f2f..8fa366627 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequestOrBuilder.java
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdatePhraseSetRequestOrBuilder.java
@@ -30,7 +30,12 @@ public interface UpdatePhraseSetRequestOrBuilder
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -47,7 +52,12 @@ public interface UpdatePhraseSetRequestOrBuilder
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
@@ -64,7 +74,12 @@ public interface UpdatePhraseSetRequestOrBuilder
* Required. The phrase set to update.
* The phrase set's `name` field is used to identify the set to be
* updated. Format:
- * {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ * Speech-to-Text supports three locations: `global`, `us` (US North America),
+ * and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ * endpoint, use the `global` location. To specify a region, use a
+ * [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ * `eu` location value.
*
*
*
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto
index edf603523..ef499edd1 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto
@@ -182,7 +182,8 @@ message RecognitionConfig {
// a lossless encoding (`FLAC` or `LINEAR16`). The accuracy of the speech
// recognition can be reduced if lossy codecs are used to capture or transmit
// audio, particularly if background noise is present. Lossy codecs include
- // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`.
+ // `MULAW`, `AMR`, `AMR_WB`, `OGG_OPUS`, `SPEEX_WITH_HEADER_BYTE`, `MP3`,
+ // and `WEBM_OPUS`.
//
// The `FLAC` and `WAV` audio file formats include a header that describes the
// included audio content. You can request recognition for `WAV` files that
@@ -245,9 +246,8 @@ message RecognitionConfig {
MP3 = 8;
// Opus encoded audio frames in WebM container
- // ([OggOpus](https://wiki.xiph.org/OggOpus)). This is a Beta features and
- // only available in v1p1beta1. `sample_rate_hertz` must be one of 8000,
- // 12000, 16000, 24000, or 48000.
+ // ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
+ // one of 8000, 12000, 16000, 24000, or 48000.
WEBM_OPUS = 9;
}
@@ -321,10 +321,10 @@ message RecognitionConfig {
bool profanity_filter = 5;
// Speech adaptation configuration improves the accuracy of speech
- // recognition. When speech adaptation is set it supersedes the
- // `speech_contexts` field. For more information, see the [speech
+ // recognition. For more information, see the [speech
// adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
// documentation.
+ // When speech adaptation is set it supersedes the `speech_contexts` field.
SpeechAdaptation adaptation = 20;
// Use transcription normalization to automatically replace parts of the
@@ -837,6 +837,10 @@ message SpeechRecognitionResult {
// For audio_channel_count = N, its output values can range from '1' to 'N'.
int32 channel_tag = 2;
+ // Time offset of the end of this result relative to the
+ // beginning of the audio.
+ google.protobuf.Duration result_end_time = 4;
+
// Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag
// of the language in this result. This language code was detected to have
// the most likelihood of being spoken in the audio.
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto
index e3a18cf38..de8ecdac9 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech_adaptation.proto
@@ -125,9 +125,15 @@ service Adaptation {
// Message sent by the client for the `CreatePhraseSet` method.
message CreatePhraseSetRequest {
- // Required. The parent resource where this phrase set will be created.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/phraseSets
+ // Required. The parent resource where this phrase set will be created. Format:
+ //
+ // `projects/{project}/locations/{location}/phraseSets`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -152,7 +158,14 @@ message UpdatePhraseSetRequest {
//
// The phrase set's `name` field is used to identify the set to be
// updated. Format:
- // {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ //
+ // `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
PhraseSet phrase_set = 1 [(google.api.field_behavior) = REQUIRED];
// The list of fields to be updated.
@@ -161,9 +174,15 @@ message UpdatePhraseSetRequest {
// Message sent by the client for the `GetPhraseSet` method.
message GetPhraseSetRequest {
- // Required. The name of the phrase set to retrieve.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ // Required. The name of the phrase set to retrieve. Format:
+ //
+ // `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -174,9 +193,15 @@ message GetPhraseSetRequest {
// Message sent by the client for the `ListPhraseSet` method.
message ListPhraseSetRequest {
- // Required. The parent, which owns this collection of phrase set.
- // Format:
- // projects/{project}/locations/{location}
+ // Required. The parent, which owns this collection of phrase set. Format:
+ //
+ // `projects/{project}/locations/{location}`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -210,9 +235,9 @@ message ListPhraseSetResponse {
// Message sent by the client for the `DeletePhraseSet` method.
message DeletePhraseSetRequest {
- // Required. The name of the phrase set to delete.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/phraseSets/{phrase_set}
+ // Required. The name of the phrase set to delete. Format:
+ //
+ // `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -223,9 +248,15 @@ message DeletePhraseSetRequest {
// Message sent by the client for the `CreateCustomClass` method.
message CreateCustomClassRequest {
- // Required. The parent resource where this custom class will be created.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/customClasses
+ // Required. The parent resource where this custom class will be created. Format:
+ //
+ // `projects/{project}/locations/{location}/customClasses`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -250,7 +281,14 @@ message UpdateCustomClassRequest {
//
// The custom class's `name` field is used to identify the custom class to be
// updated. Format:
- // {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ //
+ // `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
CustomClass custom_class = 1 [(google.api.field_behavior) = REQUIRED];
// The list of fields to be updated.
@@ -259,9 +297,9 @@ message UpdateCustomClassRequest {
// Message sent by the client for the `GetCustomClass` method.
message GetCustomClassRequest {
- // Required. The name of the custom class to retrieve.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ // Required. The name of the custom class to retrieve. Format:
+ //
+ // `projects/{project}/locations/{location}/customClasses/{custom_class}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -272,9 +310,15 @@ message GetCustomClassRequest {
// Message sent by the client for the `ListCustomClasses` method.
message ListCustomClassesRequest {
- // Required. The parent, which owns this collection of custom classes.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/customClasses
+ // Required. The parent, which owns this collection of custom classes. Format:
+ //
+ // `projects/{project}/locations/{location}/customClasses`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@@ -308,9 +352,15 @@ message ListCustomClassesResponse {
// Message sent by the client for the `DeleteCustomClass` method.
message DeleteCustomClassRequest {
- // Required. The name of the custom class to delete.
- // Format:
- // {api_version}/projects/{project}/locations/{location}/customClasses/{custom_class}
+ // Required. The name of the custom class to delete. Format:
+ //
+ // `projects/{project}/locations/{location}/customClasses/{custom_class}`
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto
index 1ff0430d2..297f38908 100644
--- a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto
+++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto
@@ -80,6 +80,12 @@ message PhraseSet {
// resources and inline classes. Then use the class' id wrapped in $`{...}`
// e.g. "${my-months}". To refer to custom classes resources, use the class'
// id wrapped in `${}` (e.g. `${my-months}`).
+ //
+ // Speech-to-Text supports three locations: `global`, `us` (US North America),
+ // and `eu` (Europe). If you are calling the `speech.googleapis.com`
+ // endpoint, use the `global` location. To specify a region, use a
+ // [regional endpoint](/speech-to-text/docs/endpoints) with matching `us` or
+ // `eu` location value.
message Phrase {
// The phrase itself.
string value = 1;
@@ -88,9 +94,8 @@ message PhraseSet {
// Positive value will increase the probability that a specific phrase will
// be recognized over other similar sounding phrases. The higher the boost,
// the higher the chance of false positive recognition as well. Negative
- // boost values would correspond to anti-biasing. Anti-biasing is not
- // enabled, so negative boost will simply be ignored. Though `boost` can
- // accept a wide range of positive values, most use cases are best served
+ // boost will simply be ignored. Though `boost` can accept a wide range of
+ // positive values, most use cases are best served
// with values between 0 and 20. We recommend using a binary search approach
// to finding the optimal value for your use case. Speech recognition
// will skip PhraseSets with a boost value of 0.