if (!other.getTranscript().isEmpty()) { transcript_ = other.transcript_; onChanged(); setConfidence(other.getConfidence()); bitField0_ = (bitField0_ & ~0x00000004); } else { ensureWordsIsMutable(); words_.addAll(other.words_); onChanged(); wordsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWordsFieldBuilder() : null; } else { this.mergeUnknownFields(other.unknownFields); onChanged(); return this;
private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.WordInfo, com.google.cloud.speech.v1.WordInfo.Builder, com.google.cloud.speech.v1.WordInfoOrBuilder> getWordsFieldBuilder() { if (wordsBuilder_ == null) { wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.speech.v1.WordInfo, com.google.cloud.speech.v1.WordInfo.Builder, com.google.cloud.speech.v1.WordInfoOrBuilder>( words_, ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); words_ = null; } return wordsBuilder_; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.speech.v1.SpeechRecognitionAlternative parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.speech.v1.SpeechRecognitionAlternative) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder addWords(com.google.cloud.speech.v1.WordInfo value) { if (wordsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWordsIsMutable(); words_.add(value); onChanged(); } else { wordsBuilder_.addMessage(value); } return this; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder setWords(int index, com.google.cloud.speech.v1.WordInfo value) { if (wordsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWordsIsMutable(); words_.set(index, value); onChanged(); } else { wordsBuilder_.setMessage(index, value); } return this; } /**
/** * * * <pre> * Output only. 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. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ 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; } /**
/** * * * <pre> * Output only. 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. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ 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; } /**
/** * * * <pre> * Output only. 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. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ 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; } /**
/** * * * <pre> * Output only. 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. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ 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; } /**
/** * * * <pre> * Output only. 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. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ 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; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder setWords( int index, com.google.cloud.speech.v1.WordInfo.Builder builderForValue) { if (wordsBuilder_ == null) { ensureWordsIsMutable(); words_.set(index, builderForValue.build()); onChanged(); } else { wordsBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder addWords( int index, com.google.cloud.speech.v1.WordInfo.Builder builderForValue) { if (wordsBuilder_ == null) { ensureWordsIsMutable(); words_.add(index, builderForValue.build()); onChanged(); } else { wordsBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. 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. * </pre> * * <code>repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;</code> */ 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; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder addWords(int index, com.google.cloud.speech.v1.WordInfo value) { if (wordsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWordsIsMutable(); words_.add(index, value); onChanged(); } else { wordsBuilder_.addMessage(index, value); } return this; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder addWords(com.google.cloud.speech.v1.WordInfo.Builder builderForValue) { if (wordsBuilder_ == null) { ensureWordsIsMutable(); words_.add(builderForValue.build()); onChanged(); } else { wordsBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder removeWords(int index) { if (wordsBuilder_ == null) { ensureWordsIsMutable(); words_.remove(index); onChanged(); } else { wordsBuilder_.remove(index); } return this; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public Builder addAllWords( java.lang.Iterable<? extends com.google.cloud.speech.v1.WordInfo> values) { if (wordsBuilder_ == null) { ensureWordsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, words_); onChanged(); } else { wordsBuilder_.addAllMessages(values); } return this; } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public com.google.cloud.speech.v1.WordInfo.Builder addWordsBuilder(int index) { return getWordsFieldBuilder() .addBuilder(index, com.google.cloud.speech.v1.WordInfo.getDefaultInstance()); } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public com.google.cloud.speech.v1.WordInfo.Builder addWordsBuilder() { return getWordsFieldBuilder() .addBuilder(com.google.cloud.speech.v1.WordInfo.getDefaultInstance()); } /**
/** * * * <pre> * Output only. A list of word-specific information for each recognized word. * Note: When `enable_speaker_diarization` is true, you will see all the words * from the beginning of the audio. * </pre> * * <code>repeated .google.cloud.speech.v1.WordInfo words = 3;</code> */ public com.google.cloud.speech.v1.WordInfo.Builder getWordsBuilder(int index) { return getWordsFieldBuilder().getBuilder(index); } /**