From 548860ad624860b6ca6da61908b77f485286f0cc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 31 Aug 2021 15:22:54 -0700 Subject: [PATCH] feat: Add transcript normalization (#633) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/93e35f18-d7eb-43c5-9c14-7d89d6214a02/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 391603958 Source-Link: https://github.com/googleapis/googleapis/commit/76bed90afcd459c0345b1bd0ab3e5cd53260e04d PiperOrigin-RevId: 391407209 Source-Link: https://github.com/googleapis/googleapis/commit/e1738ee972b49fd0c4d4718b035444495142b781 feat!: java8 migration --- .../speech/v1/stub/SpeechStubSettings.java | 4 +- .../stub/AdaptationStubSettings.java | 4 +- .../v1p1beta1/stub/SpeechStubSettings.java | 4 +- .../speech/v1p1beta1/RecognitionConfig.java | 335 +++ .../v1p1beta1/RecognitionConfigOrBuilder.java | 48 + .../cloud/speech/v1p1beta1/SpeechProto.java | 241 +- .../speech/v1p1beta1/SpeechResourceProto.java | 81 +- .../v1p1beta1/TranscriptNormalization.java | 2037 +++++++++++++++++ .../TranscriptNormalizationOrBuilder.java | 93 + .../cloud/speech/v1p1beta1/cloud_speech.proto | 6 + .../cloud/speech/v1p1beta1/resource.proto | 25 + synth.metadata | 10 +- 12 files changed, 2738 insertions(+), 150 deletions(-) create mode 100644 proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalization.java create mode 100644 proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalizationOrBuilder.java diff --git a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/SpeechStubSettings.java b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/SpeechStubSettings.java index af3e8bbaa..c55156e5c 100644 --- a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/SpeechStubSettings.java +++ b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/SpeechStubSettings.java @@ -156,7 +156,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/AdaptationStubSettings.java b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/AdaptationStubSettings.java index 0ebf07e72..911fc3cac 100644 --- a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/AdaptationStubSettings.java +++ b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/AdaptationStubSettings.java @@ -318,7 +318,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/SpeechStubSettings.java b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/SpeechStubSettings.java index 1ce401eb9..b9a2aedb7 100644 --- a/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/SpeechStubSettings.java +++ b/google-cloud-speech/src/main/java/com/google/cloud/speech/v1p1beta1/stub/SpeechStubSettings.java @@ -157,7 +157,9 @@ public static List getDefaultServiceScopes() { /** Returns a builder for the default credentials for this service. */ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); } /** Returns a builder for the default ChannelProvider for this service. */ diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java index 1799127be..afc195208 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfig.java @@ -253,6 +253,23 @@ private RecognitionConfig( enableSpokenEmojis_ = subBuilder.buildPartial(); } + break; + } + case 194: + { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder subBuilder = null; + if (transcriptNormalization_ != null) { + subBuilder = transcriptNormalization_.toBuilder(); + } + transcriptNormalization_ = + input.readMessage( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transcriptNormalization_); + transcriptNormalization_ = subBuilder.buildPartial(); + } + break; } default: @@ -1059,6 +1076,67 @@ public com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptation return getAdaptation(); } + public static final int TRANSCRIPT_NORMALIZATION_FIELD_NUMBER = 24; + private com.google.cloud.speech.v1p1beta1.TranscriptNormalization transcriptNormalization_; + /** + * + * + *
+   * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + * + * @return Whether the transcriptNormalization field is set. + */ + @java.lang.Override + public boolean hasTranscriptNormalization() { + return transcriptNormalization_ != null; + } + /** + * + * + *
+   * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + * + * @return The transcriptNormalization. + */ + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization getTranscriptNormalization() { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v1p1beta1.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } + /** + * + * + *
+   * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder + getTranscriptNormalizationOrBuilder() { + return getTranscriptNormalization(); + } + public static final int SPEECH_CONTEXTS_FIELD_NUMBER = 6; private java.util.List speechContexts_; /** @@ -1713,6 +1791,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableSpokenEmojis_ != null) { output.writeMessage(23, getEnableSpokenEmojis()); } + if (transcriptNormalization_ != null) { + output.writeMessage(24, getTranscriptNormalization()); + } unknownFields.writeTo(output); } @@ -1797,6 +1878,11 @@ public int getSerializedSize() { if (enableSpokenEmojis_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getEnableSpokenEmojis()); } + if (transcriptNormalization_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 24, getTranscriptNormalization()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1827,6 +1913,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 (!getSpeechContextsList().equals(other.getSpeechContextsList())) return false; if (getEnableWordTimeOffsets() != other.getEnableWordTimeOffsets()) return false; if (getEnableWordConfidence() != other.getEnableWordConfidence()) return false; @@ -1886,6 +1976,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(); + } if (getSpeechContextsCount() > 0) { hash = (37 * hash) + SPEECH_CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getSpeechContextsList().hashCode(); @@ -2090,6 +2184,12 @@ public Builder clear() { adaptation_ = null; adaptationBuilder_ = null; } + if (transcriptNormalizationBuilder_ == null) { + transcriptNormalization_ = null; + } else { + transcriptNormalization_ = null; + transcriptNormalizationBuilder_ = null; + } if (speechContextsBuilder_ == null) { speechContexts_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); @@ -2179,6 +2279,11 @@ public com.google.cloud.speech.v1p1beta1.RecognitionConfig buildPartial() { } else { result.adaptation_ = adaptationBuilder_.build(); } + if (transcriptNormalizationBuilder_ == null) { + result.transcriptNormalization_ = transcriptNormalization_; + } else { + result.transcriptNormalization_ = transcriptNormalizationBuilder_.build(); + } if (speechContextsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { speechContexts_ = java.util.Collections.unmodifiableList(speechContexts_); @@ -2300,6 +2405,9 @@ public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.RecognitionConfig oth if (other.hasAdaptation()) { mergeAdaptation(other.getAdaptation()); } + if (other.hasTranscriptNormalization()) { + mergeTranscriptNormalization(other.getTranscriptNormalization()); + } if (speechContextsBuilder_ == null) { if (!other.speechContexts_.isEmpty()) { if (speechContexts_.isEmpty()) { @@ -3459,6 +3567,233 @@ public com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptation return adaptationBuilder_; } + private com.google.cloud.speech.v1p1beta1.TranscriptNormalization transcriptNormalization_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder, + com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder> + transcriptNormalizationBuilder_; + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + * + * @return Whether the transcriptNormalization field is set. + */ + public boolean hasTranscriptNormalization() { + return transcriptNormalizationBuilder_ != null || transcriptNormalization_ != null; + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + * + * @return The transcriptNormalization. + */ + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization getTranscriptNormalization() { + if (transcriptNormalizationBuilder_ == null) { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v1p1beta1.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } else { + return transcriptNormalizationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + public Builder setTranscriptNormalization( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization value) { + if (transcriptNormalizationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transcriptNormalization_ = value; + onChanged(); + } else { + transcriptNormalizationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + public Builder setTranscriptNormalization( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder builderForValue) { + if (transcriptNormalizationBuilder_ == null) { + transcriptNormalization_ = builderForValue.build(); + onChanged(); + } else { + transcriptNormalizationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + public Builder mergeTranscriptNormalization( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization value) { + if (transcriptNormalizationBuilder_ == null) { + if (transcriptNormalization_ != null) { + transcriptNormalization_ = + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.newBuilder( + transcriptNormalization_) + .mergeFrom(value) + .buildPartial(); + } else { + transcriptNormalization_ = value; + } + onChanged(); + } else { + transcriptNormalizationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + public Builder clearTranscriptNormalization() { + if (transcriptNormalizationBuilder_ == null) { + transcriptNormalization_ = null; + onChanged(); + } else { + transcriptNormalization_ = null; + transcriptNormalizationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder + getTranscriptNormalizationBuilder() { + + onChanged(); + return getTranscriptNormalizationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + public com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder + getTranscriptNormalizationOrBuilder() { + if (transcriptNormalizationBuilder_ != null) { + return transcriptNormalizationBuilder_.getMessageOrBuilder(); + } else { + return transcriptNormalization_ == null + ? com.google.cloud.speech.v1p1beta1.TranscriptNormalization.getDefaultInstance() + : transcriptNormalization_; + } + } + /** + * + * + *
+     * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder, + com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder> + getTranscriptNormalizationFieldBuilder() { + if (transcriptNormalizationBuilder_ == null) { + transcriptNormalizationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder, + com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder>( + getTranscriptNormalization(), getParentForChildren(), isClean()); + transcriptNormalization_ = null; + } + return transcriptNormalizationBuilder_; + } + private java.util.List speechContexts_ = java.util.Collections.emptyList(); diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java index 99350d004..c136ef3a5 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/RecognitionConfigOrBuilder.java @@ -321,6 +321,54 @@ public interface RecognitionConfigOrBuilder */ com.google.cloud.speech.v1p1beta1.SpeechAdaptationOrBuilder getAdaptationOrBuilder(); + /** + * + * + *
+   * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + * + * @return Whether the transcriptNormalization field is set. + */ + boolean hasTranscriptNormalization(); + /** + * + * + *
+   * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + * + * @return The transcriptNormalization. + */ + com.google.cloud.speech.v1p1beta1.TranscriptNormalization getTranscriptNormalization(); + /** + * + * + *
+   * 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.v1p1beta1.TranscriptNormalization transcript_normalization = 24; + * + */ + com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder + getTranscriptNormalizationOrBuilder(); + /** * * diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java index dfe1c4795..37c859935 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechProto.java @@ -137,7 +137,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\"\226\001\n\032StreamingRecognitionConfig\022E\n\006confi" + "g\030\001 \001(\01320.google.cloud.speech.v1p1beta1." + "RecognitionConfigB\003\340A\002\022\030\n\020single_utteran" - + "ce\030\002 \001(\010\022\027\n\017interim_results\030\003 \001(\010\"\344\010\n\021Re" + + "ce\030\002 \001(\010\022\027\n\017interim_results\030\003 \001(\010\"\276\t\n\021Re" + "cognitionConfig\022P\n\010encoding\030\001 \001(\0162>.goog" + "le.cloud.speech.v1p1beta1.RecognitionCon" + "fig.AudioEncoding\022\031\n\021sample_rate_hertz\030\002" @@ -147,124 +147,126 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ative_language_codes\030\022 \003(\t\022\030\n\020max_altern" + "atives\030\004 \001(\005\022\030\n\020profanity_filter\030\005 \001(\010\022C" + "\n\nadaptation\030\024 \001(\0132/.google.cloud.speech" - + ".v1p1beta1.SpeechAdaptation\022E\n\017speech_co" - + "ntexts\030\006 \003(\0132,.google.cloud.speech.v1p1b" - + "eta1.SpeechContext\022 \n\030enable_word_time_o" - + "ffsets\030\010 \001(\010\022\036\n\026enable_word_confidence\030\017" - + " \001(\010\022$\n\034enable_automatic_punctuation\030\013 \001" - + "(\010\022=\n\031enable_spoken_punctuation\030\026 \001(\0132\032." - + "google.protobuf.BoolValue\0228\n\024enable_spok" - + "en_emojis\030\027 \001(\0132\032.google.protobuf.BoolVa" - + "lue\022&\n\032enable_speaker_diarization\030\020 \001(\010B" - + "\002\030\001\022%\n\031diarization_speaker_count\030\021 \001(\005B\002" - + "\030\001\022S\n\022diarization_config\030\023 \001(\01327.google." - + "cloud.speech.v1p1beta1.SpeakerDiarizatio" - + "nConfig\022D\n\010metadata\030\t \001(\01322.google.cloud" - + ".speech.v1p1beta1.RecognitionMetadata\022\r\n" - + "\005model\030\r \001(\t\022\024\n\014use_enhanced\030\016 \001(\010\"\243\001\n\rA" - + "udioEncoding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\014" - + "\n\010LINEAR16\020\001\022\010\n\004FLAC\020\002\022\t\n\005MULAW\020\003\022\007\n\003AMR" - + "\020\004\022\n\n\006AMR_WB\020\005\022\014\n\010OGG_OPUS\020\006\022\032\n\026SPEEX_WI" - + "TH_HEADER_BYTE\020\007\022\007\n\003MP3\020\010\022\r\n\tWEBM_OPUS\020\t" - + "\"\220\001\n\030SpeakerDiarizationConfig\022\"\n\032enable_" - + "speaker_diarization\030\001 \001(\010\022\031\n\021min_speaker" - + "_count\030\002 \001(\005\022\031\n\021max_speaker_count\030\003 \001(\005\022" - + "\032\n\013speaker_tag\030\005 \001(\005B\005\030\001\340A\003\"\327\010\n\023Recognit" - + "ionMetadata\022\\\n\020interaction_type\030\001 \001(\0162B." - + "google.cloud.speech.v1p1beta1.Recognitio" - + "nMetadata.InteractionType\022$\n\034industry_na" - + "ics_code_of_audio\030\003 \001(\r\022b\n\023microphone_di" - + "stance\030\004 \001(\0162E.google.cloud.speech.v1p1b" - + "eta1.RecognitionMetadata.MicrophoneDista" - + "nce\022a\n\023original_media_type\030\005 \001(\0162D.googl" - + "e.cloud.speech.v1p1beta1.RecognitionMeta" - + "data.OriginalMediaType\022e\n\025recording_devi" - + "ce_type\030\006 \001(\0162F.google.cloud.speech.v1p1" - + "beta1.RecognitionMetadata.RecordingDevic" - + "eType\022\035\n\025recording_device_name\030\007 \001(\t\022\032\n\022" - + "original_mime_type\030\010 \001(\t\022\031\n\robfuscated_i" - + "d\030\t \001(\003B\002\030\001\022\023\n\013audio_topic\030\n \001(\t\"\305\001\n\017Int" - + "eractionType\022 \n\034INTERACTION_TYPE_UNSPECI" - + "FIED\020\000\022\016\n\nDISCUSSION\020\001\022\020\n\014PRESENTATION\020\002" - + "\022\016\n\nPHONE_CALL\020\003\022\r\n\tVOICEMAIL\020\004\022\033\n\027PROFE" - + "SSIONALLY_PRODUCED\020\005\022\020\n\014VOICE_SEARCH\020\006\022\021" - + "\n\rVOICE_COMMAND\020\007\022\r\n\tDICTATION\020\010\"d\n\022Micr" - + "ophoneDistance\022#\n\037MICROPHONE_DISTANCE_UN" - + "SPECIFIED\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010MIDFIELD\020\002" - + "\022\014\n\010FARFIELD\020\003\"N\n\021OriginalMediaType\022#\n\037O" - + "RIGINAL_MEDIA_TYPE_UNSPECIFIED\020\000\022\t\n\005AUDI" - + "O\020\001\022\t\n\005VIDEO\020\002\"\244\001\n\023RecordingDeviceType\022%" - + "\n!RECORDING_DEVICE_TYPE_UNSPECIFIED\020\000\022\016\n" - + "\nSMARTPHONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE_LINE\020\003\022\013\n" - + "\007VEHICLE\020\004\022\030\n\024OTHER_OUTDOOR_DEVICE\020\005\022\027\n\023" - + "OTHER_INDOOR_DEVICE\020\006\"/\n\rSpeechContext\022\017" - + "\n\007phrases\030\001 \003(\t\022\r\n\005boost\030\004 \001(\002\"D\n\020Recogn" - + "itionAudio\022\021\n\007content\030\001 \001(\014H\000\022\r\n\003uri\030\002 \001" - + "(\tH\000B\016\n\014audio_source\"\222\001\n\021RecognizeRespon" - + "se\022G\n\007results\030\002 \003(\01326.google.cloud.speec" - + "h.v1p1beta1.SpeechRecognitionResult\0224\n\021t" - + "otal_billed_time\030\003 \001(\0132\031.google.protobuf" - + ".Duration\"\225\002\n\034LongRunningRecognizeRespon" - + "se\022G\n\007results\030\002 \003(\01326.google.cloud.speec" - + "h.v1p1beta1.SpeechRecognitionResult\0224\n\021t" - + "otal_billed_time\030\003 \001(\0132\031.google.protobuf" - + ".Duration\022L\n\routput_config\030\006 \001(\01325.googl" - + "e.cloud.speech.v1p1beta1.TranscriptOutpu" - + "tConfig\022(\n\014output_error\030\007 \001(\0132\022.google.r" - + "pc.Status\"\203\002\n\034LongRunningRecognizeMetada" - + "ta\022\030\n\020progress_percent\030\001 \001(\005\022.\n\nstart_ti" - + "me\030\002 \001(\0132\032.google.protobuf.Timestamp\0224\n\020" - + "last_update_time\030\003 \001(\0132\032.google.protobuf" - + ".Timestamp\022\020\n\003uri\030\004 \001(\tB\003\340A\003\022Q\n\routput_c" - + "onfig\030\005 \001(\01325.google.cloud.speech.v1p1be" - + "ta1.TranscriptOutputConfigB\003\340A\003\"\365\002\n\032Stre" - + "amingRecognizeResponse\022!\n\005error\030\001 \001(\0132\022." - + "google.rpc.Status\022J\n\007results\030\002 \003(\01329.goo" - + "gle.cloud.speech.v1p1beta1.StreamingReco" - + "gnitionResult\022d\n\021speech_event_type\030\004 \001(\016" - + "2I.google.cloud.speech.v1p1beta1.Streami" - + "ngRecognizeResponse.SpeechEventType\0224\n\021t" - + "otal_billed_time\030\005 \001(\0132\031.google.protobuf" - + ".Duration\"L\n\017SpeechEventType\022\034\n\030SPEECH_E" - + "VENT_UNSPECIFIED\020\000\022\033\n\027END_OF_SINGLE_UTTE" - + "RANCE\020\001\"\371\001\n\032StreamingRecognitionResult\022Q" - + "\n\014alternatives\030\001 \003(\0132;.google.cloud.spee" - + "ch.v1p1beta1.SpeechRecognitionAlternativ" - + "e\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstability\030\003 \001(\002\0222" - + "\n\017result_end_time\030\004 \001(\0132\031.google.protobu" - + "f.Duration\022\023\n\013channel_tag\030\005 \001(\005\022\032\n\rlangu" - + "age_code\030\006 \001(\tB\003\340A\003\"\235\001\n\027SpeechRecognitio" - + "nResult\022Q\n\014alternatives\030\001 \003(\0132;.google.c" - + "loud.speech.v1p1beta1.SpeechRecognitionA" - + "lternative\022\023\n\013channel_tag\030\002 \001(\005\022\032\n\rlangu" - + "age_code\030\005 \001(\tB\003\340A\003\"~\n\034SpeechRecognition" - + "Alternative\022\022\n\ntranscript\030\001 \001(\t\022\022\n\nconfi" - + "dence\030\002 \001(\002\0226\n\005words\030\003 \003(\0132\'.google.clou" - + "d.speech.v1p1beta1.WordInfo\"\242\001\n\010WordInfo" - + "\022-\n\nstart_time\030\001 \001(\0132\031.google.protobuf.D" - + "uration\022+\n\010end_time\030\002 \001(\0132\031.google.proto" - + "buf.Duration\022\014\n\004word\030\003 \001(\t\022\022\n\nconfidence" - + "\030\004 \001(\002\022\030\n\013speaker_tag\030\005 \001(\005B\003\340A\0032\202\005\n\006Spe" - + "ech\022\245\001\n\tRecognize\022/.google.cloud.speech." - + "v1p1beta1.RecognizeRequest\0320.google.clou" - + "d.speech.v1p1beta1.RecognizeResponse\"5\202\323" - + "\344\223\002 \"\033/v1p1beta1/speech:recognize:\001*\332A\014c" - + "onfig,audio\022\362\001\n\024LongRunningRecognize\022:.g" - + "oogle.cloud.speech.v1p1beta1.LongRunning" - + "RecognizeRequest\032\035.google.longrunning.Op" - + "eration\"\177\202\323\344\223\002+\"&/v1p1beta1/speech:longr" - + "unningrecognize:\001*\332A\014config,audio\312A<\n\034Lo" - + "ngRunningRecognizeResponse\022\034LongRunningR" - + "ecognizeMetadata\022\217\001\n\022StreamingRecognize\022" - + "8.google.cloud.speech.v1p1beta1.Streamin" - + "gRecognizeRequest\0329.google.cloud.speech." - + "v1p1beta1.StreamingRecognizeResponse\"\000(\001" - + "0\001\032I\312A\025speech.googleapis.com\322A.https://w" - + "ww.googleapis.com/auth/cloud-platformB\200\001" - + "\n!com.google.cloud.speech.v1p1beta1B\013Spe" - + "echProtoP\001ZCgoogle.golang.org/genproto/g" - + "oogleapis/cloud/speech/v1p1beta1;speech\370" - + "\001\001\242\002\003GCSb\006proto3" + + ".v1p1beta1.SpeechAdaptation\022X\n\030transcrip" + + "t_normalization\030\030 \001(\01326.google.cloud.spe" + + "ech.v1p1beta1.TranscriptNormalization\022E\n" + + "\017speech_contexts\030\006 \003(\0132,.google.cloud.sp" + + "eech.v1p1beta1.SpeechContext\022 \n\030enable_w" + + "ord_time_offsets\030\010 \001(\010\022\036\n\026enable_word_co" + + "nfidence\030\017 \001(\010\022$\n\034enable_automatic_punct" + + "uation\030\013 \001(\010\022=\n\031enable_spoken_punctuatio" + + "n\030\026 \001(\0132\032.google.protobuf.BoolValue\0228\n\024e" + + "nable_spoken_emojis\030\027 \001(\0132\032.google.proto" + + "buf.BoolValue\022&\n\032enable_speaker_diarizat" + + "ion\030\020 \001(\010B\002\030\001\022%\n\031diarization_speaker_cou" + + "nt\030\021 \001(\005B\002\030\001\022S\n\022diarization_config\030\023 \001(\013" + + "27.google.cloud.speech.v1p1beta1.Speaker" + + "DiarizationConfig\022D\n\010metadata\030\t \001(\01322.go" + + "ogle.cloud.speech.v1p1beta1.RecognitionM" + + "etadata\022\r\n\005model\030\r \001(\t\022\024\n\014use_enhanced\030\016" + + " \001(\010\"\243\001\n\rAudioEncoding\022\030\n\024ENCODING_UNSPE" + + "CIFIED\020\000\022\014\n\010LINEAR16\020\001\022\010\n\004FLAC\020\002\022\t\n\005MULA" + + "W\020\003\022\007\n\003AMR\020\004\022\n\n\006AMR_WB\020\005\022\014\n\010OGG_OPUS\020\006\022\032" + + "\n\026SPEEX_WITH_HEADER_BYTE\020\007\022\007\n\003MP3\020\010\022\r\n\tW" + + "EBM_OPUS\020\t\"\220\001\n\030SpeakerDiarizationConfig\022" + + "\"\n\032enable_speaker_diarization\030\001 \001(\010\022\031\n\021m" + + "in_speaker_count\030\002 \001(\005\022\031\n\021max_speaker_co" + + "unt\030\003 \001(\005\022\032\n\013speaker_tag\030\005 \001(\005B\005\030\001\340A\003\"\327\010" + + "\n\023RecognitionMetadata\022\\\n\020interaction_typ" + + "e\030\001 \001(\0162B.google.cloud.speech.v1p1beta1." + + "RecognitionMetadata.InteractionType\022$\n\034i" + + "ndustry_naics_code_of_audio\030\003 \001(\r\022b\n\023mic" + + "rophone_distance\030\004 \001(\0162E.google.cloud.sp" + + "eech.v1p1beta1.RecognitionMetadata.Micro" + + "phoneDistance\022a\n\023original_media_type\030\005 \001" + + "(\0162D.google.cloud.speech.v1p1beta1.Recog" + + "nitionMetadata.OriginalMediaType\022e\n\025reco" + + "rding_device_type\030\006 \001(\0162F.google.cloud.s" + + "peech.v1p1beta1.RecognitionMetadata.Reco" + + "rdingDeviceType\022\035\n\025recording_device_name" + + "\030\007 \001(\t\022\032\n\022original_mime_type\030\010 \001(\t\022\031\n\rob" + + "fuscated_id\030\t \001(\003B\002\030\001\022\023\n\013audio_topic\030\n \001" + + "(\t\"\305\001\n\017InteractionType\022 \n\034INTERACTION_TY" + + "PE_UNSPECIFIED\020\000\022\016\n\nDISCUSSION\020\001\022\020\n\014PRES" + + "ENTATION\020\002\022\016\n\nPHONE_CALL\020\003\022\r\n\tVOICEMAIL\020" + + "\004\022\033\n\027PROFESSIONALLY_PRODUCED\020\005\022\020\n\014VOICE_" + + "SEARCH\020\006\022\021\n\rVOICE_COMMAND\020\007\022\r\n\tDICTATION" + + "\020\010\"d\n\022MicrophoneDistance\022#\n\037MICROPHONE_D" + + "ISTANCE_UNSPECIFIED\020\000\022\r\n\tNEARFIELD\020\001\022\014\n\010" + + "MIDFIELD\020\002\022\014\n\010FARFIELD\020\003\"N\n\021OriginalMedi" + + "aType\022#\n\037ORIGINAL_MEDIA_TYPE_UNSPECIFIED" + + "\020\000\022\t\n\005AUDIO\020\001\022\t\n\005VIDEO\020\002\"\244\001\n\023RecordingDe" + + "viceType\022%\n!RECORDING_DEVICE_TYPE_UNSPEC" + + "IFIED\020\000\022\016\n\nSMARTPHONE\020\001\022\006\n\002PC\020\002\022\016\n\nPHONE" + + "_LINE\020\003\022\013\n\007VEHICLE\020\004\022\030\n\024OTHER_OUTDOOR_DE" + + "VICE\020\005\022\027\n\023OTHER_INDOOR_DEVICE\020\006\"/\n\rSpeec" + + "hContext\022\017\n\007phrases\030\001 \003(\t\022\r\n\005boost\030\004 \001(\002" + + "\"D\n\020RecognitionAudio\022\021\n\007content\030\001 \001(\014H\000\022" + + "\r\n\003uri\030\002 \001(\tH\000B\016\n\014audio_source\"\222\001\n\021Recog" + + "nizeResponse\022G\n\007results\030\002 \003(\01326.google.c" + + "loud.speech.v1p1beta1.SpeechRecognitionR" + + "esult\0224\n\021total_billed_time\030\003 \001(\0132\031.googl" + + "e.protobuf.Duration\"\225\002\n\034LongRunningRecog" + + "nizeResponse\022G\n\007results\030\002 \003(\01326.google.c" + + "loud.speech.v1p1beta1.SpeechRecognitionR" + + "esult\0224\n\021total_billed_time\030\003 \001(\0132\031.googl" + + "e.protobuf.Duration\022L\n\routput_config\030\006 \001" + + "(\01325.google.cloud.speech.v1p1beta1.Trans" + + "criptOutputConfig\022(\n\014output_error\030\007 \001(\0132" + + "\022.google.rpc.Status\"\203\002\n\034LongRunningRecog" + + "nizeMetadata\022\030\n\020progress_percent\030\001 \001(\005\022." + + "\n\nstart_time\030\002 \001(\0132\032.google.protobuf.Tim" + + "estamp\0224\n\020last_update_time\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022\020\n\003uri\030\004 \001(\tB\003\340A\003\022Q" + + "\n\routput_config\030\005 \001(\01325.google.cloud.spe" + + "ech.v1p1beta1.TranscriptOutputConfigB\003\340A" + + "\003\"\365\002\n\032StreamingRecognizeResponse\022!\n\005erro" + + "r\030\001 \001(\0132\022.google.rpc.Status\022J\n\007results\030\002" + + " \003(\01329.google.cloud.speech.v1p1beta1.Str" + + "eamingRecognitionResult\022d\n\021speech_event_" + + "type\030\004 \001(\0162I.google.cloud.speech.v1p1bet" + + "a1.StreamingRecognizeResponse.SpeechEven" + + "tType\0224\n\021total_billed_time\030\005 \001(\0132\031.googl" + + "e.protobuf.Duration\"L\n\017SpeechEventType\022\034" + + "\n\030SPEECH_EVENT_UNSPECIFIED\020\000\022\033\n\027END_OF_S" + + "INGLE_UTTERANCE\020\001\"\371\001\n\032StreamingRecogniti" + + "onResult\022Q\n\014alternatives\030\001 \003(\0132;.google." + + "cloud.speech.v1p1beta1.SpeechRecognition" + + "Alternative\022\020\n\010is_final\030\002 \001(\010\022\021\n\tstabili" + + "ty\030\003 \001(\002\0222\n\017result_end_time\030\004 \001(\0132\031.goog" + + "le.protobuf.Duration\022\023\n\013channel_tag\030\005 \001(" + + "\005\022\032\n\rlanguage_code\030\006 \001(\tB\003\340A\003\"\235\001\n\027Speech" + + "RecognitionResult\022Q\n\014alternatives\030\001 \003(\0132" + + ";.google.cloud.speech.v1p1beta1.SpeechRe" + + "cognitionAlternative\022\023\n\013channel_tag\030\002 \001(" + + "\005\022\032\n\rlanguage_code\030\005 \001(\tB\003\340A\003\"~\n\034SpeechR" + + "ecognitionAlternative\022\022\n\ntranscript\030\001 \001(" + + "\t\022\022\n\nconfidence\030\002 \001(\002\0226\n\005words\030\003 \003(\0132\'.g" + + "oogle.cloud.speech.v1p1beta1.WordInfo\"\242\001" + + "\n\010WordInfo\022-\n\nstart_time\030\001 \001(\0132\031.google." + + "protobuf.Duration\022+\n\010end_time\030\002 \001(\0132\031.go" + + "ogle.protobuf.Duration\022\014\n\004word\030\003 \001(\t\022\022\n\n" + + "confidence\030\004 \001(\002\022\030\n\013speaker_tag\030\005 \001(\005B\003\340" + + "A\0032\202\005\n\006Speech\022\245\001\n\tRecognize\022/.google.clo" + + "ud.speech.v1p1beta1.RecognizeRequest\0320.g" + + "oogle.cloud.speech.v1p1beta1.RecognizeRe" + + "sponse\"5\202\323\344\223\002 \"\033/v1p1beta1/speech:recogn" + + "ize:\001*\332A\014config,audio\022\362\001\n\024LongRunningRec" + + "ognize\022:.google.cloud.speech.v1p1beta1.L" + + "ongRunningRecognizeRequest\032\035.google.long" + + "running.Operation\"\177\202\323\344\223\002+\"&/v1p1beta1/sp" + + "eech:longrunningrecognize:\001*\332A\014config,au" + + "dio\312A<\n\034LongRunningRecognizeResponse\022\034Lo" + + "ngRunningRecognizeMetadata\022\217\001\n\022Streaming" + + "Recognize\0228.google.cloud.speech.v1p1beta" + + "1.StreamingRecognizeRequest\0329.google.clo" + + "ud.speech.v1p1beta1.StreamingRecognizeRe" + + "sponse\"\000(\0010\001\032I\312A\025speech.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformB\200\001\n!com.google.cloud.speech.v1p1" + + "beta1B\013SpeechProtoP\001ZCgoogle.golang.org/" + + "genproto/googleapis/cloud/speech/v1p1bet" + + "a1;speech\370\001\001\242\002\003GCSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -336,6 +338,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MaxAlternatives", "ProfanityFilter", "Adaptation", + "TranscriptNormalization", "SpeechContexts", "EnableWordTimeOffsets", "EnableWordConfidence", diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java index b5449aae8..fd1fc79b9 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/SpeechResourceProto.java @@ -47,6 +47,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_speech_v1p1beta1_SpeechAdaptation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -58,36 +66,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n,google/cloud/speech/v1p1beta1/resource" + ".proto\022\035google.cloud.speech.v1p1beta1\032\031g" - + "oogle/api/resource.proto\032\034google/api/ann" - + "otations.proto\"\203\002\n\013CustomClass\022\014\n\004name\030\001" - + " \001(\t\022\027\n\017custom_class_id\030\002 \001(\t\022C\n\005items\030\003" - + " \003(\01324.google.cloud.speech.v1p1beta1.Cus" - + "tomClass.ClassItem\032\032\n\tClassItem\022\r\n\005value" - + "\030\001 \001(\t:l\352Ai\n!speech.googleapis.com/Custo" - + "mClass\022Dprojects/{project}/locations/{lo" - + "cation}/customClasses/{custom_class}\"\371\001\n" - + "\tPhraseSet\022\014\n\004name\030\001 \001(\t\022@\n\007phrases\030\002 \003(" - + "\0132/.google.cloud.speech.v1p1beta1.Phrase" - + "Set.Phrase\022\r\n\005boost\030\004 \001(\002\032&\n\006Phrase\022\r\n\005v" - + "alue\030\001 \001(\t\022\r\n\005boost\030\002 \001(\002:e\352Ab\n\037speech.g" - + "oogleapis.com/PhraseSet\022?projects/{proje" - + "ct}/locations/{location}/phraseSets/{phr" - + "ase_set}\"\332\001\n\020SpeechAdaptation\022=\n\013phrase_" - + "sets\030\001 \003(\0132(.google.cloud.speech.v1p1bet" - + "a1.PhraseSet\022C\n\025phrase_set_references\030\002 " - + "\003(\tB$\372A!\n\037speech.googleapis.com/PhraseSe" - + "t\022B\n\016custom_classes\030\003 \003(\0132*.google.cloud" - + ".speech.v1p1beta1.CustomClassB\210\001\n!com.go" - + "ogle.cloud.speech.v1p1beta1B\023SpeechResou" - + "rceProtoP\001ZCgoogle.golang.org/genproto/g" - + "oogleapis/cloud/speech/v1p1beta1;speech\370" - + "\001\001\242\002\003GCSb\006proto3" + + "oogle/api/resource.proto\032\037google/protobu" + + "f/timestamp.proto\032\034google/api/annotation" + + "s.proto\"\203\002\n\013CustomClass\022\014\n\004name\030\001 \001(\t\022\027\n" + + "\017custom_class_id\030\002 \001(\t\022C\n\005items\030\003 \003(\01324." + + "google.cloud.speech.v1p1beta1.CustomClas" + + "s.ClassItem\032\032\n\tClassItem\022\r\n\005value\030\001 \001(\t:" + + "l\352Ai\n!speech.googleapis.com/CustomClass\022" + + "Dprojects/{project}/locations/{location}" + + "/customClasses/{custom_class}\"\371\001\n\tPhrase" + + "Set\022\014\n\004name\030\001 \001(\t\022@\n\007phrases\030\002 \003(\0132/.goo" + + "gle.cloud.speech.v1p1beta1.PhraseSet.Phr" + + "ase\022\r\n\005boost\030\004 \001(\002\032&\n\006Phrase\022\r\n\005value\030\001 " + + "\001(\t\022\r\n\005boost\030\002 \001(\002:e\352Ab\n\037speech.googleap" + + "is.com/PhraseSet\022?projects/{project}/loc" + + "ations/{location}/phraseSets/{phrase_set" + + "}\"\332\001\n\020SpeechAdaptation\022=\n\013phrase_sets\030\001 " + + "\003(\0132(.google.cloud.speech.v1p1beta1.Phra" + + "seSet\022C\n\025phrase_set_references\030\002 \003(\tB$\372A" + + "!\n\037speech.googleapis.com/PhraseSet\022B\n\016cu" + + "stom_classes\030\003 \003(\0132*.google.cloud.speech" + + ".v1p1beta1.CustomClass\"\252\001\n\027TranscriptNor" + + "malization\022M\n\007entries\030\001 \003(\0132<.google.clo" + + "ud.speech.v1p1beta1.TranscriptNormalizat" + + "ion.Entry\032@\n\005Entry\022\016\n\006search\030\001 \001(\t\022\017\n\007re" + + "place\030\002 \001(\t\022\026\n\016case_sensitive\030\003 \001(\010B\210\001\n!" + + "com.google.cloud.speech.v1p1beta1B\023Speec" + + "hResourceProtoP\001ZCgoogle.golang.org/genp" + + "roto/googleapis/cloud/speech/v1p1beta1;s" + + "peech\370\001\001\242\002\003GCSb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_speech_v1p1beta1_CustomClass_descriptor = @@ -132,6 +146,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PhraseSets", "PhraseSetReferences", "CustomClasses", }); + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor, + new java.lang.String[] { + "Entries", + }); + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_descriptor = + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_descriptor, + new java.lang.String[] { + "Search", "Replace", "CaseSensitive", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ResourceProto.resource); @@ -139,6 +171,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); } diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalization.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalization.java new file mode 100644 index 000000000..11da74dd7 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalization.java @@ -0,0 +1,2037 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/speech/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +/** + * + * + *
+ * 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.v1p1beta1.TranscriptNormalization} + */ +public final class TranscriptNormalization extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.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(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranscriptNormalization( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = + new java.util.ArrayList< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry>(); + mutable_bitField0_ |= 0x00000001; + } + entries_.add( + input.readMessage( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.class, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder.class); + } + + public interface EntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry} + */ + public static final class Entry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.speech.v1p1beta1.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(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Entry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + search_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + replace_ = s; + break; + } + case 24: + { + caseSensitive_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.class, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder.class); + } + + public static final int SEARCH_FIELD_NUMBER = 1; + 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; + 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_; + /** + * + * + *
+     * 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 (!getSearchBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, search_); + } + if (!getReplaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, replace_); + } + if (caseSensitive_ != false) { + output.writeBool(3, caseSensitive_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSearchBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, search_); + } + if (!getReplaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, replace_); + } + if (caseSensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, caseSensitive_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry other = + (com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) obj; + + if (!getSearch().equals(other.getSearch())) return false; + if (!getReplace().equals(other.getReplace())) return false; + if (getCaseSensitive() != other.getCaseSensitive()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.class, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder.class); + } + + // Construct using + // com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + search_ = ""; + + replace_ = ""; + + caseSensitive_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_Entry_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry + getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry build() { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry buildPartial() { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry result = + new com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry(this); + result.search_ = search_; + result.replace_ = replace_; + result.caseSensitive_ = caseSensitive_; + onBuilt(); + return result; + } + + @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.v1p1beta1.TranscriptNormalization.Entry) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry other) { + if (other + == com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.getDefaultInstance()) + return this; + if (!other.getSearch().isEmpty()) { + search_ = other.search_; + onChanged(); + } + if (!other.getReplace().isEmpty()) { + replace_ = other.replace_; + onChanged(); + } + if (other.getCaseSensitive() != false) { + setCaseSensitive(other.getCaseSensitive()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + 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(); + 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; + 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; + 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(); + 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; + 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; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether the search is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @return This builder for chaining. + */ + public Builder clearCaseSensitive() { + + 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.v1p1beta1.TranscriptNormalization.Entry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry) + private static final com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry(); + } + + public static com.google.cloud.speech.v1p1beta1.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 { + return new Entry(input, extensionRegistry); + } + }; + + 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.v1p1beta1.TranscriptNormalization.Entry + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ENTRIES_FIELD_NUMBER = 1; + 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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.speech.v1p1beta1.TranscriptNormalization.EntryOrBuilder> + 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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + */ + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.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)); + } + unknownFields.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 += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.speech.v1p1beta1.TranscriptNormalization)) { + return super.equals(obj); + } + com.google.cloud.speech.v1p1beta1.TranscriptNormalization other = + (com.google.cloud.speech.v1p1beta1.TranscriptNormalization) obj; + + if (!getEntriesList().equals(other.getEntriesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.speech.v1p1beta1.TranscriptNormalization parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.TranscriptNormalization} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1p1beta1.TranscriptNormalization) + com.google.cloud.speech.v1p1beta1.TranscriptNormalizationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.class, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Builder.class); + } + + // Construct using com.google.cloud.speech.v1p1beta1.TranscriptNormalization.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.speech.v1p1beta1.SpeechResourceProto + .internal_static_google_cloud_speech_v1p1beta1_TranscriptNormalization_descriptor; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization getDefaultInstanceForType() { + return com.google.cloud.speech.v1p1beta1.TranscriptNormalization.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization build() { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization buildPartial() { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization result = + new com.google.cloud.speech.v1p1beta1.TranscriptNormalization(this); + int from_bitField0_ = bitField0_; + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + onBuilt(); + return result; + } + + @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.v1p1beta1.TranscriptNormalization) { + return mergeFrom((com.google.cloud.speech.v1p1beta1.TranscriptNormalization) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.speech.v1p1beta1.TranscriptNormalization other) { + if (other == com.google.cloud.speech.v1p1beta1.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.unknownFields); + 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 { + com.google.cloud.speech.v1p1beta1.TranscriptNormalization parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.speech.v1p1beta1.TranscriptNormalization) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry>(entries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder setEntries( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder setEntries( + int index, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder addEntries( + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder addEntries( + int index, com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder addEntries( + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder addEntries( + int index, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public Builder addAllEntries( + java.lang.Iterable< + ? extends com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry> + 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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder + addEntriesBuilder() { + return getEntriesFieldBuilder() + .addBuilder( + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder + addEntriesBuilder(int index) { + return getEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + * + */ + public java.util.List + getEntriesBuilderList() { + return getEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.EntryOrBuilder> + getEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry, + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry.Builder, + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.TranscriptNormalization) + } + + // @@protoc_insertion_point(class_scope:google.cloud.speech.v1p1beta1.TranscriptNormalization) + private static final com.google.cloud.speech.v1p1beta1.TranscriptNormalization DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.speech.v1p1beta1.TranscriptNormalization(); + } + + public static com.google.cloud.speech.v1p1beta1.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 { + return new TranscriptNormalization(input, extensionRegistry); + } + }; + + 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.v1p1beta1.TranscriptNormalization getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalizationOrBuilder.java b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalizationOrBuilder.java new file mode 100644 index 000000000..11549b4c3 --- /dev/null +++ b/proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalizationOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/speech/v1p1beta1/resource.proto + +package com.google.cloud.speech.v1p1beta1; + +public interface TranscriptNormalizationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + */ + com.google.cloud.speech.v1p1beta1.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.v1p1beta1.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.v1p1beta1.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.v1p1beta1.TranscriptNormalization.Entry entries = 1; + */ + com.google.cloud.speech.v1p1beta1.TranscriptNormalization.EntryOrBuilder getEntriesOrBuilder( + int index); +} diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto index 5a861542f..edf603523 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto +++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/cloud_speech.proto @@ -327,6 +327,12 @@ message RecognitionConfig { // documentation. SpeechAdaptation adaptation = 20; + // 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 = 24; + // Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext]. // A means to provide context to assist the speech recognition. For more // information, see diff --git a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto index 731349c7e..1ff0430d2 100644 --- a/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto +++ b/proto-google-cloud-speech-v1p1beta1/src/main/proto/google/cloud/speech/v1p1beta1/resource.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.speech.v1p1beta1; import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; option cc_enable_arenas = true; @@ -132,3 +133,27 @@ message SpeechAdaptation { // `custom_class_id`. repeated CustomClass custom_classes = 3; } + +// 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; +} diff --git a/synth.metadata b/synth.metadata index d0593eaa9..915b06d60 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,16 +11,16 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "10185d07a4db1d76a888a119aeab1f2287b35105", - "internalRef": "389755489" + "sha": "76bed90afcd459c0345b1bd0ab3e5cd53260e04d", + "internalRef": "391603958" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "10185d07a4db1d76a888a119aeab1f2287b35105", - "internalRef": "389755489" + "sha": "76bed90afcd459c0345b1bd0ab3e5cd53260e04d", + "internalRef": "391603958" } }, { @@ -257,6 +257,8 @@ "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognizeRequestOrBuilder.java", "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognizeResponse.java", "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/StreamingRecognizeResponseOrBuilder.java", + "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalization.java", + "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptNormalizationOrBuilder.java", "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptOutputConfig.java", "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/TranscriptOutputConfigOrBuilder.java", "proto-google-cloud-speech-v1p1beta1/src/main/java/com/google/cloud/speech/v1p1beta1/UpdateCustomClassRequest.java",