All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.speech.v1.StreamingRecognitionResult Maven / Gradle / Ivy

There is a newer version: 4.49.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/speech/v1/cloud_speech.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.speech.v1;

/**
 *
 *
 * 
 * A streaming speech recognition result corresponding to a portion of the audio
 * that is currently being processed.
 * 
* * Protobuf type {@code google.cloud.speech.v1.StreamingRecognitionResult} */ public final class StreamingRecognitionResult extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.speech.v1.StreamingRecognitionResult) StreamingRecognitionResultOrBuilder { private static final long serialVersionUID = 0L; // Use StreamingRecognitionResult.newBuilder() to construct. private StreamingRecognitionResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StreamingRecognitionResult() { alternatives_ = java.util.Collections.emptyList(); languageCode_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new StreamingRecognitionResult(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechProto .internal_static_google_cloud_speech_v1_StreamingRecognitionResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechProto .internal_static_google_cloud_speech_v1_StreamingRecognitionResult_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.StreamingRecognitionResult.class, com.google.cloud.speech.v1.StreamingRecognitionResult.Builder.class); } private int bitField0_; public static final int ALTERNATIVES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List alternatives_; /** * * *
   * May contain one or more recognition hypotheses (up to the
   * maximum specified in `max_alternatives`).
   * These alternatives are ordered in terms of accuracy, with the top (first)
   * alternative being the most probable, as ranked by the recognizer.
   * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ @java.lang.Override public java.util.List getAlternativesList() { return alternatives_; } /** * * *
   * May contain one or more recognition hypotheses (up to the
   * maximum specified in `max_alternatives`).
   * These alternatives are ordered in terms of accuracy, with the top (first)
   * alternative being the most probable, as ranked by the recognizer.
   * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ @java.lang.Override public java.util.List getAlternativesOrBuilderList() { return alternatives_; } /** * * *
   * May contain one or more recognition hypotheses (up to the
   * maximum specified in `max_alternatives`).
   * These alternatives are ordered in terms of accuracy, with the top (first)
   * alternative being the most probable, as ranked by the recognizer.
   * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ @java.lang.Override public int getAlternativesCount() { return alternatives_.size(); } /** * * *
   * May contain one or more recognition hypotheses (up to the
   * maximum specified in `max_alternatives`).
   * These alternatives are ordered in terms of accuracy, with the top (first)
   * alternative being the most probable, as ranked by the recognizer.
   * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ @java.lang.Override public com.google.cloud.speech.v1.SpeechRecognitionAlternative getAlternatives(int index) { return alternatives_.get(index); } /** * * *
   * May contain one or more recognition hypotheses (up to the
   * maximum specified in `max_alternatives`).
   * These alternatives are ordered in terms of accuracy, with the top (first)
   * alternative being the most probable, as ranked by the recognizer.
   * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ @java.lang.Override public com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder( int index) { return alternatives_.get(index); } public static final int IS_FINAL_FIELD_NUMBER = 2; private boolean isFinal_ = false; /** * * *
   * If `false`, this `StreamingRecognitionResult` represents an
   * interim result that may change. If `true`, this is the final time the
   * speech service will return this particular `StreamingRecognitionResult`,
   * the recognizer will not return any further hypotheses for this portion of
   * the transcript and corresponding audio.
   * 
* * bool is_final = 2; * * @return The isFinal. */ @java.lang.Override public boolean getIsFinal() { return isFinal_; } public static final int STABILITY_FIELD_NUMBER = 3; private float stability_ = 0F; /** * * *
   * An estimate of the likelihood that the recognizer will not
   * change its guess about this interim result. Values range from 0.0
   * (completely unstable) to 1.0 (completely stable).
   * This field is only provided for interim results (`is_final=false`).
   * The default of 0.0 is a sentinel value indicating `stability` was not set.
   * 
* * float stability = 3; * * @return The stability. */ @java.lang.Override public float getStability() { return stability_; } public static final int RESULT_END_TIME_FIELD_NUMBER = 4; private com.google.protobuf.Duration resultEndTime_; /** * * *
   * Time offset of the end of this result relative to the
   * beginning of the audio.
   * 
* * .google.protobuf.Duration result_end_time = 4; * * @return Whether the resultEndTime field is set. */ @java.lang.Override public boolean hasResultEndTime() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Time offset of the end of this result relative to the
   * beginning of the audio.
   * 
* * .google.protobuf.Duration result_end_time = 4; * * @return The resultEndTime. */ @java.lang.Override public com.google.protobuf.Duration getResultEndTime() { return resultEndTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : resultEndTime_; } /** * * *
   * Time offset of the end of this result relative to the
   * beginning of the audio.
   * 
* * .google.protobuf.Duration result_end_time = 4; */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder() { return resultEndTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : resultEndTime_; } public static final int CHANNEL_TAG_FIELD_NUMBER = 5; private int channelTag_ = 0; /** * * *
   * For multi-channel audio, this is the channel number corresponding to the
   * recognized result for the audio from that channel.
   * For audio_channel_count = N, its output values can range from '1' to 'N'.
   * 
* * int32 channel_tag = 5; * * @return The channelTag. */ @java.lang.Override public int getChannelTag() { return channelTag_; } public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object languageCode_ = ""; /** * * *
   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
   * language tag of the language in this result. This language code was
   * detected to have the most likelihood of being spoken in the audio.
   * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ @java.lang.Override public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } } /** * * *
   * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
   * language tag of the language in this result. This language code was
   * detected to have the most likelihood of being spoken in the audio.
   * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ @java.lang.Override public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override 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 < alternatives_.size(); i++) { output.writeMessage(1, alternatives_.get(i)); } if (isFinal_ != false) { output.writeBool(2, isFinal_); } if (java.lang.Float.floatToRawIntBits(stability_) != 0) { output.writeFloat(3, stability_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getResultEndTime()); } if (channelTag_ != 0) { output.writeInt32(5, channelTag_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < alternatives_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alternatives_.get(i)); } if (isFinal_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isFinal_); } if (java.lang.Float.floatToRawIntBits(stability_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, stability_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getResultEndTime()); } if (channelTag_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, channelTag_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.speech.v1.StreamingRecognitionResult)) { return super.equals(obj); } com.google.cloud.speech.v1.StreamingRecognitionResult other = (com.google.cloud.speech.v1.StreamingRecognitionResult) obj; if (!getAlternativesList().equals(other.getAlternativesList())) return false; if (getIsFinal() != other.getIsFinal()) return false; if (java.lang.Float.floatToIntBits(getStability()) != java.lang.Float.floatToIntBits(other.getStability())) return false; if (hasResultEndTime() != other.hasResultEndTime()) return false; if (hasResultEndTime()) { if (!getResultEndTime().equals(other.getResultEndTime())) return false; } if (getChannelTag() != other.getChannelTag()) return false; if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getAlternativesCount() > 0) { hash = (37 * hash) + ALTERNATIVES_FIELD_NUMBER; hash = (53 * hash) + getAlternativesList().hashCode(); } hash = (37 * hash) + IS_FINAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsFinal()); hash = (37 * hash) + STABILITY_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getStability()); if (hasResultEndTime()) { hash = (37 * hash) + RESULT_END_TIME_FIELD_NUMBER; hash = (53 * hash) + getResultEndTime().hashCode(); } hash = (37 * hash) + CHANNEL_TAG_FIELD_NUMBER; hash = (53 * hash) + getChannelTag(); hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.speech.v1.StreamingRecognitionResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.speech.v1.StreamingRecognitionResult 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 streaming speech recognition result corresponding to a portion of the audio
   * that is currently being processed.
   * 
* * Protobuf type {@code google.cloud.speech.v1.StreamingRecognitionResult} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.speech.v1.StreamingRecognitionResult) com.google.cloud.speech.v1.StreamingRecognitionResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.speech.v1.SpeechProto .internal_static_google_cloud_speech_v1_StreamingRecognitionResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.speech.v1.SpeechProto .internal_static_google_cloud_speech_v1_StreamingRecognitionResult_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.speech.v1.StreamingRecognitionResult.class, com.google.cloud.speech.v1.StreamingRecognitionResult.Builder.class); } // Construct using com.google.cloud.speech.v1.StreamingRecognitionResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getAlternativesFieldBuilder(); getResultEndTimeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (alternativesBuilder_ == null) { alternatives_ = java.util.Collections.emptyList(); } else { alternatives_ = null; alternativesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); isFinal_ = false; stability_ = 0F; resultEndTime_ = null; if (resultEndTimeBuilder_ != null) { resultEndTimeBuilder_.dispose(); resultEndTimeBuilder_ = null; } channelTag_ = 0; languageCode_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.speech.v1.SpeechProto .internal_static_google_cloud_speech_v1_StreamingRecognitionResult_descriptor; } @java.lang.Override public com.google.cloud.speech.v1.StreamingRecognitionResult getDefaultInstanceForType() { return com.google.cloud.speech.v1.StreamingRecognitionResult.getDefaultInstance(); } @java.lang.Override public com.google.cloud.speech.v1.StreamingRecognitionResult build() { com.google.cloud.speech.v1.StreamingRecognitionResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.speech.v1.StreamingRecognitionResult buildPartial() { com.google.cloud.speech.v1.StreamingRecognitionResult result = new com.google.cloud.speech.v1.StreamingRecognitionResult(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.speech.v1.StreamingRecognitionResult result) { if (alternativesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { alternatives_ = java.util.Collections.unmodifiableList(alternatives_); bitField0_ = (bitField0_ & ~0x00000001); } result.alternatives_ = alternatives_; } else { result.alternatives_ = alternativesBuilder_.build(); } } private void buildPartial0(com.google.cloud.speech.v1.StreamingRecognitionResult result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { result.isFinal_ = isFinal_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.stability_ = stability_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.resultEndTime_ = resultEndTimeBuilder_ == null ? resultEndTime_ : resultEndTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000010) != 0)) { result.channelTag_ = channelTag_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.languageCode_ = languageCode_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.speech.v1.StreamingRecognitionResult) { return mergeFrom((com.google.cloud.speech.v1.StreamingRecognitionResult) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.speech.v1.StreamingRecognitionResult other) { if (other == com.google.cloud.speech.v1.StreamingRecognitionResult.getDefaultInstance()) return this; if (alternativesBuilder_ == null) { if (!other.alternatives_.isEmpty()) { if (alternatives_.isEmpty()) { alternatives_ = other.alternatives_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAlternativesIsMutable(); alternatives_.addAll(other.alternatives_); } onChanged(); } } else { if (!other.alternatives_.isEmpty()) { if (alternativesBuilder_.isEmpty()) { alternativesBuilder_.dispose(); alternativesBuilder_ = null; alternatives_ = other.alternatives_; bitField0_ = (bitField0_ & ~0x00000001); alternativesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAlternativesFieldBuilder() : null; } else { alternativesBuilder_.addAllMessages(other.alternatives_); } } } if (other.getIsFinal() != false) { setIsFinal(other.getIsFinal()); } if (other.getStability() != 0F) { setStability(other.getStability()); } if (other.hasResultEndTime()) { mergeResultEndTime(other.getResultEndTime()); } if (other.getChannelTag() != 0) { setChannelTag(other.getChannelTag()); } if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; bitField0_ |= 0x00000020; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.cloud.speech.v1.SpeechRecognitionAlternative m = input.readMessage( com.google.cloud.speech.v1.SpeechRecognitionAlternative.parser(), extensionRegistry); if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.add(m); } else { alternativesBuilder_.addMessage(m); } break; } // case 10 case 16: { isFinal_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 16 case 29: { stability_ = input.readFloat(); bitField0_ |= 0x00000004; break; } // case 29 case 34: { input.readMessage(getResultEndTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 40: { channelTag_ = input.readInt32(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { languageCode_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List alternatives_ = java.util.Collections.emptyList(); private void ensureAlternativesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { alternatives_ = new java.util.ArrayList( alternatives_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.SpeechRecognitionAlternative, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder, com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder> alternativesBuilder_; /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public java.util.List getAlternativesList() { if (alternativesBuilder_ == null) { return java.util.Collections.unmodifiableList(alternatives_); } else { return alternativesBuilder_.getMessageList(); } } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public int getAlternativesCount() { if (alternativesBuilder_ == null) { return alternatives_.size(); } else { return alternativesBuilder_.getCount(); } } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public com.google.cloud.speech.v1.SpeechRecognitionAlternative getAlternatives(int index) { if (alternativesBuilder_ == null) { return alternatives_.get(index); } else { return alternativesBuilder_.getMessage(index); } } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder setAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative value) { if (alternativesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAlternativesIsMutable(); alternatives_.set(index, value); onChanged(); } else { alternativesBuilder_.setMessage(index, value); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder setAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder builderForValue) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.set(index, builderForValue.build()); onChanged(); } else { alternativesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder addAlternatives(com.google.cloud.speech.v1.SpeechRecognitionAlternative value) { if (alternativesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAlternativesIsMutable(); alternatives_.add(value); onChanged(); } else { alternativesBuilder_.addMessage(value); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder addAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative value) { if (alternativesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAlternativesIsMutable(); alternatives_.add(index, value); onChanged(); } else { alternativesBuilder_.addMessage(index, value); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder addAlternatives( com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder builderForValue) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.add(builderForValue.build()); onChanged(); } else { alternativesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder addAlternatives( int index, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder builderForValue) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.add(index, builderForValue.build()); onChanged(); } else { alternativesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder addAllAlternatives( java.lang.Iterable values) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, alternatives_); onChanged(); } else { alternativesBuilder_.addAllMessages(values); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder clearAlternatives() { if (alternativesBuilder_ == null) { alternatives_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { alternativesBuilder_.clear(); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public Builder removeAlternatives(int index) { if (alternativesBuilder_ == null) { ensureAlternativesIsMutable(); alternatives_.remove(index); onChanged(); } else { alternativesBuilder_.remove(index); } return this; } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder getAlternativesBuilder( int index) { return getAlternativesFieldBuilder().getBuilder(index); } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index) { if (alternativesBuilder_ == null) { return alternatives_.get(index); } else { return alternativesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public java.util.List< ? extends com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList() { if (alternativesBuilder_ != null) { return alternativesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(alternatives_); } } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder addAlternativesBuilder() { return getAlternativesFieldBuilder() .addBuilder(com.google.cloud.speech.v1.SpeechRecognitionAlternative.getDefaultInstance()); } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder addAlternativesBuilder( int index) { return getAlternativesFieldBuilder() .addBuilder( index, com.google.cloud.speech.v1.SpeechRecognitionAlternative.getDefaultInstance()); } /** * * *
     * May contain one or more recognition hypotheses (up to the
     * maximum specified in `max_alternatives`).
     * These alternatives are ordered in terms of accuracy, with the top (first)
     * alternative being the most probable, as ranked by the recognizer.
     * 
* * repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1; */ public java.util.List getAlternativesBuilderList() { return getAlternativesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.SpeechRecognitionAlternative, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder, com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder> getAlternativesFieldBuilder() { if (alternativesBuilder_ == null) { alternativesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.SpeechRecognitionAlternative, com.google.cloud.speech.v1.SpeechRecognitionAlternative.Builder, com.google.cloud.speech.v1.SpeechRecognitionAlternativeOrBuilder>( alternatives_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); alternatives_ = null; } return alternativesBuilder_; } private boolean isFinal_; /** * * *
     * If `false`, this `StreamingRecognitionResult` represents an
     * interim result that may change. If `true`, this is the final time the
     * speech service will return this particular `StreamingRecognitionResult`,
     * the recognizer will not return any further hypotheses for this portion of
     * the transcript and corresponding audio.
     * 
* * bool is_final = 2; * * @return The isFinal. */ @java.lang.Override public boolean getIsFinal() { return isFinal_; } /** * * *
     * If `false`, this `StreamingRecognitionResult` represents an
     * interim result that may change. If `true`, this is the final time the
     * speech service will return this particular `StreamingRecognitionResult`,
     * the recognizer will not return any further hypotheses for this portion of
     * the transcript and corresponding audio.
     * 
* * bool is_final = 2; * * @param value The isFinal to set. * @return This builder for chaining. */ public Builder setIsFinal(boolean value) { isFinal_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * If `false`, this `StreamingRecognitionResult` represents an
     * interim result that may change. If `true`, this is the final time the
     * speech service will return this particular `StreamingRecognitionResult`,
     * the recognizer will not return any further hypotheses for this portion of
     * the transcript and corresponding audio.
     * 
* * bool is_final = 2; * * @return This builder for chaining. */ public Builder clearIsFinal() { bitField0_ = (bitField0_ & ~0x00000002); isFinal_ = false; onChanged(); return this; } private float stability_; /** * * *
     * An estimate of the likelihood that the recognizer will not
     * change its guess about this interim result. Values range from 0.0
     * (completely unstable) to 1.0 (completely stable).
     * This field is only provided for interim results (`is_final=false`).
     * The default of 0.0 is a sentinel value indicating `stability` was not set.
     * 
* * float stability = 3; * * @return The stability. */ @java.lang.Override public float getStability() { return stability_; } /** * * *
     * An estimate of the likelihood that the recognizer will not
     * change its guess about this interim result. Values range from 0.0
     * (completely unstable) to 1.0 (completely stable).
     * This field is only provided for interim results (`is_final=false`).
     * The default of 0.0 is a sentinel value indicating `stability` was not set.
     * 
* * float stability = 3; * * @param value The stability to set. * @return This builder for chaining. */ public Builder setStability(float value) { stability_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * An estimate of the likelihood that the recognizer will not
     * change its guess about this interim result. Values range from 0.0
     * (completely unstable) to 1.0 (completely stable).
     * This field is only provided for interim results (`is_final=false`).
     * The default of 0.0 is a sentinel value indicating `stability` was not set.
     * 
* * float stability = 3; * * @return This builder for chaining. */ public Builder clearStability() { bitField0_ = (bitField0_ & ~0x00000004); stability_ = 0F; onChanged(); return this; } private com.google.protobuf.Duration resultEndTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> resultEndTimeBuilder_; /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; * * @return Whether the resultEndTime field is set. */ public boolean hasResultEndTime() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; * * @return The resultEndTime. */ public com.google.protobuf.Duration getResultEndTime() { if (resultEndTimeBuilder_ == null) { return resultEndTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : resultEndTime_; } else { return resultEndTimeBuilder_.getMessage(); } } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ public Builder setResultEndTime(com.google.protobuf.Duration value) { if (resultEndTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resultEndTime_ = value; } else { resultEndTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ public Builder setResultEndTime(com.google.protobuf.Duration.Builder builderForValue) { if (resultEndTimeBuilder_ == null) { resultEndTime_ = builderForValue.build(); } else { resultEndTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ public Builder mergeResultEndTime(com.google.protobuf.Duration value) { if (resultEndTimeBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && resultEndTime_ != null && resultEndTime_ != com.google.protobuf.Duration.getDefaultInstance()) { getResultEndTimeBuilder().mergeFrom(value); } else { resultEndTime_ = value; } } else { resultEndTimeBuilder_.mergeFrom(value); } if (resultEndTime_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ public Builder clearResultEndTime() { bitField0_ = (bitField0_ & ~0x00000008); resultEndTime_ = null; if (resultEndTimeBuilder_ != null) { resultEndTimeBuilder_.dispose(); resultEndTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ public com.google.protobuf.Duration.Builder getResultEndTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); return getResultEndTimeFieldBuilder().getBuilder(); } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ public com.google.protobuf.DurationOrBuilder getResultEndTimeOrBuilder() { if (resultEndTimeBuilder_ != null) { return resultEndTimeBuilder_.getMessageOrBuilder(); } else { return resultEndTime_ == null ? com.google.protobuf.Duration.getDefaultInstance() : resultEndTime_; } } /** * * *
     * Time offset of the end of this result relative to the
     * beginning of the audio.
     * 
* * .google.protobuf.Duration result_end_time = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getResultEndTimeFieldBuilder() { if (resultEndTimeBuilder_ == null) { resultEndTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getResultEndTime(), getParentForChildren(), isClean()); resultEndTime_ = null; } return resultEndTimeBuilder_; } private int channelTag_; /** * * *
     * For multi-channel audio, this is the channel number corresponding to the
     * recognized result for the audio from that channel.
     * For audio_channel_count = N, its output values can range from '1' to 'N'.
     * 
* * int32 channel_tag = 5; * * @return The channelTag. */ @java.lang.Override public int getChannelTag() { return channelTag_; } /** * * *
     * For multi-channel audio, this is the channel number corresponding to the
     * recognized result for the audio from that channel.
     * For audio_channel_count = N, its output values can range from '1' to 'N'.
     * 
* * int32 channel_tag = 5; * * @param value The channelTag to set. * @return This builder for chaining. */ public Builder setChannelTag(int value) { channelTag_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * For multi-channel audio, this is the channel number corresponding to the
     * recognized result for the audio from that channel.
     * For audio_channel_count = N, its output values can range from '1' to 'N'.
     * 
* * int32 channel_tag = 5; * * @return This builder for chaining. */ public Builder clearChannelTag() { bitField0_ = (bitField0_ & ~0x00000010); channelTag_ = 0; onChanged(); return this; } private java.lang.Object languageCode_ = ""; /** * * *
     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag of the language in this result. This language code was
     * detected to have the most likelihood of being spoken in the audio.
     * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The languageCode. */ public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag of the language in this result. This language code was
     * detected to have the most likelihood of being spoken in the audio.
     * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for languageCode. */ public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag of the language in this result. This language code was
     * detected to have the most likelihood of being spoken in the audio.
     * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The languageCode to set. * @return This builder for chaining. */ public Builder setLanguageCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } languageCode_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag of the language in this result. This language code was
     * detected to have the most likelihood of being spoken in the audio.
     * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
     * language tag of the language in this result. This language code was
     * detected to have the most likelihood of being spoken in the audio.
     * 
* * string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. */ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); languageCode_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.speech.v1.StreamingRecognitionResult) } // @@protoc_insertion_point(class_scope:google.cloud.speech.v1.StreamingRecognitionResult) private static final com.google.cloud.speech.v1.StreamingRecognitionResult DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.speech.v1.StreamingRecognitionResult(); } public static com.google.cloud.speech.v1.StreamingRecognitionResult getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StreamingRecognitionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.speech.v1.StreamingRecognitionResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy