From bda78416ad7575ae92d81fc02068e7417f5ae624 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:40:52 -0400 Subject: [PATCH] feat: [speech] add transcript normalization + m4a audio format support (#10009) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add transcript normalization + m4a audio format support docs: clarify alternatives for deprecated fields feat: deprecate `BatchRecognizeFileResult.uri` in favor of `cloud_storage_result.native_format_uri` feat: deprecate `BatchRecognizeFileResult.transcript` in favor of `inline_result.transcript` PiperOrigin-RevId: 577926708 Source-Link: https://github.com/googleapis/googleapis/commit/37e816b40f7699edbac380c733dfa831da3a9a0d Source-Link: https://github.com/googleapis/googleapis-gen/commit/e12bd7bdbbb9d2e418a922075d23f77a8c1e7485 Copy-Tag: eyJwIjoiamF2YS1zcGVlY2gvLk93bEJvdC55YW1sIiwiaCI6ImUxMmJkN2JkYmJiOWQyZTQxOGE5MjIwNzVkMjNmNzdhOGMxZTc0ODUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- java-speech/README.md | 4 +- .../reflect-config.json | 72 + .../speech/v2/AutoDetectDecodingConfig.java | 4 + .../speech/v2/BatchRecognizeFileResult.java | 1282 ++++++++--- .../v2/BatchRecognizeFileResultOrBuilder.java | 167 +- .../cloud/speech/v2/CloudSpeechProto.java | 865 +++---- .../cloud/speech/v2/CloudStorageResult.java | 623 ++++++ .../v2/CloudStorageResultOrBuilder.java | 50 + .../google/cloud/speech/v2/InlineResult.java | 705 ++++++ .../speech/v2/InlineResultOrBuilder.java | 60 + .../cloud/speech/v2/RecognitionConfig.java | 337 +++ .../speech/v2/RecognitionConfigOrBuilder.java | 50 + .../google/cloud/speech/v2/Recognizer.java | 187 +- .../cloud/speech/v2/RecognizerOrBuilder.java | 56 +- .../speech/v2/TranscriptNormalization.java | 1982 +++++++++++++++++ .../v2/TranscriptNormalizationOrBuilder.java | 92 + .../google/cloud/speech/v2/cloud_speech.proto | 86 +- 17 files changed, 5860 insertions(+), 762 deletions(-) create mode 100644 java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResult.java create mode 100644 java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResultOrBuilder.java create mode 100644 java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResult.java create mode 100644 java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResultOrBuilder.java create mode 100644 java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalization.java create mode 100644 java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalizationOrBuilder.java diff --git a/java-speech/README.md b/java-speech/README.md index b7a77d41d0c4..c68d3e8a5c8d 100644 --- a/java-speech/README.md +++ b/java-speech/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.23.0 + 26.26.0 pom import @@ -231,7 +231,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-speech.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-speech/4.19.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-speech/4.24.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-speech/google-cloud-speech/src/main/resources/META-INF/native-image/com.google.cloud.speech.v2/reflect-config.json b/java-speech/google-cloud-speech/src/main/resources/META-INF/native-image/com.google.cloud.speech.v2/reflect-config.json index f187045b5f6d..c5b6c21aa27a 100644 --- a/java-speech/google-cloud-speech/src/main/resources/META-INF/native-image/com.google.cloud.speech.v2/reflect-config.json +++ b/java-speech/google-cloud-speech/src/main/resources/META-INF/native-image/com.google.cloud.speech.v2/reflect-config.json @@ -602,6 +602,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.speech.v2.CloudStorageResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.speech.v2.CloudStorageResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.speech.v2.Config", "queryAllDeclaredConstructors": true, @@ -908,6 +926,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.speech.v2.InlineResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.speech.v2.InlineResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.speech.v2.ListCustomClassesRequest", "queryAllDeclaredConstructors": true, @@ -1430,6 +1466,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.speech.v2.TranscriptNormalization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.speech.v2.TranscriptNormalization$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.speech.v2.TranscriptNormalization$Entry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.speech.v2.TranscriptNormalization$Entry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.speech.v2.UndeleteCustomClassRequest", "queryAllDeclaredConstructors": true, diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/AutoDetectDecodingConfig.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/AutoDetectDecodingConfig.java index 1b656e6fbbca..c3af1276fb43 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/AutoDetectDecodingConfig.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/AutoDetectDecodingConfig.java @@ -42,6 +42,8 @@ * * OGG_OPUS: Opus audio frames in an Ogg container. * * * WEBM_OPUS: Opus audio frames in a WebM container. + * + * * M4A: M4A audio format. * * * Protobuf type {@code google.cloud.speech.v2.AutoDetectDecodingConfig} @@ -253,6 +255,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * OGG_OPUS: Opus audio frames in an Ogg container. * * * WEBM_OPUS: Opus audio frames in a WebM container. + * + * * M4A: M4A audio format. * * * Protobuf type {@code google.cloud.speech.v2.AutoDetectDecodingConfig} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResult.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResult.java index 1596524524a5..7a637abca501 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResult.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResult.java @@ -62,55 +62,53 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.speech.v2.BatchRecognizeFileResult.Builder.class); } - public static final int URI_FIELD_NUMBER = 1; + private int resultCase_ = 0; @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** - * - * - *
-   * The Cloud Storage URI to which recognition results were written.
-   * 
- * - * string uri = 1; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - 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(); - uri_ = s; - return s; + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_STORAGE_RESULT(5), + INLINE_RESULT(6), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; } - } - /** - * - * - *
-   * The Cloud Storage URI to which recognition results were written.
-   * 
- * - * string uri = 1; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 5: + return CLOUD_STORAGE_RESULT; + case 6: + return INLINE_RESULT; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); } public static final int ERROR_FIELD_NUMBER = 2; @@ -189,41 +187,221 @@ public com.google.cloud.speech.v2.RecognitionResponseMetadataOrBuilder getMetada : metadata_; } - public static final int TRANSCRIPT_FIELD_NUMBER = 4; - private com.google.cloud.speech.v2.BatchRecognizeResults transcript_; + public static final int CLOUD_STORAGE_RESULT_FIELD_NUMBER = 5; + /** + * + * + *
+   * Recognition results written to Cloud Storage. This is
+   * populated only when
+   * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + * + * @return Whether the cloudStorageResult field is set. + */ + @java.lang.Override + public boolean hasCloudStorageResult() { + return resultCase_ == 5; + } /** * * *
-   * The transcript for the audio file. This is populated only when
+   * Recognition results written to Cloud Storage. This is
+   * populated only when
+   * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + * + * @return The cloudStorageResult. + */ + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResult getCloudStorageResult() { + if (resultCase_ == 5) { + return (com.google.cloud.speech.v2.CloudStorageResult) result_; + } + return com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } + /** + * + * + *
+   * Recognition results written to Cloud Storage. This is
+   * populated only when
+   * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResultOrBuilder getCloudStorageResultOrBuilder() { + if (resultCase_ == 5) { + return (com.google.cloud.speech.v2.CloudStorageResult) result_; + } + return com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } + + public static final int INLINE_RESULT_FIELD_NUMBER = 6; + /** + * + * + *
+   * Recognition results. This is populated only when
    * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
    * the
    * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
    * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.InlineResult inline_result = 6; * - * @return Whether the transcript field is set. + * @return Whether the inlineResult field is set. */ @java.lang.Override - public boolean hasTranscript() { - return transcript_ != null; + public boolean hasInlineResult() { + return resultCase_ == 6; + } + /** + * + * + *
+   * Recognition results. This is populated only when
+   * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + * + * @return The inlineResult. + */ + @java.lang.Override + public com.google.cloud.speech.v2.InlineResult getInlineResult() { + if (resultCase_ == 6) { + return (com.google.cloud.speech.v2.InlineResult) result_; + } + return com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); } /** * * *
-   * The transcript for the audio file. This is populated only when
+   * Recognition results. This is populated only when
    * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
    * the
    * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
    * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + @java.lang.Override + public com.google.cloud.speech.v2.InlineResultOrBuilder getInlineResultOrBuilder() { + if (resultCase_ == 6) { + return (com.google.cloud.speech.v2.InlineResult) result_; + } + return com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+   * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return The uri. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+   * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return The bytes for uri. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSCRIPT_FIELD_NUMBER = 4; + private com.google.cloud.speech.v2.BatchRecognizeResults transcript_; + /** + * + * + *
+   * Deprecated. Use `inline_result.transcript` instead.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.transcript is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1357 + * @return Whether the transcript field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasTranscript() { + return transcript_ != null; + } + /** + * + * + *
+   * Deprecated. Use `inline_result.transcript` instead.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.transcript is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1357 * @return The transcript. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.speech.v2.BatchRecognizeResults getTranscript() { return transcript_ == null ? com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance() @@ -233,15 +411,13 @@ public com.google.cloud.speech.v2.BatchRecognizeResults getTranscript() { * * *
-   * The transcript for the audio file. This is populated only when
-   * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-   * the
-   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * Deprecated. Use `inline_result.transcript` instead.
    * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOrBuilder() { return transcript_ == null ? com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance() @@ -274,6 +450,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (transcript_ != null) { output.writeMessage(4, getTranscript()); } + if (resultCase_ == 5) { + output.writeMessage(5, (com.google.cloud.speech.v2.CloudStorageResult) result_); + } + if (resultCase_ == 6) { + output.writeMessage(6, (com.google.cloud.speech.v2.InlineResult) result_); + } getUnknownFields().writeTo(output); } @@ -295,6 +477,16 @@ public int getSerializedSize() { if (transcript_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTranscript()); } + if (resultCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.speech.v2.CloudStorageResult) result_); + } + if (resultCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.speech.v2.InlineResult) result_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -311,7 +503,6 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.speech.v2.BatchRecognizeFileResult other = (com.google.cloud.speech.v2.BatchRecognizeFileResult) obj; - if (!getUri().equals(other.getUri())) return false; if (hasError() != other.hasError()) return false; if (hasError()) { if (!getError().equals(other.getError())) return false; @@ -320,10 +511,22 @@ public boolean equals(final java.lang.Object obj) { if (hasMetadata()) { if (!getMetadata().equals(other.getMetadata())) return false; } + if (!getUri().equals(other.getUri())) return false; if (hasTranscript() != other.hasTranscript()) return false; if (hasTranscript()) { if (!getTranscript().equals(other.getTranscript())) return false; } + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 5: + if (!getCloudStorageResult().equals(other.getCloudStorageResult())) return false; + break; + case 6: + if (!getInlineResult().equals(other.getInlineResult())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -335,8 +538,6 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); if (hasError()) { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); @@ -345,10 +546,24 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); if (hasTranscript()) { hash = (37 * hash) + TRANSCRIPT_FIELD_NUMBER; hash = (53 * hash) + getTranscript().hashCode(); } + switch (resultCase_) { + case 5: + hash = (37 * hash) + CLOUD_STORAGE_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getCloudStorageResult().hashCode(); + break; + case 6: + hash = (37 * hash) + INLINE_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getInlineResult().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -488,7 +703,6 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - uri_ = ""; error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); @@ -499,11 +713,20 @@ public Builder clear() { metadataBuilder_.dispose(); metadataBuilder_ = null; } + if (cloudStorageResultBuilder_ != null) { + cloudStorageResultBuilder_.clear(); + } + if (inlineResultBuilder_ != null) { + inlineResultBuilder_.clear(); + } + uri_ = ""; transcript_ = null; if (transcriptBuilder_ != null) { transcriptBuilder_.dispose(); transcriptBuilder_ = null; } + resultCase_ = 0; + result_ = null; return this; } @@ -534,6 +757,7 @@ public com.google.cloud.speech.v2.BatchRecognizeFileResult buildPartial() { if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -541,19 +765,30 @@ public com.google.cloud.speech.v2.BatchRecognizeFileResult buildPartial() { private void buildPartial0(com.google.cloud.speech.v2.BatchRecognizeFileResult result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { result.transcript_ = transcriptBuilder_ == null ? transcript_ : transcriptBuilder_.build(); } } + private void buildPartialOneofs(com.google.cloud.speech.v2.BatchRecognizeFileResult result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 5 && cloudStorageResultBuilder_ != null) { + result.result_ = cloudStorageResultBuilder_.build(); + } + if (resultCase_ == 6 && inlineResultBuilder_ != null) { + result.result_ = inlineResultBuilder_.build(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -600,20 +835,36 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.speech.v2.BatchRecognizeFileResult other) { if (other == com.google.cloud.speech.v2.BatchRecognizeFileResult.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } if (other.hasError()) { mergeError(other.getError()); } if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000010; + onChanged(); + } if (other.hasTranscript()) { mergeTranscript(other.getTranscript()); } + switch (other.getResultCase()) { + case CLOUD_STORAGE_RESULT: + { + mergeCloudStorageResult(other.getCloudStorageResult()); + break; + } + case INLINE_RESULT: + { + mergeInlineResult(other.getInlineResult()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -643,27 +894,40 @@ public Builder mergeFrom( case 10: { uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000010; break; } // case 10 case 18: { input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; break; } // case 18 case 26: { input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; break; } // case 26 case 34: { input.readMessage(getTranscriptFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; break; } // case 34 + case 42: + { + input.readMessage( + getCloudStorageResultFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage(getInlineResultFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 6; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -681,131 +945,39 @@ public Builder mergeFrom( return this; } + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + private int bitField0_; - private java.lang.Object uri_ = ""; + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; /** * * *
-     * The Cloud Storage URI to which recognition results were written.
+     * Error if one was encountered.
      * 
* - * string uri = 1; + * .google.rpc.Status error = 2; * - * @return The uri. + * @return Whether the error field is set. */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The Cloud Storage URI to which recognition results were written.
-     * 
- * - * string uri = 1; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The Cloud Storage URI to which recognition results were written.
-     * 
- * - * string uri = 1; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The Cloud Storage URI to which recognition results were written.
-     * 
- * - * string uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The Cloud Storage URI to which recognition results were written.
-     * 
- * - * string uri = 1; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.rpc.Status error_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - errorBuilder_; - /** - * - * - *
-     * Error if one was encountered.
-     * 
- * - * .google.rpc.Status error = 2; - * - * @return Whether the error field is set. - */ - public boolean hasError() { - return ((bitField0_ & 0x00000002) != 0); + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -843,7 +1015,7 @@ public Builder setError(com.google.rpc.Status value) { } else { errorBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -862,7 +1034,7 @@ public Builder setError(com.google.rpc.Status.Builder builderForValue) { } else { errorBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -877,7 +1049,7 @@ public Builder setError(com.google.rpc.Status.Builder builderForValue) { */ public Builder mergeError(com.google.rpc.Status value) { if (errorBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000001) != 0) && error_ != null && error_ != com.google.rpc.Status.getDefaultInstance()) { getErrorBuilder().mergeFrom(value); @@ -887,7 +1059,7 @@ public Builder mergeError(com.google.rpc.Status value) { } else { errorBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -901,7 +1073,7 @@ public Builder mergeError(com.google.rpc.Status value) { * .google.rpc.Status error = 2; */ public Builder clearError() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); @@ -920,7 +1092,7 @@ public Builder clearError() { * .google.rpc.Status error = 2; */ public com.google.rpc.Status.Builder getErrorBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return getErrorFieldBuilder().getBuilder(); } @@ -975,7 +1147,7 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { * @return Whether the metadata field is set. */ public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3; @@ -1001,7 +1173,7 @@ public Builder setMetadata(com.google.cloud.speech.v2.RecognitionResponseMetadat } else { metadataBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1013,14 +1185,14 @@ public Builder setMetadata( } else { metadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3; */ public Builder mergeMetadata(com.google.cloud.speech.v2.RecognitionResponseMetadata value) { if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000002) != 0) && metadata_ != null && metadata_ != com.google.cloud.speech.v2.RecognitionResponseMetadata.getDefaultInstance()) { @@ -1031,13 +1203,13 @@ public Builder mergeMetadata(com.google.cloud.speech.v2.RecognitionResponseMetad } else { metadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3; */ public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); metadata_ = null; if (metadataBuilder_ != null) { metadataBuilder_.dispose(); @@ -1048,7 +1220,7 @@ public Builder clearMetadata() { } /** .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3; */ public com.google.cloud.speech.v2.RecognitionResponseMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return getMetadataFieldBuilder().getBuilder(); } @@ -1080,6 +1252,608 @@ public com.google.cloud.speech.v2.RecognitionResponseMetadataOrBuilder getMetada return metadataBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.CloudStorageResult, + com.google.cloud.speech.v2.CloudStorageResult.Builder, + com.google.cloud.speech.v2.CloudStorageResultOrBuilder> + cloudStorageResultBuilder_; + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + * + * @return Whether the cloudStorageResult field is set. + */ + @java.lang.Override + public boolean hasCloudStorageResult() { + return resultCase_ == 5; + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + * + * @return The cloudStorageResult. + */ + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResult getCloudStorageResult() { + if (cloudStorageResultBuilder_ == null) { + if (resultCase_ == 5) { + return (com.google.cloud.speech.v2.CloudStorageResult) result_; + } + return com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } else { + if (resultCase_ == 5) { + return cloudStorageResultBuilder_.getMessage(); + } + return com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + public Builder setCloudStorageResult(com.google.cloud.speech.v2.CloudStorageResult value) { + if (cloudStorageResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + cloudStorageResultBuilder_.setMessage(value); + } + resultCase_ = 5; + return this; + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + public Builder setCloudStorageResult( + com.google.cloud.speech.v2.CloudStorageResult.Builder builderForValue) { + if (cloudStorageResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + cloudStorageResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 5; + return this; + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + public Builder mergeCloudStorageResult(com.google.cloud.speech.v2.CloudStorageResult value) { + if (cloudStorageResultBuilder_ == null) { + if (resultCase_ == 5 + && result_ != com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance()) { + result_ = + com.google.cloud.speech.v2.CloudStorageResult.newBuilder( + (com.google.cloud.speech.v2.CloudStorageResult) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 5) { + cloudStorageResultBuilder_.mergeFrom(value); + } else { + cloudStorageResultBuilder_.setMessage(value); + } + } + resultCase_ = 5; + return this; + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + public Builder clearCloudStorageResult() { + if (cloudStorageResultBuilder_ == null) { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 5) { + resultCase_ = 0; + result_ = null; + } + cloudStorageResultBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + public com.google.cloud.speech.v2.CloudStorageResult.Builder getCloudStorageResultBuilder() { + return getCloudStorageResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResultOrBuilder getCloudStorageResultOrBuilder() { + if ((resultCase_ == 5) && (cloudStorageResultBuilder_ != null)) { + return cloudStorageResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 5) { + return (com.google.cloud.speech.v2.CloudStorageResult) result_; + } + return com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * Recognition results written to Cloud Storage. This is
+     * populated only when
+     * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.CloudStorageResult, + com.google.cloud.speech.v2.CloudStorageResult.Builder, + com.google.cloud.speech.v2.CloudStorageResultOrBuilder> + getCloudStorageResultFieldBuilder() { + if (cloudStorageResultBuilder_ == null) { + if (!(resultCase_ == 5)) { + result_ = com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } + cloudStorageResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.CloudStorageResult, + com.google.cloud.speech.v2.CloudStorageResult.Builder, + com.google.cloud.speech.v2.CloudStorageResultOrBuilder>( + (com.google.cloud.speech.v2.CloudStorageResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 5; + onChanged(); + return cloudStorageResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.InlineResult, + com.google.cloud.speech.v2.InlineResult.Builder, + com.google.cloud.speech.v2.InlineResultOrBuilder> + inlineResultBuilder_; + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + * + * @return Whether the inlineResult field is set. + */ + @java.lang.Override + public boolean hasInlineResult() { + return resultCase_ == 6; + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + * + * @return The inlineResult. + */ + @java.lang.Override + public com.google.cloud.speech.v2.InlineResult getInlineResult() { + if (inlineResultBuilder_ == null) { + if (resultCase_ == 6) { + return (com.google.cloud.speech.v2.InlineResult) result_; + } + return com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); + } else { + if (resultCase_ == 6) { + return inlineResultBuilder_.getMessage(); + } + return com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + public Builder setInlineResult(com.google.cloud.speech.v2.InlineResult value) { + if (inlineResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + inlineResultBuilder_.setMessage(value); + } + resultCase_ = 6; + return this; + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + public Builder setInlineResult( + com.google.cloud.speech.v2.InlineResult.Builder builderForValue) { + if (inlineResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + inlineResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 6; + return this; + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + public Builder mergeInlineResult(com.google.cloud.speech.v2.InlineResult value) { + if (inlineResultBuilder_ == null) { + if (resultCase_ == 6 + && result_ != com.google.cloud.speech.v2.InlineResult.getDefaultInstance()) { + result_ = + com.google.cloud.speech.v2.InlineResult.newBuilder( + (com.google.cloud.speech.v2.InlineResult) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 6) { + inlineResultBuilder_.mergeFrom(value); + } else { + inlineResultBuilder_.setMessage(value); + } + } + resultCase_ = 6; + return this; + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + public Builder clearInlineResult() { + if (inlineResultBuilder_ == null) { + if (resultCase_ == 6) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 6) { + resultCase_ = 0; + result_ = null; + } + inlineResultBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + public com.google.cloud.speech.v2.InlineResult.Builder getInlineResultBuilder() { + return getInlineResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + @java.lang.Override + public com.google.cloud.speech.v2.InlineResultOrBuilder getInlineResultOrBuilder() { + if ((resultCase_ == 6) && (inlineResultBuilder_ != null)) { + return inlineResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 6) { + return (com.google.cloud.speech.v2.InlineResult) result_; + } + return com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * Recognition results. This is populated only when
+     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
+     * the
+     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * 
+ * + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.InlineResult, + com.google.cloud.speech.v2.InlineResult.Builder, + com.google.cloud.speech.v2.InlineResultOrBuilder> + getInlineResultFieldBuilder() { + if (inlineResultBuilder_ == null) { + if (!(resultCase_ == 6)) { + result_ = com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); + } + inlineResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.InlineResult, + com.google.cloud.speech.v2.InlineResult.Builder, + com.google.cloud.speech.v2.InlineResultOrBuilder>( + (com.google.cloud.speech.v2.InlineResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 6; + onChanged(); + return inlineResultBuilder_; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+     * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return The uri. + */ + @java.lang.Deprecated + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+     * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return The bytes for uri. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+     * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @param value The uri to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+     * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+     * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + private com.google.cloud.speech.v2.BatchRecognizeResults transcript_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.speech.v2.BatchRecognizeResults, @@ -1090,33 +1864,35 @@ public com.google.cloud.speech.v2.RecognitionResponseMetadataOrBuilder getMetada * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.transcript is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1357 * @return Whether the transcript field is set. */ + @java.lang.Deprecated public boolean hasTranscript() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.transcript is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1357 * @return The transcript. */ + @java.lang.Deprecated public com.google.cloud.speech.v2.BatchRecognizeResults getTranscript() { if (transcriptBuilder_ == null) { return transcript_ == null @@ -1130,14 +1906,13 @@ public com.google.cloud.speech.v2.BatchRecognizeResults getTranscript() { * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setTranscript(com.google.cloud.speech.v2.BatchRecognizeResults value) { if (transcriptBuilder_ == null) { if (value == null) { @@ -1147,7 +1922,7 @@ public Builder setTranscript(com.google.cloud.speech.v2.BatchRecognizeResults va } else { transcriptBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1155,14 +1930,13 @@ public Builder setTranscript(com.google.cloud.speech.v2.BatchRecognizeResults va * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setTranscript( com.google.cloud.speech.v2.BatchRecognizeResults.Builder builderForValue) { if (transcriptBuilder_ == null) { @@ -1170,7 +1944,7 @@ public Builder setTranscript( } else { transcriptBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1178,17 +1952,16 @@ public Builder setTranscript( * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeTranscript(com.google.cloud.speech.v2.BatchRecognizeResults value) { if (transcriptBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000020) != 0) && transcript_ != null && transcript_ != com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance()) { @@ -1199,7 +1972,7 @@ public Builder mergeTranscript(com.google.cloud.speech.v2.BatchRecognizeResults } else { transcriptBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1207,16 +1980,15 @@ public Builder mergeTranscript(com.google.cloud.speech.v2.BatchRecognizeResults * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearTranscript() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); transcript_ = null; if (transcriptBuilder_ != null) { transcriptBuilder_.dispose(); @@ -1229,16 +2001,15 @@ public Builder clearTranscript() { * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.speech.v2.BatchRecognizeResults.Builder getTranscriptBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return getTranscriptFieldBuilder().getBuilder(); } @@ -1246,14 +2017,13 @@ public com.google.cloud.speech.v2.BatchRecognizeResults.Builder getTranscriptBui * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOrBuilder() { if (transcriptBuilder_ != null) { return transcriptBuilder_.getMessageOrBuilder(); @@ -1267,13 +2037,11 @@ public com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOr * * *
-     * The transcript for the audio file. This is populated only when
-     * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
-     * the
-     * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+     * Deprecated. Use `inline_result.transcript` instead.
      * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.speech.v2.BatchRecognizeResults, diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResultOrBuilder.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResultOrBuilder.java index 4d1a1a0aa1c3..17ba9ddec5eb 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResultOrBuilder.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/BatchRecognizeFileResultOrBuilder.java @@ -23,31 +23,6 @@ public interface BatchRecognizeFileResultOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.speech.v2.BatchRecognizeFileResult) com.google.protobuf.MessageOrBuilder { - /** - * - * - *
-   * The Cloud Storage URI to which recognition results were written.
-   * 
- * - * string uri = 1; - * - * @return The uri. - */ - java.lang.String getUri(); - /** - * - * - *
-   * The Cloud Storage URI to which recognition results were written.
-   * 
- * - * string uri = 1; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); - /** * * @@ -102,43 +77,165 @@ public interface BatchRecognizeFileResultOrBuilder * * *
-   * The transcript for the audio file. This is populated only when
+   * Recognition results written to Cloud Storage. This is
+   * populated only when
+   * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + * + * @return Whether the cloudStorageResult field is set. + */ + boolean hasCloudStorageResult(); + /** + * + * + *
+   * Recognition results written to Cloud Storage. This is
+   * populated only when
+   * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + * + * @return The cloudStorageResult. + */ + com.google.cloud.speech.v2.CloudStorageResult getCloudStorageResult(); + /** + * + * + *
+   * Recognition results written to Cloud Storage. This is
+   * populated only when
+   * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
+   * the
+   * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
+   * 
+ * + * .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5; + */ + com.google.cloud.speech.v2.CloudStorageResultOrBuilder getCloudStorageResultOrBuilder(); + + /** + * + * + *
+   * Recognition results. This is populated only when
    * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
    * the
    * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
    * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.InlineResult inline_result = 6; * - * @return Whether the transcript field is set. + * @return Whether the inlineResult field is set. */ - boolean hasTranscript(); + boolean hasInlineResult(); /** * * *
-   * The transcript for the audio file. This is populated only when
+   * Recognition results. This is populated only when
    * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
    * the
    * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
    * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.InlineResult inline_result = 6; * - * @return The transcript. + * @return The inlineResult. */ - com.google.cloud.speech.v2.BatchRecognizeResults getTranscript(); + com.google.cloud.speech.v2.InlineResult getInlineResult(); /** * * *
-   * The transcript for the audio file. This is populated only when
+   * Recognition results. This is populated only when
    * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
    * the
    * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
    * 
* - * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4; + * .google.cloud.speech.v2.InlineResult inline_result = 6; + */ + com.google.cloud.speech.v2.InlineResultOrBuilder getInlineResultOrBuilder(); + + /** + * + * + *
+   * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+   * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return The uri. + */ + @java.lang.Deprecated + java.lang.String getUri(); + /** + * + * + *
+   * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
+   * 
+ * + * string uri = 1 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.uri is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1354 + * @return The bytes for uri. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Deprecated. Use `inline_result.transcript` instead.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.transcript is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1357 + * @return Whether the transcript field is set. + */ + @java.lang.Deprecated + boolean hasTranscript(); + /** + * + * + *
+   * Deprecated. Use `inline_result.transcript` instead.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + * + * @deprecated google.cloud.speech.v2.BatchRecognizeFileResult.transcript is deprecated. See + * google/cloud/speech/v2/cloud_speech.proto;l=1357 + * @return The transcript. */ + @java.lang.Deprecated + com.google.cloud.speech.v2.BatchRecognizeResults getTranscript(); + /** + * + * + *
+   * Deprecated. Use `inline_result.transcript` instead.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true]; + */ + @java.lang.Deprecated com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOrBuilder(); + + com.google.cloud.speech.v2.BatchRecognizeFileResult.ResultCase getResultCase(); } diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudSpeechProto.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudSpeechProto.java index 03e92b0be027..cc39ed7a02e4 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudSpeechProto.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudSpeechProto.java @@ -83,6 +83,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_speech_v2_RecognitionFeatures_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_speech_v2_RecognitionFeatures_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v2_TranscriptNormalization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_speech_v2_SpeechAdaptation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -163,6 +171,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_speech_v2_BatchRecognizeResults_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_speech_v2_BatchRecognizeResults_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v2_CloudStorageResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v2_CloudStorageResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v2_InlineResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v2_InlineResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_speech_v2_BatchRecognizeFileResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -412,371 +428,385 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "onConfig\022\030\n\020max_alternatives\030\020 \001(\005\"\\\n\020Mu" + "ltiChannelMode\022\"\n\036MULTI_CHANNEL_MODE_UNS" + "PECIFIED\020\000\022$\n SEPARATE_RECOGNITION_PER_C" - + "HANNEL\020\001\"\277\002\n\020SpeechAdaptation\022Q\n\013phrase_" - + "sets\030\001 \003(\0132<.google.cloud.speech.v2.Spee" - + "chAdaptation.AdaptationPhraseSet\022;\n\016cust" - + "om_classes\030\002 \003(\0132#.google.cloud.speech.v" - + "2.CustomClass\032\232\001\n\023AdaptationPhraseSet\022:\n" - + "\nphrase_set\030\001 \001(\tB$\372A!\n\037speech.googleapi" - + "s.com/PhraseSetH\000\022>\n\021inline_phrase_set\030\002" - + " \001(\0132!.google.cloud.speech.v2.PhraseSetH" - + "\000B\007\n\005value\"\374\002\n\021RecognitionConfig\022P\n\024auto" - + "_decoding_config\030\007 \001(\01320.google.cloud.sp" - + "eech.v2.AutoDetectDecodingConfigH\000\022R\n\030ex" - + "plicit_decoding_config\030\010 \001(\0132..google.cl" - + "oud.speech.v2.ExplicitDecodingConfigH\000\022\023" - + "\n\005model\030\t \001(\tB\004\342A\001\001\022\034\n\016language_codes\030\n " - + "\003(\tB\004\342A\001\001\022=\n\010features\030\002 \001(\0132+.google.clo" - + "ud.speech.v2.RecognitionFeatures\022<\n\nadap" - + "tation\030\006 \001(\0132(.google.cloud.speech.v2.Sp" - + "eechAdaptationB\021\n\017decoding_config\"\357\001\n\020Re" - + "cognizeRequest\022=\n\nrecognizer\030\003 \001(\tB)\342A\001\002" - + "\372A\"\n speech.googleapis.com/Recognizer\0229\n" - + "\006config\030\001 \001(\0132).google.cloud.speech.v2.R" - + "ecognitionConfig\022/\n\013config_mask\030\010 \001(\0132\032." - + "google.protobuf.FieldMask\022\021\n\007content\030\005 \001" - + "(\014H\000\022\r\n\003uri\030\006 \001(\tH\000B\016\n\014audio_source\"W\n\033R" - + "ecognitionResponseMetadata\0228\n\025total_bill" - + "ed_duration\030\006 \001(\0132\031.google.protobuf.Dura" - + "tion\"w\n\034SpeechRecognitionAlternative\022\022\n\n" - + "transcript\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\022/\n\005" - + "words\030\003 \003(\0132 .google.cloud.speech.v2.Wor" - + "dInfo\"\243\001\n\010WordInfo\022/\n\014start_offset\030\001 \001(\013" - + "2\031.google.protobuf.Duration\022-\n\nend_offse" - + "t\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\025\n\rspeaker_" - + "label\030\006 \001(\t\"\315\001\n\027SpeechRecognitionResult\022" - + "J\n\014alternatives\030\001 \003(\01324.google.cloud.spe" - + "ech.v2.SpeechRecognitionAlternative\022\023\n\013c" - + "hannel_tag\030\002 \001(\005\0224\n\021result_end_offset\030\004 " - + "\001(\0132\031.google.protobuf.Duration\022\033\n\rlangua" - + "ge_code\030\005 \001(\tB\004\342A\001\003\"\234\001\n\021RecognizeRespons" - + "e\022@\n\007results\030\003 \003(\0132/.google.cloud.speech" - + ".v2.SpeechRecognitionResult\022E\n\010metadata\030" - + "\002 \001(\01323.google.cloud.speech.v2.Recogniti" - + "onResponseMetadata\"\321\002\n\034StreamingRecognit" - + "ionFeatures\022$\n\034enable_voice_activity_eve" - + "nts\030\001 \001(\010\022\027\n\017interim_results\030\002 \001(\010\022i\n\026vo" - + "ice_activity_timeout\030\003 \001(\0132I.google.clou" + + "HANNEL\020\001\"\243\001\n\027TranscriptNormalization\022F\n\007" + + "entries\030\001 \003(\01325.google.cloud.speech.v2.T" + + "ranscriptNormalization.Entry\032@\n\005Entry\022\016\n" + + "\006search\030\001 \001(\t\022\017\n\007replace\030\002 \001(\t\022\026\n\016case_s" + + "ensitive\030\003 \001(\010\"\277\002\n\020SpeechAdaptation\022Q\n\013p" + + "hrase_sets\030\001 \003(\0132<.google.cloud.speech.v" + + "2.SpeechAdaptation.AdaptationPhraseSet\022;" + + "\n\016custom_classes\030\002 \003(\0132#.google.cloud.sp" + + "eech.v2.CustomClass\032\232\001\n\023AdaptationPhrase" + + "Set\022:\n\nphrase_set\030\001 \001(\tB$\372A!\n\037speech.goo" + + "gleapis.com/PhraseSetH\000\022>\n\021inline_phrase" + + "_set\030\002 \001(\0132!.google.cloud.speech.v2.Phra" + + "seSetH\000B\007\n\005value\"\325\003\n\021RecognitionConfig\022P" + + "\n\024auto_decoding_config\030\007 \001(\01320.google.cl" + + "oud.speech.v2.AutoDetectDecodingConfigH\000" + + "\022R\n\030explicit_decoding_config\030\010 \001(\0132..goo" + + "gle.cloud.speech.v2.ExplicitDecodingConf" + + "igH\000\022\023\n\005model\030\t \001(\tB\004\342A\001\001\022\034\n\016language_co" + + "des\030\n \003(\tB\004\342A\001\001\022=\n\010features\030\002 \001(\0132+.goog" + + "le.cloud.speech.v2.RecognitionFeatures\022<" + + "\n\nadaptation\030\006 \001(\0132(.google.cloud.speech" + + ".v2.SpeechAdaptation\022W\n\030transcript_norma" + + "lization\030\013 \001(\0132/.google.cloud.speech.v2." + + "TranscriptNormalizationB\004\342A\001\001B\021\n\017decodin" + + "g_config\"\357\001\n\020RecognizeRequest\022=\n\nrecogni" + + "zer\030\003 \001(\tB)\342A\001\002\372A\"\n speech.googleapis.co" + + "m/Recognizer\0229\n\006config\030\001 \001(\0132).google.cl" + + "oud.speech.v2.RecognitionConfig\022/\n\013confi" + + "g_mask\030\010 \001(\0132\032.google.protobuf.FieldMask" + + "\022\021\n\007content\030\005 \001(\014H\000\022\r\n\003uri\030\006 \001(\tH\000B\016\n\014au" + + "dio_source\"W\n\033RecognitionResponseMetadat" + + "a\0228\n\025total_billed_duration\030\006 \001(\0132\031.googl" + + "e.protobuf.Duration\"w\n\034SpeechRecognition" + + "Alternative\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfi" + + "dence\030\002 \001(\002\022/\n\005words\030\003 \003(\0132 .google.clou" + + "d.speech.v2.WordInfo\"\243\001\n\010WordInfo\022/\n\014sta" + + "rt_offset\030\001 \001(\0132\031.google.protobuf.Durati" + + "on\022-\n\nend_offset\030\002 \001(\0132\031.google.protobuf" + + ".Duration\022\014\n\004word\030\003 \001(\t\022\022\n\nconfidence\030\004 " + + "\001(\002\022\025\n\rspeaker_label\030\006 \001(\t\"\315\001\n\027SpeechRec" + + "ognitionResult\022J\n\014alternatives\030\001 \003(\01324.g" + + "oogle.cloud.speech.v2.SpeechRecognitionA" + + "lternative\022\023\n\013channel_tag\030\002 \001(\005\0224\n\021resul" + + "t_end_offset\030\004 \001(\0132\031.google.protobuf.Dur" + + "ation\022\033\n\rlanguage_code\030\005 \001(\tB\004\342A\001\003\"\234\001\n\021R" + + "ecognizeResponse\022@\n\007results\030\003 \003(\0132/.goog" + + "le.cloud.speech.v2.SpeechRecognitionResu" + + "lt\022E\n\010metadata\030\002 \001(\01323.google.cloud.spee" + + "ch.v2.RecognitionResponseMetadata\"\321\002\n\034St" + + "reamingRecognitionFeatures\022$\n\034enable_voi" + + "ce_activity_events\030\001 \001(\010\022\027\n\017interim_resu" + + "lts\030\002 \001(\010\022i\n\026voice_activity_timeout\030\003 \001(" + + "\0132I.google.cloud.speech.v2.StreamingReco" + + "gnitionFeatures.VoiceActivityTimeout\032\206\001\n" + + "\024VoiceActivityTimeout\0227\n\024speech_start_ti" + + "meout\030\001 \001(\0132\031.google.protobuf.Duration\0225" + + "\n\022speech_end_timeout\030\002 \001(\0132\031.google.prot" + + "obuf.Duration\"\340\001\n\032StreamingRecognitionCo" + + "nfig\022?\n\006config\030\001 \001(\0132).google.cloud.spee" + + "ch.v2.RecognitionConfigB\004\342A\001\002\022/\n\013config_" + + "mask\030\003 \001(\0132\032.google.protobuf.FieldMask\022P" + + "\n\022streaming_features\030\002 \001(\01324.google.clou" + "d.speech.v2.StreamingRecognitionFeatures" - + ".VoiceActivityTimeout\032\206\001\n\024VoiceActivityT" - + "imeout\0227\n\024speech_start_timeout\030\001 \001(\0132\031.g" - + "oogle.protobuf.Duration\0225\n\022speech_end_ti" - + "meout\030\002 \001(\0132\031.google.protobuf.Duration\"\340" - + "\001\n\032StreamingRecognitionConfig\022?\n\006config\030" - + "\001 \001(\0132).google.cloud.speech.v2.Recogniti" - + "onConfigB\004\342A\001\002\022/\n\013config_mask\030\003 \001(\0132\032.go" - + "ogle.protobuf.FieldMask\022P\n\022streaming_fea" - + "tures\030\002 \001(\01324.google.cloud.speech.v2.Str" - + "eamingRecognitionFeatures\"\320\001\n\031StreamingR" - + "ecognizeRequest\022=\n\nrecognizer\030\003 \001(\tB)\342A\001" - + "\002\372A\"\n speech.googleapis.com/Recognizer\022N" - + "\n\020streaming_config\030\006 \001(\01322.google.cloud." - + "speech.v2.StreamingRecognitionConfigH\000\022\017" - + "\n\005audio\030\005 \001(\014H\000B\023\n\021streaming_request\"\211\004\n" - + "\025BatchRecognizeRequest\022=\n\nrecognizer\030\001 \001" - + "(\tB)\342A\001\002\372A\"\n speech.googleapis.com/Recog" - + "nizer\0229\n\006config\030\004 \001(\0132).google.cloud.spe" - + "ech.v2.RecognitionConfig\022/\n\013config_mask\030" - + "\005 \001(\0132\032.google.protobuf.FieldMask\022A\n\005fil" - + "es\030\003 \003(\01322.google.cloud.speech.v2.BatchR" - + "ecognizeFileMetadata\022R\n\031recognition_outp" - + "ut_config\030\006 \001(\0132/.google.cloud.speech.v2" - + ".RecognitionOutputConfig\022]\n\023processing_s" - + "trategy\030\007 \001(\0162@.google.cloud.speech.v2.B" - + "atchRecognizeRequest.ProcessingStrategy\"" - + "O\n\022ProcessingStrategy\022#\n\037PROCESSING_STRA" - + "TEGY_UNSPECIFIED\020\000\022\024\n\020DYNAMIC_BATCHING\020\001" - + "\"\036\n\017GcsOutputConfig\022\013\n\003uri\030\001 \001(\t\"\024\n\022Inli" - + "neOutputConfig\"\267\001\n\027RecognitionOutputConf" - + "ig\022D\n\021gcs_output_config\030\001 \001(\0132\'.google.c" - + "loud.speech.v2.GcsOutputConfigH\000\022L\n\026inli" - + "ne_response_config\030\002 \001(\0132*.google.cloud." - + "speech.v2.InlineOutputConfigH\000B\010\n\006output" - + "\"\202\002\n\026BatchRecognizeResponse\022L\n\007results\030\001" - + " \003(\0132;.google.cloud.speech.v2.BatchRecog" - + "nizeResponse.ResultsEntry\0228\n\025total_bille" - + "d_duration\030\002 \001(\0132\031.google.protobuf.Durat" - + "ion\032`\n\014ResultsEntry\022\013\n\003key\030\001 \001(\t\022?\n\005valu" - + "e\030\002 \001(\01320.google.cloud.speech.v2.BatchRe" - + "cognizeFileResult:\0028\001\"\240\001\n\025BatchRecognize" - + "Results\022@\n\007results\030\001 \003(\0132/.google.cloud." - + "speech.v2.SpeechRecognitionResult\022E\n\010met" - + "adata\030\002 \001(\01323.google.cloud.speech.v2.Rec" - + "ognitionResponseMetadata\"\324\001\n\030BatchRecogn" - + "izeFileResult\022\013\n\003uri\030\001 \001(\t\022!\n\005error\030\002 \001(" + + "\"\320\001\n\031StreamingRecognizeRequest\022=\n\nrecogn" + + "izer\030\003 \001(\tB)\342A\001\002\372A\"\n speech.googleapis.c" + + "om/Recognizer\022N\n\020streaming_config\030\006 \001(\0132" + + "2.google.cloud.speech.v2.StreamingRecogn" + + "itionConfigH\000\022\017\n\005audio\030\005 \001(\014H\000B\023\n\021stream" + + "ing_request\"\211\004\n\025BatchRecognizeRequest\022=\n" + + "\nrecognizer\030\001 \001(\tB)\342A\001\002\372A\"\n speech.googl" + + "eapis.com/Recognizer\0229\n\006config\030\004 \001(\0132).g" + + "oogle.cloud.speech.v2.RecognitionConfig\022" + + "/\n\013config_mask\030\005 \001(\0132\032.google.protobuf.F" + + "ieldMask\022A\n\005files\030\003 \003(\01322.google.cloud.s" + + "peech.v2.BatchRecognizeFileMetadata\022R\n\031r" + + "ecognition_output_config\030\006 \001(\0132/.google." + + "cloud.speech.v2.RecognitionOutputConfig\022" + + "]\n\023processing_strategy\030\007 \001(\0162@.google.cl" + + "oud.speech.v2.BatchRecognizeRequest.Proc" + + "essingStrategy\"O\n\022ProcessingStrategy\022#\n\037" + + "PROCESSING_STRATEGY_UNSPECIFIED\020\000\022\024\n\020DYN" + + "AMIC_BATCHING\020\001\"\036\n\017GcsOutputConfig\022\013\n\003ur" + + "i\030\001 \001(\t\"\024\n\022InlineOutputConfig\"\267\001\n\027Recogn" + + "itionOutputConfig\022D\n\021gcs_output_config\030\001" + + " \001(\0132\'.google.cloud.speech.v2.GcsOutputC" + + "onfigH\000\022L\n\026inline_response_config\030\002 \001(\0132" + + "*.google.cloud.speech.v2.InlineOutputCon" + + "figH\000B\010\n\006output\"\202\002\n\026BatchRecognizeRespon" + + "se\022L\n\007results\030\001 \003(\0132;.google.cloud.speec" + + "h.v2.BatchRecognizeResponse.ResultsEntry" + + "\0228\n\025total_billed_duration\030\002 \001(\0132\031.google" + + ".protobuf.Duration\032`\n\014ResultsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022?\n\005value\030\002 \001(\01320.google.cloud.sp" + + "eech.v2.BatchRecognizeFileResult:\0028\001\"\240\001\n" + + "\025BatchRecognizeResults\022@\n\007results\030\001 \003(\0132" + + "/.google.cloud.speech.v2.SpeechRecogniti" + + "onResult\022E\n\010metadata\030\002 \001(\01323.google.clou" + + "d.speech.v2.RecognitionResponseMetadata\"" + + "!\n\022CloudStorageResult\022\013\n\003uri\030\001 \001(\t\"Q\n\014In" + + "lineResult\022A\n\ntranscript\030\001 \001(\0132-.google." + + "cloud.speech.v2.BatchRecognizeResults\"\361\002" + + "\n\030BatchRecognizeFileResult\022!\n\005error\030\002 \001(" + "\0132\022.google.rpc.Status\022E\n\010metadata\030\003 \001(\0132" + "3.google.cloud.speech.v2.RecognitionResp" - + "onseMetadata\022A\n\ntranscript\030\004 \001(\0132-.googl" - + "e.cloud.speech.v2.BatchRecognizeResults\"" - + "o\n#BatchRecognizeTranscriptionMetadata\022\030" - + "\n\020progress_percent\030\001 \001(\005\022!\n\005error\030\002 \001(\0132" - + "\022.google.rpc.Status\022\013\n\003uri\030\003 \001(\t\"\376\001\n\026Bat" - + "chRecognizeMetadata\022i\n\026transcription_met" - + "adata\030\001 \003(\0132I.google.cloud.speech.v2.Bat" - + "chRecognizeMetadata.TranscriptionMetadat" - + "aEntry\032y\n\032TranscriptionMetadataEntry\022\013\n\003" - + "key\030\001 \001(\t\022J\n\005value\030\002 \001(\0132;.google.cloud." - + "speech.v2.BatchRecognizeTranscriptionMet" - + "adata:\0028\001\"\247\001\n\032BatchRecognizeFileMetadata" - + "\022\r\n\003uri\030\001 \001(\tH\000\0229\n\006config\030\004 \001(\0132).google" - + ".cloud.speech.v2.RecognitionConfig\022/\n\013co" - + "nfig_mask\030\005 \001(\0132\032.google.protobuf.FieldM" - + "askB\016\n\014audio_source\"\365\001\n\032StreamingRecogni" - + "tionResult\022J\n\014alternatives\030\001 \003(\01324.googl" - + "e.cloud.speech.v2.SpeechRecognitionAlter" - + "native\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstability\030\003 " - + "\001(\002\0224\n\021result_end_offset\030\004 \001(\0132\031.google." - + "protobuf.Duration\022\023\n\013channel_tag\030\005 \001(\005\022\033" - + "\n\rlanguage_code\030\006 \001(\tB\004\342A\001\003\"\307\003\n\032Streamin" - + "gRecognizeResponse\022C\n\007results\030\006 \003(\01322.go" - + "ogle.cloud.speech.v2.StreamingRecognitio" - + "nResult\022]\n\021speech_event_type\030\003 \001(\0162B.goo" - + "gle.cloud.speech.v2.StreamingRecognizeRe" - + "sponse.SpeechEventType\0226\n\023speech_event_o" - + "ffset\030\007 \001(\0132\031.google.protobuf.Duration\022E" - + "\n\010metadata\030\005 \001(\01323.google.cloud.speech.v" - + "2.RecognitionResponseMetadata\"\205\001\n\017Speech" - + "EventType\022!\n\035SPEECH_EVENT_TYPE_UNSPECIFI" - + "ED\020\000\022\033\n\027END_OF_SINGLE_UTTERANCE\020\001\022\031\n\025SPE" - + "ECH_ACTIVITY_BEGIN\020\002\022\027\n\023SPEECH_ACTIVITY_" - + "END\020\003\"\350\001\n\006Config\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022@\n\014" - + "kms_key_name\030\002 \001(\tB*\342A\001\001\372A#\n!cloudkms.go" - + "ogleapis.com/CryptoKey\0225\n\013update_time\030\003 " - + "\001(\0132\032.google.protobuf.TimestampB\004\342A\001\003:Q\352" - + "AN\n\034speech.googleapis.com/Config\022.projec" - + "ts/{project}/locations/{location}/config" - + "\"G\n\020GetConfigRequest\0223\n\004name\030\001 \001(\tB%\342A\001\002" - + "\372A\036\n\034speech.googleapis.com/Config\"|\n\023Upd" - + "ateConfigRequest\0224\n\006config\030\001 \001(\0132\036.googl" - + "e.cloud.speech.v2.ConfigB\004\342A\001\002\022/\n\013update" - + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"" - + "\253\007\n\013CustomClass\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\021\n\003u" - + "id\030\002 \001(\tB\004\342A\001\003\022\024\n\014display_name\030\004 \001(\t\022<\n\005" - + "items\030\005 \003(\0132-.google.cloud.speech.v2.Cus" - + "tomClass.ClassItem\022>\n\005state\030\017 \001(\0162).goog" - + "le.cloud.speech.v2.CustomClass.StateB\004\342A" + + "onseMetadata\022J\n\024cloud_storage_result\030\005 \001" + + "(\0132*.google.cloud.speech.v2.CloudStorage" + + "ResultH\000\022=\n\rinline_result\030\006 \001(\0132$.google" + + ".cloud.speech.v2.InlineResultH\000\022\017\n\003uri\030\001" + + " \001(\tB\002\030\001\022E\n\ntranscript\030\004 \001(\0132-.google.cl" + + "oud.speech.v2.BatchRecognizeResultsB\002\030\001B" + + "\010\n\006result\"o\n#BatchRecognizeTranscription" + + "Metadata\022\030\n\020progress_percent\030\001 \001(\005\022!\n\005er" + + "ror\030\002 \001(\0132\022.google.rpc.Status\022\013\n\003uri\030\003 \001" + + "(\t\"\376\001\n\026BatchRecognizeMetadata\022i\n\026transcr" + + "iption_metadata\030\001 \003(\0132I.google.cloud.spe" + + "ech.v2.BatchRecognizeMetadata.Transcript" + + "ionMetadataEntry\032y\n\032TranscriptionMetadat" + + "aEntry\022\013\n\003key\030\001 \001(\t\022J\n\005value\030\002 \001(\0132;.goo" + + "gle.cloud.speech.v2.BatchRecognizeTransc" + + "riptionMetadata:\0028\001\"\247\001\n\032BatchRecognizeFi" + + "leMetadata\022\r\n\003uri\030\001 \001(\tH\000\0229\n\006config\030\004 \001(" + + "\0132).google.cloud.speech.v2.RecognitionCo" + + "nfig\022/\n\013config_mask\030\005 \001(\0132\032.google.proto" + + "buf.FieldMaskB\016\n\014audio_source\"\365\001\n\032Stream" + + "ingRecognitionResult\022J\n\014alternatives\030\001 \003" + + "(\01324.google.cloud.speech.v2.SpeechRecogn" + + "itionAlternative\022\020\n\010is_final\030\002 \001(\010\022\021\n\tst" + + "ability\030\003 \001(\002\0224\n\021result_end_offset\030\004 \001(\013" + + "2\031.google.protobuf.Duration\022\023\n\013channel_t" + + "ag\030\005 \001(\005\022\033\n\rlanguage_code\030\006 \001(\tB\004\342A\001\003\"\307\003" + + "\n\032StreamingRecognizeResponse\022C\n\007results\030" + + "\006 \003(\01322.google.cloud.speech.v2.Streaming" + + "RecognitionResult\022]\n\021speech_event_type\030\003" + + " \001(\0162B.google.cloud.speech.v2.StreamingR" + + "ecognizeResponse.SpeechEventType\0226\n\023spee" + + "ch_event_offset\030\007 \001(\0132\031.google.protobuf." + + "Duration\022E\n\010metadata\030\005 \001(\01323.google.clou" + + "d.speech.v2.RecognitionResponseMetadata\"" + + "\205\001\n\017SpeechEventType\022!\n\035SPEECH_EVENT_TYPE" + + "_UNSPECIFIED\020\000\022\033\n\027END_OF_SINGLE_UTTERANC" + + "E\020\001\022\031\n\025SPEECH_ACTIVITY_BEGIN\020\002\022\027\n\023SPEECH" + + "_ACTIVITY_END\020\003\"\350\001\n\006Config\022\022\n\004name\030\001 \001(\t" + + "B\004\342A\001\003\022@\n\014kms_key_name\030\002 \001(\tB*\342A\001\001\372A#\n!c" + + "loudkms.googleapis.com/CryptoKey\0225\n\013upda" + + "te_time\030\003 \001(\0132\032.google.protobuf.Timestam" + + "pB\004\342A\001\003:Q\352AN\n\034speech.googleapis.com/Conf" + + "ig\022.projects/{project}/locations/{locati" + + "on}/config\"G\n\020GetConfigRequest\0223\n\004name\030\001" + + " \001(\tB%\342A\001\002\372A\036\n\034speech.googleapis.com/Con" + + "fig\"|\n\023UpdateConfigRequest\0224\n\006config\030\001 \001" + + "(\0132\036.google.cloud.speech.v2.ConfigB\004\342A\001\002" + + "\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMask\"\253\007\n\013CustomClass\022\022\n\004name\030\001 \001(\tB" + + "\004\342A\001\003\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\022\024\n\014display_name" + + "\030\004 \001(\t\022<\n\005items\030\005 \003(\0132-.google.cloud.spe" + + "ech.v2.CustomClass.ClassItem\022>\n\005state\030\017 " + + "\001(\0162).google.cloud.speech.v2.CustomClass" + + ".StateB\004\342A\001\003\0225\n\013create_time\030\006 \001(\0132\032.goog" + + "le.protobuf.TimestampB\004\342A\001\003\0225\n\013update_ti" + + "me\030\007 \001(\0132\032.google.protobuf.TimestampB\004\342A" + + "\001\003\0225\n\013delete_time\030\010 \001(\0132\032.google.protobu" + + "f.TimestampB\004\342A\001\003\0225\n\013expire_time\030\t \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\022I\n\013anno" + + "tations\030\n \003(\01324.google.cloud.speech.v2.C" + + "ustomClass.AnnotationsEntry\022\022\n\004etag\030\013 \001(" + + "\tB\004\342A\001\003\022\031\n\013reconciling\030\014 \001(\010B\004\342A\001\003\022@\n\014km" + + "s_key_name\030\r \001(\tB*\342A\001\003\372A#\n!cloudkms.goog" + + "leapis.com/CryptoKey\022O\n\024kms_key_version_" + + "name\030\016 \001(\tB1\342A\001\003\372A*\n(cloudkms.googleapis" + + ".com/CryptoKeyVersion\032\032\n\tClassItem\022\r\n\005va" + + "lue\030\001 \001(\t\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"7\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\002\022\013\n\007DELETED\020\004:o" + + "\352Al\n!speech.googleapis.com/CustomClass\022D" + + "projects/{project}/locations/{location}/" + + "customClasses/{custom_class}R\001\001\"\266\007\n\tPhra" + + "seSet\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\021\n\003uid\030\002 \001(\tB\004" + + "\342A\001\003\0229\n\007phrases\030\003 \003(\0132(.google.cloud.spe" + + "ech.v2.PhraseSet.Phrase\022\r\n\005boost\030\004 \001(\002\022\024" + + "\n\014display_name\030\005 \001(\t\022<\n\005state\030\017 \001(\0162\'.go" + + "ogle.cloud.speech.v2.PhraseSet.StateB\004\342A" + "\001\003\0225\n\013create_time\030\006 \001(\0132\032.google.protobu" + "f.TimestampB\004\342A\001\003\0225\n\013update_time\030\007 \001(\0132\032" + ".google.protobuf.TimestampB\004\342A\001\003\0225\n\013dele" + "te_time\030\010 \001(\0132\032.google.protobuf.Timestam" + "pB\004\342A\001\003\0225\n\013expire_time\030\t \001(\0132\032.google.pr" - + "otobuf.TimestampB\004\342A\001\003\022I\n\013annotations\030\n " - + "\003(\01324.google.cloud.speech.v2.CustomClass" - + ".AnnotationsEntry\022\022\n\004etag\030\013 \001(\tB\004\342A\001\003\022\031\n" - + "\013reconciling\030\014 \001(\010B\004\342A\001\003\022@\n\014kms_key_name" - + "\030\r \001(\tB*\342A\001\003\372A#\n!cloudkms.googleapis.com" - + "/CryptoKey\022O\n\024kms_key_version_name\030\016 \001(\t" - + "B1\342A\001\003\372A*\n(cloudkms.googleapis.com/Crypt" - + "oKeyVersion\032\032\n\tClassItem\022\r\n\005value\030\001 \001(\t\032" - + "2\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"7\n\005State\022\025\n\021STATE_UNSPECIFIE" - + "D\020\000\022\n\n\006ACTIVE\020\002\022\013\n\007DELETED\020\004:o\352Al\n!speec" - + "h.googleapis.com/CustomClass\022Dprojects/{" - + "project}/locations/{location}/customClas" - + "ses/{custom_class}R\001\001\"\266\007\n\tPhraseSet\022\022\n\004n" - + "ame\030\001 \001(\tB\004\342A\001\003\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\0229\n\007ph" - + "rases\030\003 \003(\0132(.google.cloud.speech.v2.Phr" - + "aseSet.Phrase\022\r\n\005boost\030\004 \001(\002\022\024\n\014display_" - + "name\030\005 \001(\t\022<\n\005state\030\017 \001(\0162\'.google.cloud" - + ".speech.v2.PhraseSet.StateB\004\342A\001\003\0225\n\013crea" - + "te_time\030\006 \001(\0132\032.google.protobuf.Timestam" - + "pB\004\342A\001\003\0225\n\013update_time\030\007 \001(\0132\032.google.pr" - + "otobuf.TimestampB\004\342A\001\003\0225\n\013delete_time\030\010 " - + "\001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n" - + "\013expire_time\030\t \001(\0132\032.google.protobuf.Tim" - + "estampB\004\342A\001\003\022G\n\013annotations\030\n \003(\01322.goog" - + "le.cloud.speech.v2.PhraseSet.Annotations" - + "Entry\022\022\n\004etag\030\013 \001(\tB\004\342A\001\003\022\031\n\013reconciling" - + "\030\014 \001(\010B\004\342A\001\003\022@\n\014kms_key_name\030\r \001(\tB*\342A\001\003" - + "\372A#\n!cloudkms.googleapis.com/CryptoKey\022O" - + "\n\024kms_key_version_name\030\016 \001(\tB1\342A\001\003\372A*\n(c" - + "loudkms.googleapis.com/CryptoKeyVersion\032" - + "&\n\006Phrase\022\r\n\005value\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002\032" - + "2\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"7\n\005State\022\025\n\021STATE_UNSPECIFIE" - + "D\020\000\022\n\n\006ACTIVE\020\002\022\013\n\007DELETED\020\004:h\352Ae\n\037speec" - + "h.googleapis.com/PhraseSet\022?projects/{pr" - + "oject}/locations/{location}/phraseSets/{" - + "phrase_set}R\001\001\"\307\001\n\030CreateCustomClassRequ" + + "otobuf.TimestampB\004\342A\001\003\022G\n\013annotations\030\n " + + "\003(\01322.google.cloud.speech.v2.PhraseSet.A" + + "nnotationsEntry\022\022\n\004etag\030\013 \001(\tB\004\342A\001\003\022\031\n\013r" + + "econciling\030\014 \001(\010B\004\342A\001\003\022@\n\014kms_key_name\030\r" + + " \001(\tB*\342A\001\003\372A#\n!cloudkms.googleapis.com/C" + + "ryptoKey\022O\n\024kms_key_version_name\030\016 \001(\tB1" + + "\342A\001\003\372A*\n(cloudkms.googleapis.com/CryptoK" + + "eyVersion\032&\n\006Phrase\022\r\n\005value\030\001 \001(\t\022\r\n\005bo" + + "ost\030\002 \001(\002\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"7\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\002\022\013\n\007DELETED\020\004:h" + + "\352Ae\n\037speech.googleapis.com/PhraseSet\022?pr" + + "ojects/{project}/locations/{location}/ph" + + "raseSets/{phrase_set}R\001\001\"\307\001\n\030CreateCusto" + + "mClassRequest\022?\n\014custom_class\030\001 \001(\0132#.go" + + "ogle.cloud.speech.v2.CustomClassB\004\342A\001\002\022\025" + + "\n\rvalidate_only\030\002 \001(\010\022\027\n\017custom_class_id" + + "\030\003 \001(\t\022:\n\006parent\030\004 \001(\tB*\342A\001\002\372A#\022!speech." + + "googleapis.com/CustomClass\"\223\001\n\030ListCusto" + + "mClassesRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#" + + "\n!locations.googleapis.com/Location\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\024\n\014sh" + + "ow_deleted\030\004 \001(\010\"q\n\031ListCustomClassesRes" + + "ponse\022;\n\016custom_classes\030\001 \003(\0132#.google.c" + + "loud.speech.v2.CustomClass\022\027\n\017next_page_" + + "token\030\002 \001(\t\"Q\n\025GetCustomClassRequest\0228\n\004" + + "name\030\001 \001(\tB*\342A\001\002\372A#\n!speech.googleapis.c" + + "om/CustomClass\"\243\001\n\030UpdateCustomClassRequ" + "est\022?\n\014custom_class\030\001 \001(\0132#.google.cloud" - + ".speech.v2.CustomClassB\004\342A\001\002\022\025\n\rvalidate" - + "_only\030\002 \001(\010\022\027\n\017custom_class_id\030\003 \001(\t\022:\n\006" - + "parent\030\004 \001(\tB*\342A\001\002\372A#\022!speech.googleapis" - + ".com/CustomClass\"\223\001\n\030ListCustomClassesRe" - + "quest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!location" - + "s.googleapis.com/Location\022\021\n\tpage_size\030\002" - + " \001(\005\022\022\n\npage_token\030\003 \001(\t\022\024\n\014show_deleted" - + "\030\004 \001(\010\"q\n\031ListCustomClassesResponse\022;\n\016c" - + "ustom_classes\030\001 \003(\0132#.google.cloud.speec" - + "h.v2.CustomClass\022\027\n\017next_page_token\030\002 \001(" - + "\t\"Q\n\025GetCustomClassRequest\0228\n\004name\030\001 \001(\t" - + "B*\342A\001\002\372A#\n!speech.googleapis.com/CustomC" - + "lass\"\243\001\n\030UpdateCustomClassRequest\022?\n\014cus" - + "tom_class\030\001 \001(\0132#.google.cloud.speech.v2" - + ".CustomClassB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132" - + "\032.google.protobuf.FieldMask\022\025\n\rvalidate_" - + "only\030\004 \001(\010\"\220\001\n\030DeleteCustomClassRequest\022" - + "8\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!speech.googleapi" - + "s.com/CustomClass\022\025\n\rvalidate_only\030\002 \001(\010" - + "\022\025\n\rallow_missing\030\004 \001(\010\022\014\n\004etag\030\003 \001(\t\"{\n" - + "\032UndeleteCustomClassRequest\0228\n\004name\030\001 \001(" - + "\tB*\342A\001\002\372A#\n!speech.googleapis.com/Custom" - + "Class\022\025\n\rvalidate_only\030\003 \001(\010\022\014\n\004etag\030\004 \001" - + "(\t\"\275\001\n\026CreatePhraseSetRequest\022;\n\nphrase_" - + "set\030\001 \001(\0132!.google.cloud.speech.v2.Phras" - + "eSetB\004\342A\001\002\022\025\n\rvalidate_only\030\002 \001(\010\022\025\n\rphr" - + "ase_set_id\030\003 \001(\t\0228\n\006parent\030\004 \001(\tB(\342A\001\002\372A" - + "!\022\037speech.googleapis.com/PhraseSet\"\220\001\n\025L" - + "istPhraseSetsRequest\022:\n\006parent\030\001 \001(\tB*\342A" - + "\001\002\372A#\n!locations.googleapis.com/Location" - + "\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022" - + "\024\n\014show_deleted\030\004 \001(\010\"i\n\026ListPhraseSetsR" - + "esponse\0226\n\013phrase_sets\030\001 \003(\0132!.google.cl" - + "oud.speech.v2.PhraseSet\022\027\n\017next_page_tok" - + "en\030\002 \001(\t\"M\n\023GetPhraseSetRequest\0226\n\004name\030" - + "\001 \001(\tB(\342A\001\002\372A!\n\037speech.googleapis.com/Ph" - + "raseSet\"\235\001\n\026UpdatePhraseSetRequest\022;\n\nph" - + "rase_set\030\001 \001(\0132!.google.cloud.speech.v2." - + "PhraseSetB\004\342A\001\002\022/\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMask\022\025\n\rvalidate_onl" - + "y\030\004 \001(\010\"\214\001\n\026DeletePhraseSetRequest\0226\n\004na" - + "me\030\001 \001(\tB(\342A\001\002\372A!\n\037speech.googleapis.com" - + "/PhraseSet\022\025\n\rvalidate_only\030\002 \001(\010\022\025\n\rall" - + "ow_missing\030\004 \001(\010\022\014\n\004etag\030\003 \001(\t\"w\n\030Undele" - + "tePhraseSetRequest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A" - + "!\n\037speech.googleapis.com/PhraseSet\022\025\n\rva" - + "lidate_only\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t2\277%\n\006Spee" - + "ch\022\354\001\n\020CreateRecognizer\022/.google.cloud.s" - + "peech.v2.CreateRecognizerRequest\032\035.googl" - + "e.longrunning.Operation\"\207\001\312A\037\n\nRecognize" - + "r\022\021OperationMetadata\332A\037parent,recognizer" - + ",recognizer_id\202\323\344\223\002=\"//v2/{parent=projec" - + "ts/*/locations/*}/recognizers:\nrecognize" - + "r\022\264\001\n\017ListRecognizers\022..google.cloud.spe" - + "ech.v2.ListRecognizersRequest\032/.google.c" - + "loud.speech.v2.ListRecognizersResponse\"@" - + "\332A\006parent\202\323\344\223\0021\022//v2/{parent=projects/*/" - + "locations/*}/recognizers\022\241\001\n\rGetRecogniz" - + "er\022,.google.cloud.speech.v2.GetRecognize" - + "rRequest\032\".google.cloud.speech.v2.Recogn" - + "izer\">\332A\004name\202\323\344\223\0021\022//v2/{name=projects/" - + "*/locations/*/recognizers/*}\022\356\001\n\020UpdateR" - + "ecognizer\022/.google.cloud.speech.v2.Updat" - + "eRecognizerRequest\032\035.google.longrunning." - + "Operation\"\211\001\312A\037\n\nRecognizer\022\021OperationMe" - + "tadata\332A\026recognizer,update_mask\202\323\344\223\002H2:/" - + "v2/{recognizer.name=projects/*/locations" - + "/*/recognizers/*}:\nrecognizer\022\304\001\n\020Delete" - + "Recognizer\022/.google.cloud.speech.v2.Dele" - + "teRecognizerRequest\032\035.google.longrunning" - + ".Operation\"`\312A\037\n\nRecognizer\022\021OperationMe" - + "tadata\332A\004name\202\323\344\223\0021*//v2/{name=projects/" - + "*/locations/*/recognizers/*}\022\324\001\n\022Undelet" - + "eRecognizer\0221.google.cloud.speech.v2.Und" - + "eleteRecognizerRequest\032\035.google.longrunn" - + "ing.Operation\"l\312A\037\n\nRecognizer\022\021Operatio" - + "nMetadata\332A\004name\202\323\344\223\002=\"8/v2/{name=projec" - + "ts/*/locations/*/recognizers/*}:undelete" - + ":\001*\022\371\001\n\tRecognize\022(.google.cloud.speech." - + "v2.RecognizeRequest\032).google.cloud.speec" - + "h.v2.RecognizeResponse\"\226\001\332A%recognizer,c" - + "onfig,config_mask,content\332A!recognizer,c" - + "onfig,config_mask,uri\202\323\344\223\002D\"?/v2/{recogn" + + ".speech.v2.CustomClassB\004\342A\001\002\022/\n\013update_m" + + "ask\030\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n" + + "\rvalidate_only\030\004 \001(\010\"\220\001\n\030DeleteCustomCla" + + "ssRequest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!speech" + + ".googleapis.com/CustomClass\022\025\n\rvalidate_" + + "only\030\002 \001(\010\022\025\n\rallow_missing\030\004 \001(\010\022\014\n\004eta" + + "g\030\003 \001(\t\"{\n\032UndeleteCustomClassRequest\0228\n" + + "\004name\030\001 \001(\tB*\342A\001\002\372A#\n!speech.googleapis." + + "com/CustomClass\022\025\n\rvalidate_only\030\003 \001(\010\022\014" + + "\n\004etag\030\004 \001(\t\"\275\001\n\026CreatePhraseSetRequest\022" + + ";\n\nphrase_set\030\001 \001(\0132!.google.cloud.speec" + + "h.v2.PhraseSetB\004\342A\001\002\022\025\n\rvalidate_only\030\002 " + + "\001(\010\022\025\n\rphrase_set_id\030\003 \001(\t\0228\n\006parent\030\004 \001" + + "(\tB(\342A\001\002\372A!\022\037speech.googleapis.com/Phras" + + "eSet\"\220\001\n\025ListPhraseSetsRequest\022:\n\006parent" + + "\030\001 \001(\tB*\342A\001\002\372A#\n!locations.googleapis.co" + + "m/Location\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_to" + + "ken\030\003 \001(\t\022\024\n\014show_deleted\030\004 \001(\010\"i\n\026ListP" + + "hraseSetsResponse\0226\n\013phrase_sets\030\001 \003(\0132!" + + ".google.cloud.speech.v2.PhraseSet\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"M\n\023GetPhraseSetReques" + + "t\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037speech.googlea" + + "pis.com/PhraseSet\"\235\001\n\026UpdatePhraseSetReq" + + "uest\022;\n\nphrase_set\030\001 \001(\0132!.google.cloud." + + "speech.v2.PhraseSetB\004\342A\001\002\022/\n\013update_mask" + + "\030\002 \001(\0132\032.google.protobuf.FieldMask\022\025\n\rva" + + "lidate_only\030\004 \001(\010\"\214\001\n\026DeletePhraseSetReq" + + "uest\0226\n\004name\030\001 \001(\tB(\342A\001\002\372A!\n\037speech.goog" + + "leapis.com/PhraseSet\022\025\n\rvalidate_only\030\002 " + + "\001(\010\022\025\n\rallow_missing\030\004 \001(\010\022\014\n\004etag\030\003 \001(\t" + + "\"w\n\030UndeletePhraseSetRequest\0226\n\004name\030\001 \001" + + "(\tB(\342A\001\002\372A!\n\037speech.googleapis.com/Phras" + + "eSet\022\025\n\rvalidate_only\030\003 \001(\010\022\014\n\004etag\030\004 \001(" + + "\t2\277%\n\006Speech\022\354\001\n\020CreateRecognizer\022/.goog" + + "le.cloud.speech.v2.CreateRecognizerReque" + + "st\032\035.google.longrunning.Operation\"\207\001\312A\037\n" + + "\nRecognizer\022\021OperationMetadata\332A\037parent," + + "recognizer,recognizer_id\202\323\344\223\002=\"//v2/{par" + + "ent=projects/*/locations/*}/recognizers:" + + "\nrecognizer\022\264\001\n\017ListRecognizers\022..google" + + ".cloud.speech.v2.ListRecognizersRequest\032" + + "/.google.cloud.speech.v2.ListRecognizers" + + "Response\"@\332A\006parent\202\323\344\223\0021\022//v2/{parent=p" + + "rojects/*/locations/*}/recognizers\022\241\001\n\rG" + + "etRecognizer\022,.google.cloud.speech.v2.Ge" + + "tRecognizerRequest\032\".google.cloud.speech" + + ".v2.Recognizer\">\332A\004name\202\323\344\223\0021\022//v2/{name" + + "=projects/*/locations/*/recognizers/*}\022\356" + + "\001\n\020UpdateRecognizer\022/.google.cloud.speec" + + "h.v2.UpdateRecognizerRequest\032\035.google.lo" + + "ngrunning.Operation\"\211\001\312A\037\n\nRecognizer\022\021O" + + "perationMetadata\332A\026recognizer,update_mas" + + "k\202\323\344\223\002H2:/v2/{recognizer.name=projects/*" + + "/locations/*/recognizers/*}:\nrecognizer\022" + + "\304\001\n\020DeleteRecognizer\022/.google.cloud.spee" + + "ch.v2.DeleteRecognizerRequest\032\035.google.l" + + "ongrunning.Operation\"`\312A\037\n\nRecognizer\022\021O" + + "perationMetadata\332A\004name\202\323\344\223\0021*//v2/{name" + + "=projects/*/locations/*/recognizers/*}\022\324" + + "\001\n\022UndeleteRecognizer\0221.google.cloud.spe" + + "ech.v2.UndeleteRecognizerRequest\032\035.googl" + + "e.longrunning.Operation\"l\312A\037\n\nRecognizer" + + "\022\021OperationMetadata\332A\004name\202\323\344\223\002=\"8/v2/{n" + + "ame=projects/*/locations/*/recognizers/*" + + "}:undelete:\001*\022\371\001\n\tRecognize\022(.google.clo", + "ud.speech.v2.RecognizeRequest\032).google.c" + + "loud.speech.v2.RecognizeResponse\"\226\001\332A%re" + + "cognizer,config,config_mask,content\332A!re" + + "cognizer,config,config_mask,uri\202\323\344\223\002D\"?/" + + "v2/{recognizer=projects/*/locations/*/re" + + "cognizers/*}:recognize:\001*\022\201\001\n\022StreamingR" + + "ecognize\0221.google.cloud.speech.v2.Stream" + + "ingRecognizeRequest\0322.google.cloud.speec" + + "h.v2.StreamingRecognizeResponse\"\000(\0010\001\022\204\002" + + "\n\016BatchRecognize\022-.google.cloud.speech.v" + + "2.BatchRecognizeRequest\032\035.google.longrun" + + "ning.Operation\"\243\001\312A+\n\026BatchRecognizeResp" + + "onse\022\021OperationMetadata\332A#recognizer,con" + + "fig,config_mask,files\202\323\344\223\002I\"D/v2/{recogn" + "izer=projects/*/locations/*/recognizers/" - + "*}:recognize:\001*\022\201\001\n\022StreamingRecognize\0221" - + ".google.cloud.speech.v2.StreamingRecogni" - + "zeRequest\0322.google.cloud.speech.v2.Strea" - + "mingRecognizeResponse\"\000(\0010\001\022\204\002\n\016BatchRec" - + "ognize\022-.google.cloud.speech.v2.BatchRec" - + "ognizeRequest\032\035.google.longrunning.Opera" - + "tion\"\243\001\312A+\n\026BatchRecognizeResponse\022\021Oper" - + "ationMetadata\332A#recognizer,config,config", - "_mask,files\202\323\344\223\002I\"D/v2/{recognizer=proje" - + "cts/*/locations/*/recognizers/*}:batchRe" - + "cognize:\001*\022\216\001\n\tGetConfig\022(.google.cloud." - + "speech.v2.GetConfigRequest\032\036.google.clou" - + "d.speech.v2.Config\"7\332A\004name\202\323\344\223\002*\022(/v2/{" - + "name=projects/*/locations/*/config}\022\261\001\n\014" - + "UpdateConfig\022+.google.cloud.speech.v2.Up" - + "dateConfigRequest\032\036.google.cloud.speech." - + "v2.Config\"T\332A\022config,update_mask\202\323\344\223\00292/" - + "/v2/{config.name=projects/*/locations/*/" - + "config}:\006config\022\367\001\n\021CreateCustomClass\0220." - + "google.cloud.speech.v2.CreateCustomClass" - + "Request\032\035.google.longrunning.Operation\"\220" - + "\001\312A \n\013CustomClass\022\021OperationMetadata\332A#p" - + "arent,custom_class,custom_class_id\202\323\344\223\002A" - + "\"1/v2/{parent=projects/*/locations/*}/cu" - + "stomClasses:\014custom_class\022\274\001\n\021ListCustom" - + "Classes\0220.google.cloud.speech.v2.ListCus" - + "tomClassesRequest\0321.google.cloud.speech." - + "v2.ListCustomClassesResponse\"B\332A\006parent\202" - + "\323\344\223\0023\0221/v2/{parent=projects/*/locations/" - + "*}/customClasses\022\246\001\n\016GetCustomClass\022-.go" - + "ogle.cloud.speech.v2.GetCustomClassReque" - + "st\032#.google.cloud.speech.v2.CustomClass\"" - + "@\332A\004name\202\323\344\223\0023\0221/v2/{name=projects/*/loc" - + "ations/*/customClasses/*}\022\371\001\n\021UpdateCust" - + "omClass\0220.google.cloud.speech.v2.UpdateC" + + "*}:batchRecognize:\001*\022\216\001\n\tGetConfig\022(.goo" + + "gle.cloud.speech.v2.GetConfigRequest\032\036.g" + + "oogle.cloud.speech.v2.Config\"7\332A\004name\202\323\344" + + "\223\002*\022(/v2/{name=projects/*/locations/*/co" + + "nfig}\022\261\001\n\014UpdateConfig\022+.google.cloud.sp" + + "eech.v2.UpdateConfigRequest\032\036.google.clo" + + "ud.speech.v2.Config\"T\332A\022config,update_ma" + + "sk\202\323\344\223\00292//v2/{config.name=projects/*/lo" + + "cations/*/config}:\006config\022\367\001\n\021CreateCust" + + "omClass\0220.google.cloud.speech.v2.CreateC" + "ustomClassRequest\032\035.google.longrunning.O" - + "peration\"\222\001\312A \n\013CustomClass\022\021OperationMe" - + "tadata\332A\030custom_class,update_mask\202\323\344\223\002N2" - + ">/v2/{custom_class.name=projects/*/locat" - + "ions/*/customClasses/*}:\014custom_class\022\311\001" - + "\n\021DeleteCustomClass\0220.google.cloud.speec" - + "h.v2.DeleteCustomClassRequest\032\035.google.l" - + "ongrunning.Operation\"c\312A \n\013CustomClass\022\021" - + "OperationMetadata\332A\004name\202\323\344\223\0023*1/v2/{nam" - + "e=projects/*/locations/*/customClasses/*" - + "}\022\331\001\n\023UndeleteCustomClass\0222.google.cloud" - + ".speech.v2.UndeleteCustomClassRequest\032\035." - + "google.longrunning.Operation\"o\312A \n\013Custo" - + "mClass\022\021OperationMetadata\332A\004name\202\323\344\223\002?\":" - + "/v2/{name=projects/*/locations/*/customC" - + "lasses/*}:undelete:\001*\022\350\001\n\017CreatePhraseSe" - + "t\022..google.cloud.speech.v2.CreatePhraseS" - + "etRequest\032\035.google.longrunning.Operation" - + "\"\205\001\312A\036\n\tPhraseSet\022\021OperationMetadata\332A\037p" - + "arent,phrase_set,phrase_set_id\202\323\344\223\002<\"./v" - + "2/{parent=projects/*/locations/*}/phrase" - + "Sets:\nphrase_set\022\260\001\n\016ListPhraseSets\022-.go" - + "ogle.cloud.speech.v2.ListPhraseSetsReque" - + "st\032..google.cloud.speech.v2.ListPhraseSe" - + "tsResponse\"?\332A\006parent\202\323\344\223\0020\022./v2/{parent" - + "=projects/*/locations/*}/phraseSets\022\235\001\n\014" - + "GetPhraseSet\022+.google.cloud.speech.v2.Ge" - + "tPhraseSetRequest\032!.google.cloud.speech." - + "v2.PhraseSet\"=\332A\004name\202\323\344\223\0020\022./v2/{name=p" - + "rojects/*/locations/*/phraseSets/*}\022\352\001\n\017" - + "UpdatePhraseSet\022..google.cloud.speech.v2" - + ".UpdatePhraseSetRequest\032\035.google.longrun" - + "ning.Operation\"\207\001\312A\036\n\tPhraseSet\022\021Operati" - + "onMetadata\332A\026phrase_set,update_mask\202\323\344\223\002" - + "G29/v2/{phrase_set.name=projects/*/locat" - + "ions/*/phraseSets/*}:\nphrase_set\022\300\001\n\017Del" - + "etePhraseSet\022..google.cloud.speech.v2.De" - + "letePhraseSetRequest\032\035.google.longrunnin" - + "g.Operation\"^\312A\036\n\tPhraseSet\022\021OperationMe" - + "tadata\332A\004name\202\323\344\223\0020*./v2/{name=projects/" - + "*/locations/*/phraseSets/*}\022\320\001\n\021Undelete" - + "PhraseSet\0220.google.cloud.speech.v2.Undel" - + "etePhraseSetRequest\032\035.google.longrunning" - + ".Operation\"j\312A\036\n\tPhraseSet\022\021OperationMet" - + "adata\332A\004name\202\323\344\223\002<\"7/v2/{name=projects/*" - + "/locations/*/phraseSets/*}:undelete:\001*\032I" - + "\312A\025speech.googleapis.com\322A.https://www.g" - + "oogleapis.com/auth/cloud-platformB\211\003\n\032co" - + "m.google.cloud.speech.v2B\020CloudSpeechPro" - + "toP\001Z2cloud.google.com/go/speech/apiv2/s" - + "peechpb;speechpb\352Ax\n!cloudkms.googleapis" - + ".com/CryptoKey\022Sprojects/{project}/locat" - + "ions/{location}/keyRings/{key_ring}/cryp" - + "toKeys/{crypto_key}\352A\246\001\n(cloudkms.google" - + "apis.com/CryptoKeyVersion\022zprojects/{pro" - + "ject}/locations/{location}/keyRings/{key" - + "_ring}/cryptoKeys/{crypto_key}/cryptoKey" - + "Versions/{crypto_key_version}b\006proto3" + + "peration\"\220\001\312A \n\013CustomClass\022\021OperationMe" + + "tadata\332A#parent,custom_class,custom_clas" + + "s_id\202\323\344\223\002A\"1/v2/{parent=projects/*/locat" + + "ions/*}/customClasses:\014custom_class\022\274\001\n\021" + + "ListCustomClasses\0220.google.cloud.speech." + + "v2.ListCustomClassesRequest\0321.google.clo" + + "ud.speech.v2.ListCustomClassesResponse\"B" + + "\332A\006parent\202\323\344\223\0023\0221/v2/{parent=projects/*/" + + "locations/*}/customClasses\022\246\001\n\016GetCustom" + + "Class\022-.google.cloud.speech.v2.GetCustom" + + "ClassRequest\032#.google.cloud.speech.v2.Cu" + + "stomClass\"@\332A\004name\202\323\344\223\0023\0221/v2/{name=proj" + + "ects/*/locations/*/customClasses/*}\022\371\001\n\021" + + "UpdateCustomClass\0220.google.cloud.speech." + + "v2.UpdateCustomClassRequest\032\035.google.lon" + + "grunning.Operation\"\222\001\312A \n\013CustomClass\022\021O" + + "perationMetadata\332A\030custom_class,update_m" + + "ask\202\323\344\223\002N2>/v2/{custom_class.name=projec" + + "ts/*/locations/*/customClasses/*}:\014custo" + + "m_class\022\311\001\n\021DeleteCustomClass\0220.google.c" + + "loud.speech.v2.DeleteCustomClassRequest\032" + + "\035.google.longrunning.Operation\"c\312A \n\013Cus" + + "tomClass\022\021OperationMetadata\332A\004name\202\323\344\223\0023" + + "*1/v2/{name=projects/*/locations/*/custo" + + "mClasses/*}\022\331\001\n\023UndeleteCustomClass\0222.go" + + "ogle.cloud.speech.v2.UndeleteCustomClass" + + "Request\032\035.google.longrunning.Operation\"o" + + "\312A \n\013CustomClass\022\021OperationMetadata\332A\004na" + + "me\202\323\344\223\002?\":/v2/{name=projects/*/locations" + + "/*/customClasses/*}:undelete:\001*\022\350\001\n\017Crea" + + "tePhraseSet\022..google.cloud.speech.v2.Cre" + + "atePhraseSetRequest\032\035.google.longrunning" + + ".Operation\"\205\001\312A\036\n\tPhraseSet\022\021OperationMe" + + "tadata\332A\037parent,phrase_set,phrase_set_id" + + "\202\323\344\223\002<\"./v2/{parent=projects/*/locations" + + "/*}/phraseSets:\nphrase_set\022\260\001\n\016ListPhras" + + "eSets\022-.google.cloud.speech.v2.ListPhras" + + "eSetsRequest\032..google.cloud.speech.v2.Li" + + "stPhraseSetsResponse\"?\332A\006parent\202\323\344\223\0020\022./" + + "v2/{parent=projects/*/locations/*}/phras" + + "eSets\022\235\001\n\014GetPhraseSet\022+.google.cloud.sp" + + "eech.v2.GetPhraseSetRequest\032!.google.clo" + + "ud.speech.v2.PhraseSet\"=\332A\004name\202\323\344\223\0020\022./" + + "v2/{name=projects/*/locations/*/phraseSe" + + "ts/*}\022\352\001\n\017UpdatePhraseSet\022..google.cloud" + + ".speech.v2.UpdatePhraseSetRequest\032\035.goog" + + "le.longrunning.Operation\"\207\001\312A\036\n\tPhraseSe" + + "t\022\021OperationMetadata\332A\026phrase_set,update" + + "_mask\202\323\344\223\002G29/v2/{phrase_set.name=projec" + + "ts/*/locations/*/phraseSets/*}:\nphrase_s" + + "et\022\300\001\n\017DeletePhraseSet\022..google.cloud.sp" + + "eech.v2.DeletePhraseSetRequest\032\035.google." + + "longrunning.Operation\"^\312A\036\n\tPhraseSet\022\021O" + + "perationMetadata\332A\004name\202\323\344\223\0020*./v2/{name" + + "=projects/*/locations/*/phraseSets/*}\022\320\001" + + "\n\021UndeletePhraseSet\0220.google.cloud.speec" + + "h.v2.UndeletePhraseSetRequest\032\035.google.l" + + "ongrunning.Operation\"j\312A\036\n\tPhraseSet\022\021Op" + + "erationMetadata\332A\004name\202\323\344\223\002<\"7/v2/{name=" + + "projects/*/locations/*/phraseSets/*}:und" + + "elete:\001*\032I\312A\025speech.googleapis.com\322A.htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormB\211\003\n\032com.google.cloud.speech.v2B\020Clou" + + "dSpeechProtoP\001Z2cloud.google.com/go/spee" + + "ch/apiv2/speechpb;speechpb\352Ax\n!cloudkms." + + "googleapis.com/CryptoKey\022Sprojects/{proj" + + "ect}/locations/{location}/keyRings/{key_" + + "ring}/cryptoKeys/{crypto_key}\352A\246\001\n(cloud" + + "kms.googleapis.com/CryptoKeyVersion\022zpro" + + "jects/{project}/locations/{location}/key" + + "Rings/{key_ring}/cryptoKeys/{crypto_key}" + + "/cryptoKeyVersions/{crypto_key_version}b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -948,8 +978,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DiarizationConfig", "MaxAlternatives", }); - internal_static_google_cloud_speech_v2_SpeechAdaptation_descriptor = + internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor = getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_speech_v2_TranscriptNormalization_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_descriptor = + internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_descriptor, + new java.lang.String[] { + "Search", "Replace", "CaseSensitive", + }); + internal_static_google_cloud_speech_v2_SpeechAdaptation_descriptor = + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_speech_v2_SpeechAdaptation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_SpeechAdaptation_descriptor, @@ -965,7 +1013,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PhraseSet", "InlinePhraseSet", "Value", }); internal_static_google_cloud_speech_v2_RecognitionConfig_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_speech_v2_RecognitionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_RecognitionConfig_descriptor, @@ -976,10 +1024,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCodes", "Features", "Adaptation", + "TranscriptNormalization", "DecodingConfig", }); internal_static_google_cloud_speech_v2_RecognizeRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_speech_v2_RecognizeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_RecognizeRequest_descriptor, @@ -987,7 +1036,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Recognizer", "Config", "ConfigMask", "Content", "Uri", "AudioSource", }); internal_static_google_cloud_speech_v2_RecognitionResponseMetadata_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_speech_v2_RecognitionResponseMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_RecognitionResponseMetadata_descriptor, @@ -995,7 +1044,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TotalBilledDuration", }); internal_static_google_cloud_speech_v2_SpeechRecognitionAlternative_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_speech_v2_SpeechRecognitionAlternative_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_SpeechRecognitionAlternative_descriptor, @@ -1003,7 +1052,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Transcript", "Confidence", "Words", }); internal_static_google_cloud_speech_v2_WordInfo_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_speech_v2_WordInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_WordInfo_descriptor, @@ -1011,7 +1060,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartOffset", "EndOffset", "Word", "Confidence", "SpeakerLabel", }); internal_static_google_cloud_speech_v2_SpeechRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_speech_v2_SpeechRecognitionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_SpeechRecognitionResult_descriptor, @@ -1019,7 +1068,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Alternatives", "ChannelTag", "ResultEndOffset", "LanguageCode", }); internal_static_google_cloud_speech_v2_RecognizeResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_speech_v2_RecognizeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_RecognizeResponse_descriptor, @@ -1027,7 +1076,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", "Metadata", }); internal_static_google_cloud_speech_v2_StreamingRecognitionFeatures_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_speech_v2_StreamingRecognitionFeatures_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_StreamingRecognitionFeatures_descriptor, @@ -1045,7 +1094,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SpeechStartTimeout", "SpeechEndTimeout", }); internal_static_google_cloud_speech_v2_StreamingRecognitionConfig_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_speech_v2_StreamingRecognitionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_StreamingRecognitionConfig_descriptor, @@ -1053,7 +1102,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Config", "ConfigMask", "StreamingFeatures", }); internal_static_google_cloud_speech_v2_StreamingRecognizeRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_speech_v2_StreamingRecognizeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_StreamingRecognizeRequest_descriptor, @@ -1061,7 +1110,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Recognizer", "StreamingConfig", "Audio", "StreamingRequest", }); internal_static_google_cloud_speech_v2_BatchRecognizeRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_speech_v2_BatchRecognizeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeRequest_descriptor, @@ -1074,7 +1123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProcessingStrategy", }); internal_static_google_cloud_speech_v2_GcsOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_speech_v2_GcsOutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_GcsOutputConfig_descriptor, @@ -1082,13 +1131,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uri", }); internal_static_google_cloud_speech_v2_InlineOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_speech_v2_InlineOutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_InlineOutputConfig_descriptor, new java.lang.String[] {}); internal_static_google_cloud_speech_v2_RecognitionOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_speech_v2_RecognitionOutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_RecognitionOutputConfig_descriptor, @@ -1096,7 +1145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsOutputConfig", "InlineResponseConfig", "Output", }); internal_static_google_cloud_speech_v2_BatchRecognizeResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_speech_v2_BatchRecognizeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeResponse_descriptor, @@ -1114,23 +1163,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_speech_v2_BatchRecognizeResults_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_speech_v2_BatchRecognizeResults_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeResults_descriptor, new java.lang.String[] { "Results", "Metadata", }); + internal_static_google_cloud_speech_v2_CloudStorageResult_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_speech_v2_CloudStorageResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v2_CloudStorageResult_descriptor, + new java.lang.String[] { + "Uri", + }); + internal_static_google_cloud_speech_v2_InlineResult_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_speech_v2_InlineResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v2_InlineResult_descriptor, + new java.lang.String[] { + "Transcript", + }); internal_static_google_cloud_speech_v2_BatchRecognizeFileResult_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_speech_v2_BatchRecognizeFileResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeFileResult_descriptor, new java.lang.String[] { - "Uri", "Error", "Metadata", "Transcript", + "Error", + "Metadata", + "CloudStorageResult", + "InlineResult", + "Uri", + "Transcript", + "Result", }); internal_static_google_cloud_speech_v2_BatchRecognizeTranscriptionMetadata_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_speech_v2_BatchRecognizeTranscriptionMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeTranscriptionMetadata_descriptor, @@ -1138,7 +1209,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProgressPercent", "Error", "Uri", }); internal_static_google_cloud_speech_v2_BatchRecognizeMetadata_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_speech_v2_BatchRecognizeMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeMetadata_descriptor, @@ -1156,7 +1227,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_speech_v2_BatchRecognizeFileMetadata_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_speech_v2_BatchRecognizeFileMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_BatchRecognizeFileMetadata_descriptor, @@ -1164,7 +1235,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uri", "Config", "ConfigMask", "AudioSource", }); internal_static_google_cloud_speech_v2_StreamingRecognitionResult_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_speech_v2_StreamingRecognitionResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_StreamingRecognitionResult_descriptor, @@ -1177,7 +1248,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", }); internal_static_google_cloud_speech_v2_StreamingRecognizeResponse_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_speech_v2_StreamingRecognizeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_StreamingRecognizeResponse_descriptor, @@ -1185,7 +1256,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", "SpeechEventType", "SpeechEventOffset", "Metadata", }); internal_static_google_cloud_speech_v2_Config_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_speech_v2_Config_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_Config_descriptor, @@ -1193,7 +1264,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "KmsKeyName", "UpdateTime", }); internal_static_google_cloud_speech_v2_GetConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_speech_v2_GetConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_GetConfigRequest_descriptor, @@ -1201,7 +1272,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_speech_v2_UpdateConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(41); internal_static_google_cloud_speech_v2_UpdateConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_UpdateConfigRequest_descriptor, @@ -1209,7 +1280,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Config", "UpdateMask", }); internal_static_google_cloud_speech_v2_CustomClass_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(42); internal_static_google_cloud_speech_v2_CustomClass_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_CustomClass_descriptor, @@ -1246,7 +1317,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_speech_v2_PhraseSet_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_speech_v2_PhraseSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_PhraseSet_descriptor, @@ -1284,7 +1355,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_speech_v2_CreateCustomClassRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_speech_v2_CreateCustomClassRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_CreateCustomClassRequest_descriptor, @@ -1292,7 +1363,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomClass", "ValidateOnly", "CustomClassId", "Parent", }); internal_static_google_cloud_speech_v2_ListCustomClassesRequest_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_speech_v2_ListCustomClassesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_ListCustomClassesRequest_descriptor, @@ -1300,7 +1371,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "ShowDeleted", }); internal_static_google_cloud_speech_v2_ListCustomClassesResponse_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_speech_v2_ListCustomClassesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_ListCustomClassesResponse_descriptor, @@ -1308,7 +1379,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomClasses", "NextPageToken", }); internal_static_google_cloud_speech_v2_GetCustomClassRequest_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_speech_v2_GetCustomClassRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_GetCustomClassRequest_descriptor, @@ -1316,7 +1387,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_speech_v2_UpdateCustomClassRequest_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_speech_v2_UpdateCustomClassRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_UpdateCustomClassRequest_descriptor, @@ -1324,7 +1395,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomClass", "UpdateMask", "ValidateOnly", }); internal_static_google_cloud_speech_v2_DeleteCustomClassRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_speech_v2_DeleteCustomClassRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_DeleteCustomClassRequest_descriptor, @@ -1332,7 +1403,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ValidateOnly", "AllowMissing", "Etag", }); internal_static_google_cloud_speech_v2_UndeleteCustomClassRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(50); internal_static_google_cloud_speech_v2_UndeleteCustomClassRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_UndeleteCustomClassRequest_descriptor, @@ -1340,7 +1411,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ValidateOnly", "Etag", }); internal_static_google_cloud_speech_v2_CreatePhraseSetRequest_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(51); internal_static_google_cloud_speech_v2_CreatePhraseSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_CreatePhraseSetRequest_descriptor, @@ -1348,7 +1419,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PhraseSet", "ValidateOnly", "PhraseSetId", "Parent", }); internal_static_google_cloud_speech_v2_ListPhraseSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(52); internal_static_google_cloud_speech_v2_ListPhraseSetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_ListPhraseSetsRequest_descriptor, @@ -1356,7 +1427,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "ShowDeleted", }); internal_static_google_cloud_speech_v2_ListPhraseSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(53); internal_static_google_cloud_speech_v2_ListPhraseSetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_ListPhraseSetsResponse_descriptor, @@ -1364,7 +1435,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PhraseSets", "NextPageToken", }); internal_static_google_cloud_speech_v2_GetPhraseSetRequest_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(54); internal_static_google_cloud_speech_v2_GetPhraseSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_GetPhraseSetRequest_descriptor, @@ -1372,7 +1443,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_speech_v2_UpdatePhraseSetRequest_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(55); internal_static_google_cloud_speech_v2_UpdatePhraseSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_UpdatePhraseSetRequest_descriptor, @@ -1380,7 +1451,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PhraseSet", "UpdateMask", "ValidateOnly", }); internal_static_google_cloud_speech_v2_DeletePhraseSetRequest_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(56); internal_static_google_cloud_speech_v2_DeletePhraseSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_DeletePhraseSetRequest_descriptor, @@ -1388,7 +1459,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ValidateOnly", "AllowMissing", "Etag", }); internal_static_google_cloud_speech_v2_UndeletePhraseSetRequest_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(57); internal_static_google_cloud_speech_v2_UndeletePhraseSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_speech_v2_UndeletePhraseSetRequest_descriptor, diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResult.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResult.java new file mode 100644 index 000000000000..8da1eb44b70b --- /dev/null +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResult.java @@ -0,0 +1,623 @@ +/* + * Copyright 2023 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/v2/cloud_speech.proto + +package com.google.cloud.speech.v2; + +/** + * + * + *
+ * Final results written to Cloud Storage.
+ * 
+ * + * Protobuf type {@code google.cloud.speech.v2.CloudStorageResult} + */ +public final class CloudStorageResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v2.CloudStorageResult) + CloudStorageResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudStorageResult.newBuilder() to construct. + private CloudStorageResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudStorageResult() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudStorageResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_CloudStorageResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_CloudStorageResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.CloudStorageResult.class, + com.google.cloud.speech.v2.CloudStorageResult.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * + * + *
+   * The Cloud Storage URI to which recognition results were written.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The Cloud Storage URI to which recognition results were written.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = 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(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + size += getUnknownFields().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.v2.CloudStorageResult)) { + return super.equals(obj); + } + com.google.cloud.speech.v2.CloudStorageResult other = + (com.google.cloud.speech.v2.CloudStorageResult) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v2.CloudStorageResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.CloudStorageResult 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.v2.CloudStorageResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.CloudStorageResult 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.v2.CloudStorageResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.CloudStorageResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v2.CloudStorageResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.CloudStorageResult 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.v2.CloudStorageResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.CloudStorageResult 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.v2.CloudStorageResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.CloudStorageResult 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.v2.CloudStorageResult 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; + } + /** + * + * + *
+   * Final results written to Cloud Storage.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v2.CloudStorageResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v2.CloudStorageResult) + com.google.cloud.speech.v2.CloudStorageResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_CloudStorageResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_CloudStorageResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.CloudStorageResult.class, + com.google.cloud.speech.v2.CloudStorageResult.Builder.class); + } + + // Construct using com.google.cloud.speech.v2.CloudStorageResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_CloudStorageResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResult getDefaultInstanceForType() { + return com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResult build() { + com.google.cloud.speech.v2.CloudStorageResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResult buildPartial() { + com.google.cloud.speech.v2.CloudStorageResult result = + new com.google.cloud.speech.v2.CloudStorageResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.speech.v2.CloudStorageResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.speech.v2.CloudStorageResult) { + return mergeFrom((com.google.cloud.speech.v2.CloudStorageResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v2.CloudStorageResult other) { + if (other == com.google.cloud.speech.v2.CloudStorageResult.getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The Cloud Storage URI to which recognition results were written.
+     * 
+ * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Cloud Storage URI to which recognition results were written.
+     * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Cloud Storage URI to which recognition results were written.
+     * 
+ * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Storage URI to which recognition results were written.
+     * 
+ * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The Cloud Storage URI to which recognition results were written.
+     * 
+ * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + 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.v2.CloudStorageResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v2.CloudStorageResult) + private static final com.google.cloud.speech.v2.CloudStorageResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v2.CloudStorageResult(); + } + + public static com.google.cloud.speech.v2.CloudStorageResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.speech.v2.CloudStorageResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResultOrBuilder.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResultOrBuilder.java new file mode 100644 index 000000000000..6bd025615faa --- /dev/null +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/CloudStorageResultOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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/v2/cloud_speech.proto + +package com.google.cloud.speech.v2; + +public interface CloudStorageResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v2.CloudStorageResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Cloud Storage URI to which recognition results were written.
+   * 
+ * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+   * The Cloud Storage URI to which recognition results were written.
+   * 
+ * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); +} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResult.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResult.java new file mode 100644 index 000000000000..4c33a44148bb --- /dev/null +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResult.java @@ -0,0 +1,705 @@ +/* + * Copyright 2023 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/v2/cloud_speech.proto + +package com.google.cloud.speech.v2; + +/** + * + * + *
+ * Final results returned inline in the recognition response.
+ * 
+ * + * Protobuf type {@code google.cloud.speech.v2.InlineResult} + */ +public final class InlineResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v2.InlineResult) + InlineResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use InlineResult.newBuilder() to construct. + private InlineResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InlineResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InlineResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_InlineResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_InlineResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.InlineResult.class, + com.google.cloud.speech.v2.InlineResult.Builder.class); + } + + public static final int TRANSCRIPT_FIELD_NUMBER = 1; + private com.google.cloud.speech.v2.BatchRecognizeResults transcript_; + /** + * + * + *
+   * The transcript for the audio file.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + * + * @return Whether the transcript field is set. + */ + @java.lang.Override + public boolean hasTranscript() { + return transcript_ != null; + } + /** + * + * + *
+   * The transcript for the audio file.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + * + * @return The transcript. + */ + @java.lang.Override + public com.google.cloud.speech.v2.BatchRecognizeResults getTranscript() { + return transcript_ == null + ? com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance() + : transcript_; + } + /** + * + * + *
+   * The transcript for the audio file.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + @java.lang.Override + public com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOrBuilder() { + return transcript_ == null + ? com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance() + : transcript_; + } + + 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 (transcript_ != null) { + output.writeMessage(1, getTranscript()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transcript_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTranscript()); + } + size += getUnknownFields().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.v2.InlineResult)) { + return super.equals(obj); + } + com.google.cloud.speech.v2.InlineResult other = (com.google.cloud.speech.v2.InlineResult) obj; + + if (hasTranscript() != other.hasTranscript()) return false; + if (hasTranscript()) { + if (!getTranscript().equals(other.getTranscript())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTranscript()) { + hash = (37 * hash) + TRANSCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getTranscript().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v2.InlineResult parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.InlineResult 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.v2.InlineResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.InlineResult 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.v2.InlineResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.InlineResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v2.InlineResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.InlineResult 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.v2.InlineResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.InlineResult 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.v2.InlineResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.InlineResult 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.v2.InlineResult 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; + } + /** + * + * + *
+   * Final results returned inline in the recognition response.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v2.InlineResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v2.InlineResult) + com.google.cloud.speech.v2.InlineResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_InlineResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_InlineResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.InlineResult.class, + com.google.cloud.speech.v2.InlineResult.Builder.class); + } + + // Construct using com.google.cloud.speech.v2.InlineResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + transcript_ = null; + if (transcriptBuilder_ != null) { + transcriptBuilder_.dispose(); + transcriptBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_InlineResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v2.InlineResult getDefaultInstanceForType() { + return com.google.cloud.speech.v2.InlineResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v2.InlineResult build() { + com.google.cloud.speech.v2.InlineResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v2.InlineResult buildPartial() { + com.google.cloud.speech.v2.InlineResult result = + new com.google.cloud.speech.v2.InlineResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.speech.v2.InlineResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.transcript_ = transcriptBuilder_ == null ? transcript_ : transcriptBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.speech.v2.InlineResult) { + return mergeFrom((com.google.cloud.speech.v2.InlineResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v2.InlineResult other) { + if (other == com.google.cloud.speech.v2.InlineResult.getDefaultInstance()) return this; + if (other.hasTranscript()) { + mergeTranscript(other.getTranscript()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTranscriptFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.speech.v2.BatchRecognizeResults transcript_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.BatchRecognizeResults, + com.google.cloud.speech.v2.BatchRecognizeResults.Builder, + com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder> + transcriptBuilder_; + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + * + * @return Whether the transcript field is set. + */ + public boolean hasTranscript() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + * + * @return The transcript. + */ + public com.google.cloud.speech.v2.BatchRecognizeResults getTranscript() { + if (transcriptBuilder_ == null) { + return transcript_ == null + ? com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance() + : transcript_; + } else { + return transcriptBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + public Builder setTranscript(com.google.cloud.speech.v2.BatchRecognizeResults value) { + if (transcriptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transcript_ = value; + } else { + transcriptBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + public Builder setTranscript( + com.google.cloud.speech.v2.BatchRecognizeResults.Builder builderForValue) { + if (transcriptBuilder_ == null) { + transcript_ = builderForValue.build(); + } else { + transcriptBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + public Builder mergeTranscript(com.google.cloud.speech.v2.BatchRecognizeResults value) { + if (transcriptBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && transcript_ != null + && transcript_ + != com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance()) { + getTranscriptBuilder().mergeFrom(value); + } else { + transcript_ = value; + } + } else { + transcriptBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + public Builder clearTranscript() { + bitField0_ = (bitField0_ & ~0x00000001); + transcript_ = null; + if (transcriptBuilder_ != null) { + transcriptBuilder_.dispose(); + transcriptBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + public com.google.cloud.speech.v2.BatchRecognizeResults.Builder getTranscriptBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTranscriptFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + public com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOrBuilder() { + if (transcriptBuilder_ != null) { + return transcriptBuilder_.getMessageOrBuilder(); + } else { + return transcript_ == null + ? com.google.cloud.speech.v2.BatchRecognizeResults.getDefaultInstance() + : transcript_; + } + } + /** + * + * + *
+     * The transcript for the audio file.
+     * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.BatchRecognizeResults, + com.google.cloud.speech.v2.BatchRecognizeResults.Builder, + com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder> + getTranscriptFieldBuilder() { + if (transcriptBuilder_ == null) { + transcriptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.BatchRecognizeResults, + com.google.cloud.speech.v2.BatchRecognizeResults.Builder, + com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder>( + getTranscript(), getParentForChildren(), isClean()); + transcript_ = null; + } + return transcriptBuilder_; + } + + @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.v2.InlineResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v2.InlineResult) + private static final com.google.cloud.speech.v2.InlineResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v2.InlineResult(); + } + + public static com.google.cloud.speech.v2.InlineResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.speech.v2.InlineResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResultOrBuilder.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResultOrBuilder.java new file mode 100644 index 000000000000..1f365ed5444a --- /dev/null +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/InlineResultOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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/v2/cloud_speech.proto + +package com.google.cloud.speech.v2; + +public interface InlineResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v2.InlineResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The transcript for the audio file.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + * + * @return Whether the transcript field is set. + */ + boolean hasTranscript(); + /** + * + * + *
+   * The transcript for the audio file.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + * + * @return The transcript. + */ + com.google.cloud.speech.v2.BatchRecognizeResults getTranscript(); + /** + * + * + *
+   * The transcript for the audio file.
+   * 
+ * + * .google.cloud.speech.v2.BatchRecognizeResults transcript = 1; + */ + com.google.cloud.speech.v2.BatchRecognizeResultsOrBuilder getTranscriptOrBuilder(); +} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfig.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfig.java index 2d1b868daf39..4d26e6234bc4 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfig.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfig.java @@ -497,6 +497,72 @@ public com.google.cloud.speech.v2.SpeechAdaptationOrBuilder getAdaptationOrBuild : adaptation_; } + public static final int TRANSCRIPT_NORMALIZATION_FIELD_NUMBER = 11; + private com.google.cloud.speech.v2.TranscriptNormalization transcriptNormalization_; + /** + * + * + *
+   * Optional. Use transcription normalization to automatically replace parts of
+   * the transcript with phrases of your choosing. For StreamingRecognize, this
+   * normalization only applies to stable partial transcripts (stability > 0.8)
+   * and final transcripts.
+   * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the transcriptNormalization field is set. + */ + @java.lang.Override + public boolean hasTranscriptNormalization() { + return transcriptNormalization_ != null; + } + /** + * + * + *
+   * Optional. Use transcription normalization to automatically replace parts of
+   * the transcript with phrases of your choosing. For StreamingRecognize, this
+   * normalization only applies to stable partial transcripts (stability > 0.8)
+   * and final transcripts.
+   * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transcriptNormalization. + */ + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization getTranscriptNormalization() { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } + /** + * + * + *
+   * Optional. Use transcription normalization to automatically replace parts of
+   * the transcript with phrases of your choosing. For StreamingRecognize, this
+   * normalization only applies to stable partial transcripts (stability > 0.8)
+   * and final transcripts.
+   * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder + getTranscriptNormalizationOrBuilder() { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -529,6 +595,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < languageCodes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, languageCodes_.getRaw(i)); } + if (transcriptNormalization_ != null) { + output.writeMessage(11, getTranscriptNormalization()); + } getUnknownFields().writeTo(output); } @@ -565,6 +634,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getLanguageCodesList().size(); } + if (transcriptNormalization_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, getTranscriptNormalization()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -591,6 +665,10 @@ public boolean equals(final java.lang.Object obj) { if (hasAdaptation()) { if (!getAdaptation().equals(other.getAdaptation())) return false; } + if (hasTranscriptNormalization() != other.hasTranscriptNormalization()) return false; + if (hasTranscriptNormalization()) { + if (!getTranscriptNormalization().equals(other.getTranscriptNormalization())) return false; + } if (!getDecodingConfigCase().equals(other.getDecodingConfigCase())) return false; switch (decodingConfigCase_) { case 7: @@ -627,6 +705,10 @@ public int hashCode() { hash = (37 * hash) + ADAPTATION_FIELD_NUMBER; hash = (53 * hash) + getAdaptation().hashCode(); } + if (hasTranscriptNormalization()) { + hash = (37 * hash) + TRANSCRIPT_NORMALIZATION_FIELD_NUMBER; + hash = (53 * hash) + getTranscriptNormalization().hashCode(); + } switch (decodingConfigCase_) { case 7: hash = (37 * hash) + AUTO_DECODING_CONFIG_FIELD_NUMBER; @@ -797,6 +879,11 @@ public Builder clear() { adaptationBuilder_.dispose(); adaptationBuilder_ = null; } + transcriptNormalization_ = null; + if (transcriptNormalizationBuilder_ != null) { + transcriptNormalizationBuilder_.dispose(); + transcriptNormalizationBuilder_ = null; + } decodingConfigCase_ = 0; decodingConfig_ = null; return this; @@ -849,6 +936,12 @@ private void buildPartial0(com.google.cloud.speech.v2.RecognitionConfig result) if (((from_bitField0_ & 0x00000020) != 0)) { result.adaptation_ = adaptationBuilder_ == null ? adaptation_ : adaptationBuilder_.build(); } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.transcriptNormalization_ = + transcriptNormalizationBuilder_ == null + ? transcriptNormalization_ + : transcriptNormalizationBuilder_.build(); + } } private void buildPartialOneofs(com.google.cloud.speech.v2.RecognitionConfig result) { @@ -928,6 +1021,9 @@ public Builder mergeFrom(com.google.cloud.speech.v2.RecognitionConfig other) { if (other.hasAdaptation()) { mergeAdaptation(other.getAdaptation()); } + if (other.hasTranscriptNormalization()) { + mergeTranscriptNormalization(other.getTranscriptNormalization()); + } switch (other.getDecodingConfigCase()) { case AUTO_DECODING_CONFIG: { @@ -1009,6 +1105,13 @@ public Builder mergeFrom( languageCodes_.add(s); break; } // case 82 + case 90: + { + input.readMessage( + getTranscriptNormalizationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2276,6 +2379,240 @@ public com.google.cloud.speech.v2.SpeechAdaptationOrBuilder getAdaptationOrBuild return adaptationBuilder_; } + private com.google.cloud.speech.v2.TranscriptNormalization transcriptNormalization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.TranscriptNormalization, + com.google.cloud.speech.v2.TranscriptNormalization.Builder, + com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder> + transcriptNormalizationBuilder_; + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the transcriptNormalization field is set. + */ + public boolean hasTranscriptNormalization() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transcriptNormalization. + */ + public com.google.cloud.speech.v2.TranscriptNormalization getTranscriptNormalization() { + if (transcriptNormalizationBuilder_ == null) { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } else { + return transcriptNormalizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTranscriptNormalization( + com.google.cloud.speech.v2.TranscriptNormalization value) { + if (transcriptNormalizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transcriptNormalization_ = value; + } else { + transcriptNormalizationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTranscriptNormalization( + com.google.cloud.speech.v2.TranscriptNormalization.Builder builderForValue) { + if (transcriptNormalizationBuilder_ == null) { + transcriptNormalization_ = builderForValue.build(); + } else { + transcriptNormalizationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTranscriptNormalization( + com.google.cloud.speech.v2.TranscriptNormalization value) { + if (transcriptNormalizationBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && transcriptNormalization_ != null + && transcriptNormalization_ + != com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance()) { + getTranscriptNormalizationBuilder().mergeFrom(value); + } else { + transcriptNormalization_ = value; + } + } else { + transcriptNormalizationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTranscriptNormalization() { + bitField0_ = (bitField0_ & ~0x00000040); + transcriptNormalization_ = null; + if (transcriptNormalizationBuilder_ != null) { + transcriptNormalizationBuilder_.dispose(); + transcriptNormalizationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.speech.v2.TranscriptNormalization.Builder + getTranscriptNormalizationBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getTranscriptNormalizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder + getTranscriptNormalizationOrBuilder() { + if (transcriptNormalizationBuilder_ != null) { + return transcriptNormalizationBuilder_.getMessageOrBuilder(); + } else { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } + } + /** + * + * + *
+     * Optional. Use transcription normalization to automatically replace parts of
+     * the transcript with phrases of your choosing. For StreamingRecognize, this
+     * normalization only applies to stable partial transcripts (stability > 0.8)
+     * and final transcripts.
+     * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.TranscriptNormalization, + com.google.cloud.speech.v2.TranscriptNormalization.Builder, + com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder> + getTranscriptNormalizationFieldBuilder() { + if (transcriptNormalizationBuilder_ == null) { + transcriptNormalizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v2.TranscriptNormalization, + com.google.cloud.speech.v2.TranscriptNormalization.Builder, + com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder>( + getTranscriptNormalization(), getParentForChildren(), isClean()); + transcriptNormalization_ = null; + } + return transcriptNormalizationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfigOrBuilder.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfigOrBuilder.java index 5d33cfc2c433..68463e69ae8c 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfigOrBuilder.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognitionConfigOrBuilder.java @@ -304,5 +304,55 @@ public interface RecognitionConfigOrBuilder */ com.google.cloud.speech.v2.SpeechAdaptationOrBuilder getAdaptationOrBuilder(); + /** + * + * + *
+   * Optional. Use transcription normalization to automatically replace parts of
+   * the transcript with phrases of your choosing. For StreamingRecognize, this
+   * normalization only applies to stable partial transcripts (stability > 0.8)
+   * and final transcripts.
+   * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the transcriptNormalization field is set. + */ + boolean hasTranscriptNormalization(); + /** + * + * + *
+   * Optional. Use transcription normalization to automatically replace parts of
+   * the transcript with phrases of your choosing. For StreamingRecognize, this
+   * normalization only applies to stable partial transcripts (stability > 0.8)
+   * and final transcripts.
+   * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The transcriptNormalization. + */ + com.google.cloud.speech.v2.TranscriptNormalization getTranscriptNormalization(); + /** + * + * + *
+   * Optional. Use transcription normalization to automatically replace parts of
+   * the transcript with phrases of your choosing. For StreamingRecognize, this
+   * normalization only applies to stable partial transcripts (stability > 0.8)
+   * and final transcripts.
+   * 
+ * + * + * .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder getTranscriptNormalizationOrBuilder(); + com.google.cloud.speech.v2.RecognitionConfig.DecodingConfigCase getDecodingConfigCase(); } diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/Recognizer.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/Recognizer.java index b9fd47c5614b..9c713dc55c16 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/Recognizer.java +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/Recognizer.java @@ -403,8 +403,12 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
-   * Optional. Which model to use for recognition requests. Select the model
-   * best suited to your domain to get best results.
+   * Optional. This field is now deprecated. Prefer the
+   * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * Which model to use for recognition requests. Select the model best suited
+   * to your domain to get best results.
    *
    * Guidance for choosing which model to use can be found in the [Transcription
    * Models
@@ -417,7 +421,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
    * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
    *
    * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=596
+   *     google/cloud/speech/v2/cloud_speech.proto;l=600
    * @return The model.
    */
   @java.lang.Override
@@ -437,8 +441,12 @@ public java.lang.String getModel() {
    *
    *
    * 
-   * Optional. Which model to use for recognition requests. Select the model
-   * best suited to your domain to get best results.
+   * Optional. This field is now deprecated. Prefer the
+   * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * Which model to use for recognition requests. Select the model best suited
+   * to your domain to get best results.
    *
    * Guidance for choosing which model to use can be found in the [Transcription
    * Models
@@ -451,7 +459,7 @@ public java.lang.String getModel() {
    * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
    *
    * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=596
+   *     google/cloud/speech/v2/cloud_speech.proto;l=600
    * @return The bytes for model.
    */
   @java.lang.Override
@@ -477,7 +485,12 @@ public com.google.protobuf.ByteString getModelBytes() {
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -496,7 +509,7 @@ public com.google.protobuf.ByteString getModelBytes() {
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @return A list containing the languageCodes.
    */
   @java.lang.Deprecated
@@ -507,7 +520,12 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -526,7 +544,7 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @return The count of languageCodes.
    */
   @java.lang.Deprecated
@@ -537,7 +555,12 @@ public int getLanguageCodesCount() {
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -556,7 +579,7 @@ public int getLanguageCodesCount() {
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @param index The index of the element to return.
    * @return The languageCodes at the given index.
    */
@@ -568,7 +591,12 @@ public java.lang.String getLanguageCodes(int index) {
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -587,7 +615,7 @@ public java.lang.String getLanguageCodes(int index) {
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @param index The index of the value to return.
    * @return The bytes of the languageCodes at the given index.
    */
@@ -2313,8 +2341,12 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. Which model to use for recognition requests. Select the model
-     * best suited to your domain to get best results.
+     * Optional. This field is now deprecated. Prefer the
+     * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * Which model to use for recognition requests. Select the model best suited
+     * to your domain to get best results.
      *
      * Guidance for choosing which model to use can be found in the [Transcription
      * Models
@@ -2327,7 +2359,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
      * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
      *
      * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=596
+     *     google/cloud/speech/v2/cloud_speech.proto;l=600
      * @return The model.
      */
     @java.lang.Deprecated
@@ -2346,8 +2378,12 @@ public java.lang.String getModel() {
      *
      *
      * 
-     * Optional. Which model to use for recognition requests. Select the model
-     * best suited to your domain to get best results.
+     * Optional. This field is now deprecated. Prefer the
+     * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * Which model to use for recognition requests. Select the model best suited
+     * to your domain to get best results.
      *
      * Guidance for choosing which model to use can be found in the [Transcription
      * Models
@@ -2360,7 +2396,7 @@ public java.lang.String getModel() {
      * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
      *
      * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=596
+     *     google/cloud/speech/v2/cloud_speech.proto;l=600
      * @return The bytes for model.
      */
     @java.lang.Deprecated
@@ -2379,8 +2415,12 @@ public com.google.protobuf.ByteString getModelBytes() {
      *
      *
      * 
-     * Optional. Which model to use for recognition requests. Select the model
-     * best suited to your domain to get best results.
+     * Optional. This field is now deprecated. Prefer the
+     * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * Which model to use for recognition requests. Select the model best suited
+     * to your domain to get best results.
      *
      * Guidance for choosing which model to use can be found in the [Transcription
      * Models
@@ -2393,7 +2433,7 @@ public com.google.protobuf.ByteString getModelBytes() {
      * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
      *
      * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=596
+     *     google/cloud/speech/v2/cloud_speech.proto;l=600
      * @param value The model to set.
      * @return This builder for chaining.
      */
@@ -2411,8 +2451,12 @@ public Builder setModel(java.lang.String value) {
      *
      *
      * 
-     * Optional. Which model to use for recognition requests. Select the model
-     * best suited to your domain to get best results.
+     * Optional. This field is now deprecated. Prefer the
+     * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * Which model to use for recognition requests. Select the model best suited
+     * to your domain to get best results.
      *
      * Guidance for choosing which model to use can be found in the [Transcription
      * Models
@@ -2425,7 +2469,7 @@ public Builder setModel(java.lang.String value) {
      * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
      *
      * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=596
+     *     google/cloud/speech/v2/cloud_speech.proto;l=600
      * @return This builder for chaining.
      */
     @java.lang.Deprecated
@@ -2439,8 +2483,12 @@ public Builder clearModel() {
      *
      *
      * 
-     * Optional. Which model to use for recognition requests. Select the model
-     * best suited to your domain to get best results.
+     * Optional. This field is now deprecated. Prefer the
+     * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * Which model to use for recognition requests. Select the model best suited
+     * to your domain to get best results.
      *
      * Guidance for choosing which model to use can be found in the [Transcription
      * Models
@@ -2453,7 +2501,7 @@ public Builder clearModel() {
      * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
      *
      * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=596
+     *     google/cloud/speech/v2/cloud_speech.proto;l=600
      * @param value The bytes for model to set.
      * @return This builder for chaining.
      */
@@ -2482,7 +2530,12 @@ private void ensureLanguageCodesIsMutable() {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2501,7 +2554,7 @@ private void ensureLanguageCodesIsMutable() {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @return A list containing the languageCodes.
      */
     @java.lang.Deprecated
@@ -2513,7 +2566,12 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2532,7 +2590,7 @@ public com.google.protobuf.ProtocolStringList getLanguageCodesList() {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @return The count of languageCodes.
      */
     @java.lang.Deprecated
@@ -2543,7 +2601,12 @@ public int getLanguageCodesCount() {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2562,7 +2625,7 @@ public int getLanguageCodesCount() {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @param index The index of the element to return.
      * @return The languageCodes at the given index.
      */
@@ -2574,7 +2637,12 @@ public java.lang.String getLanguageCodes(int index) {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2593,7 +2661,7 @@ public java.lang.String getLanguageCodes(int index) {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @param index The index of the value to return.
      * @return The bytes of the languageCodes at the given index.
      */
@@ -2605,7 +2673,12 @@ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2624,7 +2697,7 @@ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @param index The index to set the value at.
      * @param value The languageCodes to set.
      * @return This builder for chaining.
@@ -2644,7 +2717,12 @@ public Builder setLanguageCodes(int index, java.lang.String value) {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2663,7 +2741,7 @@ public Builder setLanguageCodes(int index, java.lang.String value) {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @param value The languageCodes to add.
      * @return This builder for chaining.
      */
@@ -2682,7 +2760,12 @@ public Builder addLanguageCodes(java.lang.String value) {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2701,7 +2784,7 @@ public Builder addLanguageCodes(java.lang.String value) {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @param values The languageCodes to add.
      * @return This builder for chaining.
      */
@@ -2717,7 +2800,12 @@ public Builder addAllLanguageCodes(java.lang.Iterable values)
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2736,7 +2824,7 @@ public Builder addAllLanguageCodes(java.lang.Iterable values)
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @return This builder for chaining.
      */
     @java.lang.Deprecated
@@ -2751,7 +2839,12 @@ public Builder clearLanguageCodes() {
      *
      *
      * 
-     * Optional. The language of the supplied audio as a
+     * Optional. This field is now deprecated. Prefer the
+     * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+     * field in the
+     * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+     *
+     * The language of the supplied audio as a
      * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
      *
      * Supported languages for each model are listed in the [Table of Supported
@@ -2770,7 +2863,7 @@ public Builder clearLanguageCodes() {
      * 
      *
      * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-     *     google/cloud/speech/v2/cloud_speech.proto;l=610
+     *     google/cloud/speech/v2/cloud_speech.proto;l=619
      * @param value The bytes of the languageCodes to add.
      * @return This builder for chaining.
      */
diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognizerOrBuilder.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognizerOrBuilder.java
index 91acbeee904a..b25c706cbf83 100644
--- a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognizerOrBuilder.java
+++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/RecognizerOrBuilder.java
@@ -106,8 +106,12 @@ public interface RecognizerOrBuilder
    *
    *
    * 
-   * Optional. Which model to use for recognition requests. Select the model
-   * best suited to your domain to get best results.
+   * Optional. This field is now deprecated. Prefer the
+   * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * Which model to use for recognition requests. Select the model best suited
+   * to your domain to get best results.
    *
    * Guidance for choosing which model to use can be found in the [Transcription
    * Models
@@ -120,7 +124,7 @@ public interface RecognizerOrBuilder
    * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
    *
    * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=596
+   *     google/cloud/speech/v2/cloud_speech.proto;l=600
    * @return The model.
    */
   @java.lang.Deprecated
@@ -129,8 +133,12 @@ public interface RecognizerOrBuilder
    *
    *
    * 
-   * Optional. Which model to use for recognition requests. Select the model
-   * best suited to your domain to get best results.
+   * Optional. This field is now deprecated. Prefer the
+   * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * Which model to use for recognition requests. Select the model best suited
+   * to your domain to get best results.
    *
    * Guidance for choosing which model to use can be found in the [Transcription
    * Models
@@ -143,7 +151,7 @@ public interface RecognizerOrBuilder
    * string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
    *
    * @deprecated google.cloud.speech.v2.Recognizer.model is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=596
+   *     google/cloud/speech/v2/cloud_speech.proto;l=600
    * @return The bytes for model.
    */
   @java.lang.Deprecated
@@ -153,7 +161,12 @@ public interface RecognizerOrBuilder
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -172,7 +185,7 @@ public interface RecognizerOrBuilder
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @return A list containing the languageCodes.
    */
   @java.lang.Deprecated
@@ -181,7 +194,12 @@ public interface RecognizerOrBuilder
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -200,7 +218,7 @@ public interface RecognizerOrBuilder
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @return The count of languageCodes.
    */
   @java.lang.Deprecated
@@ -209,7 +227,12 @@ public interface RecognizerOrBuilder
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -228,7 +251,7 @@ public interface RecognizerOrBuilder
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @param index The index of the element to return.
    * @return The languageCodes at the given index.
    */
@@ -238,7 +261,12 @@ public interface RecognizerOrBuilder
    *
    *
    * 
-   * Optional. The language of the supplied audio as a
+   * Optional. This field is now deprecated. Prefer the
+   * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
+   * field in the
+   * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
+   *
+   * The language of the supplied audio as a
    * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
    *
    * Supported languages for each model are listed in the [Table of Supported
@@ -257,7 +285,7 @@ public interface RecognizerOrBuilder
    * 
    *
    * @deprecated google.cloud.speech.v2.Recognizer.language_codes is deprecated. See
-   *     google/cloud/speech/v2/cloud_speech.proto;l=610
+   *     google/cloud/speech/v2/cloud_speech.proto;l=619
    * @param index The index of the value to return.
    * @return The bytes of the languageCodes at the given index.
    */
diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalization.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalization.java
new file mode 100644
index 000000000000..03b2a4a8f253
--- /dev/null
+++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalization.java
@@ -0,0 +1,1982 @@
+/*
+ * Copyright 2023 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/v2/cloud_speech.proto
+
+package com.google.cloud.speech.v2;
+
+/**
+ *
+ *
+ * 
+ * Transcription normalization configuration. Use transcription normalization
+ * to automatically replace parts of the transcript with phrases of your
+ * choosing. For StreamingRecognize, this normalization only applies to stable
+ * partial transcripts (stability > 0.8) and final transcripts.
+ * 
+ * + * Protobuf type {@code google.cloud.speech.v2.TranscriptNormalization} + */ +public final class TranscriptNormalization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v2.TranscriptNormalization) + TranscriptNormalizationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranscriptNormalization.newBuilder() to construct. + private TranscriptNormalization(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TranscriptNormalization() { + entries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TranscriptNormalization(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.TranscriptNormalization.class, + com.google.cloud.speech.v2.TranscriptNormalization.Builder.class); + } + + public interface EntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v2.TranscriptNormalization.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * What to replace. Max length is 100 characters.
+     * 
+ * + * string search = 1; + * + * @return The search. + */ + java.lang.String getSearch(); + /** + * + * + *
+     * What to replace. Max length is 100 characters.
+     * 
+ * + * string search = 1; + * + * @return The bytes for search. + */ + com.google.protobuf.ByteString getSearchBytes(); + + /** + * + * + *
+     * What to replace with. Max length is 100 characters.
+     * 
+ * + * string replace = 2; + * + * @return The replace. + */ + java.lang.String getReplace(); + /** + * + * + *
+     * What to replace with. Max length is 100 characters.
+     * 
+ * + * string replace = 2; + * + * @return The bytes for replace. + */ + com.google.protobuf.ByteString getReplaceBytes(); + + /** + * + * + *
+     * Whether the search is case sensitive.
+     * 
+ * + * bool case_sensitive = 3; + * + * @return The caseSensitive. + */ + boolean getCaseSensitive(); + } + /** + * + * + *
+   * A single replacement configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v2.TranscriptNormalization.Entry} + */ + public static final class Entry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v2.TranscriptNormalization.Entry) + EntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entry.newBuilder() to construct. + private Entry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entry() { + search_ = ""; + replace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.TranscriptNormalization.Entry.class, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder.class); + } + + public static final int SEARCH_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object search_ = ""; + /** + * + * + *
+     * What to replace. Max length is 100 characters.
+     * 
+ * + * string search = 1; + * + * @return The search. + */ + @java.lang.Override + public java.lang.String getSearch() { + java.lang.Object ref = search_; + 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(); + search_ = s; + return s; + } + } + /** + * + * + *
+     * What to replace. Max length is 100 characters.
+     * 
+ * + * string search = 1; + * + * @return The bytes for search. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchBytes() { + java.lang.Object ref = search_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + search_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLACE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object replace_ = ""; + /** + * + * + *
+     * What to replace with. Max length is 100 characters.
+     * 
+ * + * string replace = 2; + * + * @return The replace. + */ + @java.lang.Override + public java.lang.String getReplace() { + java.lang.Object ref = replace_; + 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(); + replace_ = s; + return s; + } + } + /** + * + * + *
+     * What to replace with. Max length is 100 characters.
+     * 
+ * + * string replace = 2; + * + * @return The bytes for replace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReplaceBytes() { + java.lang.Object ref = replace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CASE_SENSITIVE_FIELD_NUMBER = 3; + private boolean caseSensitive_ = false; + /** + * + * + *
+     * Whether the search is case sensitive.
+     * 
+ * + * bool case_sensitive = 3; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + + 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(search_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, search_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, replace_); + } + if (caseSensitive_ != false) { + output.writeBool(3, caseSensitive_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(search_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, search_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, replace_); + } + if (caseSensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, caseSensitive_); + } + size += getUnknownFields().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.v2.TranscriptNormalization.Entry)) { + return super.equals(obj); + } + com.google.cloud.speech.v2.TranscriptNormalization.Entry other = + (com.google.cloud.speech.v2.TranscriptNormalization.Entry) obj; + + if (!getSearch().equals(other.getSearch())) return false; + if (!getReplace().equals(other.getReplace())) return false; + if (getCaseSensitive() != other.getCaseSensitive()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SEARCH_FIELD_NUMBER; + hash = (53 * hash) + getSearch().hashCode(); + hash = (37 * hash) + REPLACE_FIELD_NUMBER; + hash = (53 * hash) + getReplace().hashCode(); + hash = (37 * hash) + CASE_SENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseSensitive()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry 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.v2.TranscriptNormalization.Entry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry 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.v2.TranscriptNormalization.Entry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry 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.v2.TranscriptNormalization.Entry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry 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.v2.TranscriptNormalization.Entry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry 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.v2.TranscriptNormalization.Entry 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 single replacement configuration.
+     * 
+ * + * Protobuf type {@code google.cloud.speech.v2.TranscriptNormalization.Entry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v2.TranscriptNormalization.Entry) + com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.TranscriptNormalization.Entry.class, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder.class); + } + + // Construct using com.google.cloud.speech.v2.TranscriptNormalization.Entry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + search_ = ""; + replace_ = ""; + caseSensitive_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_Entry_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization.Entry getDefaultInstanceForType() { + return com.google.cloud.speech.v2.TranscriptNormalization.Entry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization.Entry build() { + com.google.cloud.speech.v2.TranscriptNormalization.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization.Entry buildPartial() { + com.google.cloud.speech.v2.TranscriptNormalization.Entry result = + new com.google.cloud.speech.v2.TranscriptNormalization.Entry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.speech.v2.TranscriptNormalization.Entry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.search_ = search_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.replace_ = replace_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.caseSensitive_ = caseSensitive_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.speech.v2.TranscriptNormalization.Entry) { + return mergeFrom((com.google.cloud.speech.v2.TranscriptNormalization.Entry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v2.TranscriptNormalization.Entry other) { + if (other == com.google.cloud.speech.v2.TranscriptNormalization.Entry.getDefaultInstance()) + return this; + if (!other.getSearch().isEmpty()) { + search_ = other.search_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getReplace().isEmpty()) { + replace_ = other.replace_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getCaseSensitive() != false) { + setCaseSensitive(other.getCaseSensitive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + search_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + replace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + caseSensitive_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object search_ = ""; + /** + * + * + *
+       * What to replace. Max length is 100 characters.
+       * 
+ * + * string search = 1; + * + * @return The search. + */ + public java.lang.String getSearch() { + java.lang.Object ref = search_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + search_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * What to replace. Max length is 100 characters.
+       * 
+ * + * string search = 1; + * + * @return The bytes for search. + */ + public com.google.protobuf.ByteString getSearchBytes() { + java.lang.Object ref = search_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + search_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * What to replace. Max length is 100 characters.
+       * 
+ * + * string search = 1; + * + * @param value The search to set. + * @return This builder for chaining. + */ + public Builder setSearch(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + search_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * What to replace. Max length is 100 characters.
+       * 
+ * + * string search = 1; + * + * @return This builder for chaining. + */ + public Builder clearSearch() { + search_ = getDefaultInstance().getSearch(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * What to replace. Max length is 100 characters.
+       * 
+ * + * string search = 1; + * + * @param value The bytes for search to set. + * @return This builder for chaining. + */ + public Builder setSearchBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + search_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object replace_ = ""; + /** + * + * + *
+       * What to replace with. Max length is 100 characters.
+       * 
+ * + * string replace = 2; + * + * @return The replace. + */ + public java.lang.String getReplace() { + java.lang.Object ref = replace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * What to replace with. Max length is 100 characters.
+       * 
+ * + * string replace = 2; + * + * @return The bytes for replace. + */ + public com.google.protobuf.ByteString getReplaceBytes() { + java.lang.Object ref = replace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * What to replace with. Max length is 100 characters.
+       * 
+ * + * string replace = 2; + * + * @param value The replace to set. + * @return This builder for chaining. + */ + public Builder setReplace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + replace_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * What to replace with. Max length is 100 characters.
+       * 
+ * + * string replace = 2; + * + * @return This builder for chaining. + */ + public Builder clearReplace() { + replace_ = getDefaultInstance().getReplace(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * What to replace with. Max length is 100 characters.
+       * 
+ * + * string replace = 2; + * + * @param value The bytes for replace to set. + * @return This builder for chaining. + */ + public Builder setReplaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + replace_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean caseSensitive_; + /** + * + * + *
+       * Whether the search is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + /** + * + * + *
+       * Whether the search is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @param value The caseSensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseSensitive(boolean value) { + + caseSensitive_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the search is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @return This builder for chaining. + */ + public Builder clearCaseSensitive() { + bitField0_ = (bitField0_ & ~0x00000004); + caseSensitive_ = false; + 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.v2.TranscriptNormalization.Entry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v2.TranscriptNormalization.Entry) + private static final com.google.cloud.speech.v2.TranscriptNormalization.Entry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v2.TranscriptNormalization.Entry(); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization.Entry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization.Entry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List entries_; + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization.Entry getEntries(int index) { + return entries_.get(index); + } + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.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 < entries_.size(); i++) { + output.writeMessage(1, entries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); + } + size += getUnknownFields().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.v2.TranscriptNormalization)) { + return super.equals(obj); + } + com.google.cloud.speech.v2.TranscriptNormalization other = + (com.google.cloud.speech.v2.TranscriptNormalization) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v2.TranscriptNormalization parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization 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.v2.TranscriptNormalization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization 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.v2.TranscriptNormalization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization 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.v2.TranscriptNormalization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization 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.v2.TranscriptNormalization parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization 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.v2.TranscriptNormalization 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; + } + /** + * + * + *
+   * Transcription normalization configuration. Use transcription normalization
+   * to automatically replace parts of the transcript with phrases of your
+   * choosing. For StreamingRecognize, this normalization only applies to stable
+   * partial transcripts (stability > 0.8) and final transcripts.
+   * 
+ * + * Protobuf type {@code google.cloud.speech.v2.TranscriptNormalization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v2.TranscriptNormalization) + com.google.cloud.speech.v2.TranscriptNormalizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v2.TranscriptNormalization.class, + com.google.cloud.speech.v2.TranscriptNormalization.Builder.class); + } + + // Construct using com.google.cloud.speech.v2.TranscriptNormalization.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v2.CloudSpeechProto + .internal_static_google_cloud_speech_v2_TranscriptNormalization_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization getDefaultInstanceForType() { + return com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization build() { + com.google.cloud.speech.v2.TranscriptNormalization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization buildPartial() { + com.google.cloud.speech.v2.TranscriptNormalization result = + new com.google.cloud.speech.v2.TranscriptNormalization(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.speech.v2.TranscriptNormalization result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.speech.v2.TranscriptNormalization result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.speech.v2.TranscriptNormalization) { + return mergeFrom((com.google.cloud.speech.v2.TranscriptNormalization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v2.TranscriptNormalization other) { + if (other == com.google.cloud.speech.v2.TranscriptNormalization.getDefaultInstance()) + return this; + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000001); + entriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.speech.v2.TranscriptNormalization.Entry m = + input.readMessage( + com.google.cloud.speech.v2.TranscriptNormalization.Entry.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList( + entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v2.TranscriptNormalization.Entry, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder, + com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public java.util.List + getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public com.google.cloud.speech.v2.TranscriptNormalization.Entry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder setEntries( + int index, com.google.cloud.speech.v2.TranscriptNormalization.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder setEntries( + int index, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder addEntries(com.google.cloud.speech.v2.TranscriptNormalization.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder addEntries( + int index, com.google.cloud.speech.v2.TranscriptNormalization.Entry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder addEntries( + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder addEntries( + int index, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder addAllEntries( + java.lang.Iterable + values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder getEntriesBuilder( + int index) { + return getEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public java.util.List< + ? extends com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder> + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder( + com.google.cloud.speech.v2.TranscriptNormalization.Entry.getDefaultInstance()); + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder addEntriesBuilder( + int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, com.google.cloud.speech.v2.TranscriptNormalization.Entry.getDefaultInstance()); + } + /** + * + * + *
+     * A list of replacement entries. We will perform replacement with one entry
+     * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+     * => "mountain dog"] will never be applied because we will always process the
+     * first entry before it. At most 100 entries.
+     * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v2.TranscriptNormalization.Entry, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder, + com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v2.TranscriptNormalization.Entry, + com.google.cloud.speech.v2.TranscriptNormalization.Entry.Builder, + com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder>( + entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + @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.v2.TranscriptNormalization) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v2.TranscriptNormalization) + private static final com.google.cloud.speech.v2.TranscriptNormalization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v2.TranscriptNormalization(); + } + + public static com.google.cloud.speech.v2.TranscriptNormalization getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TranscriptNormalization parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.speech.v2.TranscriptNormalization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalizationOrBuilder.java b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalizationOrBuilder.java new file mode 100644 index 000000000000..efd7abbba415 --- /dev/null +++ b/java-speech/proto-google-cloud-speech-v2/src/main/java/com/google/cloud/speech/v2/TranscriptNormalizationOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2023 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/v2/cloud_speech.proto + +package com.google.cloud.speech.v2; + +public interface TranscriptNormalizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v2.TranscriptNormalization) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + java.util.List getEntriesList(); + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + com.google.cloud.speech.v2.TranscriptNormalization.Entry getEntries(int index); + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + int getEntriesCount(); + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + java.util.List + getEntriesOrBuilderList(); + /** + * + * + *
+   * A list of replacement entries. We will perform replacement with one entry
+   * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
+   * => "mountain dog"] will never be applied because we will always process the
+   * first entry before it. At most 100 entries.
+   * 
+ * + * repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1; + */ + com.google.cloud.speech.v2.TranscriptNormalization.EntryOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-speech/proto-google-cloud-speech-v2/src/main/proto/google/cloud/speech/v2/cloud_speech.proto b/java-speech/proto-google-cloud-speech-v2/src/main/proto/google/cloud/speech/v2/cloud_speech.proto index c2074e5b715c..d23d36d80171 100644 --- a/java-speech/proto-google-cloud-speech-v2/src/main/proto/google/cloud/speech/v2/cloud_speech.proto +++ b/java-speech/proto-google-cloud-speech-v2/src/main/proto/google/cloud/speech/v2/cloud_speech.proto @@ -585,8 +585,12 @@ message Recognizer { // characters or less. string display_name = 3; - // Optional. Which model to use for recognition requests. Select the model - // best suited to your domain to get best results. + // Optional. This field is now deprecated. Prefer the + // [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the + // [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message. + // + // Which model to use for recognition requests. Select the model best suited + // to your domain to get best results. // // Guidance for choosing which model to use can be found in the [Transcription // Models @@ -596,7 +600,12 @@ message Recognizer { // Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages). string model = 4 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - // Optional. The language of the supplied audio as a + // Optional. This field is now deprecated. Prefer the + // [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes] + // field in the + // [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message. + // + // The language of the supplied audio as a // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. // // Supported languages for each model are listed in the [Table of Supported @@ -693,6 +702,8 @@ message Recognizer { // * OGG_OPUS: Opus audio frames in an Ogg container. // // * WEBM_OPUS: Opus audio frames in a WebM container. +// +// * M4A: M4A audio format. message AutoDetectDecodingConfig {} // Explicitly specified decoding parameters. @@ -827,6 +838,30 @@ message RecognitionFeatures { int32 max_alternatives = 16; } +// Transcription normalization configuration. Use transcription normalization +// to automatically replace parts of the transcript with phrases of your +// choosing. For StreamingRecognize, this normalization only applies to stable +// partial transcripts (stability > 0.8) and final transcripts. +message TranscriptNormalization { + // A single replacement configuration. + message Entry { + // What to replace. Max length is 100 characters. + string search = 1; + + // What to replace with. Max length is 100 characters. + string replace = 2; + + // Whether the search is case sensitive. + bool case_sensitive = 3; + } + + // A list of replacement entries. We will perform replacement with one entry + // at a time. For example, the second entry in ["cat" => "dog", "mountain cat" + // => "mountain dog"] will never be applied because we will always process the + // first entry before it. At most 100 entries. + repeated Entry entries = 1; +} + // Provides "hints" to the speech recognizer to favor specific words and phrases // in the results. PhraseSets can be specified as an inline resource, or a // reference to an existing PhraseSet resource. @@ -898,6 +933,13 @@ message RecognitionConfig { // Speech adaptation context that weights recognizer predictions for specific // words and phrases. SpeechAdaptation adaptation = 6; + + // Optional. Use transcription normalization to automatically replace parts of + // the transcript with phrases of your choosing. For StreamingRecognize, this + // normalization only applies to stable partial transcripts (stability > 0.8) + // and final transcripts. + TranscriptNormalization transcript_normalization = 11 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for the @@ -1275,21 +1317,45 @@ message BatchRecognizeResults { RecognitionResponseMetadata metadata = 2; } -// Final results for a single file. -message BatchRecognizeFileResult { +// Final results written to Cloud Storage. +message CloudStorageResult { // The Cloud Storage URI to which recognition results were written. string uri = 1; +} + +// Final results returned inline in the recognition response. +message InlineResult { + // The transcript for the audio file. + BatchRecognizeResults transcript = 1; +} +// Final results for a single file. +message BatchRecognizeFileResult { // Error if one was encountered. google.rpc.Status error = 2; RecognitionResponseMetadata metadata = 3; - // The transcript for the audio file. This is populated only when - // [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in - // the - // [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig]. - BatchRecognizeResults transcript = 4; + oneof result { + // Recognition results written to Cloud Storage. This is + // populated only when + // [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in + // the + // [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig]. + CloudStorageResult cloud_storage_result = 5; + + // Recognition results. This is populated only when + // [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in + // the + // [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig]. + InlineResult inline_result = 6; + } + + // Deprecated. Use `cloud_storage_result.native_format_uri` instead. + string uri = 1 [deprecated = true]; + + // Deprecated. Use `inline_result.transcript` instead. + BatchRecognizeResults transcript = 4 [deprecated = true]; } // Metadata about transcription for a single file (for example, progress