/** * * * <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. Time offset relative to the beginning of the audio, * and corresponding to the end of the spoken word. * This field is only set if `enable_word_time_offsets=true` and only * in the top hypothesis. * This is an experimental feature and the accuracy of the time offset can * vary. * </pre> * * <code>.google.protobuf.Duration end_time = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getEndTimeFieldBuilder() { if (endTimeBuilder_ == null) { endTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getEndTime(), getParentForChildren(), isClean()); endTime_ = null; } return endTimeBuilder_; }
/** * * * <pre> * Output only. Time offset relative to the beginning of the audio, * and corresponding to the end of the spoken word. * This field is only set if `enable_word_time_offsets=true` and only * in the top hypothesis. * This is an experimental feature and the accuracy of the time offset can * vary. * </pre> * * <code>.google.protobuf.Duration end_time = 2;</code> */ public com.google.protobuf.Duration.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); } /**
/** * * * <pre> * Output only. Time offset relative to the beginning of the audio, * and corresponding to the start of the spoken word. * This field is only set if `enable_word_time_offsets=true` and only * in the top hypothesis. * This is an experimental feature and the accuracy of the time offset can * vary. * </pre> * * <code>.google.protobuf.Duration start_time = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getStartTimeFieldBuilder() { if (startTimeBuilder_ == null) { startTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( getStartTime(), getParentForChildren(), isClean()); startTime_ = null; } return startTimeBuilder_; }
/** * * * <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 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. Time offset relative to the beginning of the audio, * and corresponding to the start of the spoken word. * This field is only set if `enable_word_time_offsets=true` and only * in the top hypothesis. * This is an experimental feature and the accuracy of the time offset can * vary. * </pre> * * <code>.google.protobuf.Duration start_time = 1;</code> */ public com.google.protobuf.Duration.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); } /**
private Builder() { maybeForceBuilderInitialization(); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**
@java.lang.Override public com.google.cloud.speech.v1.WordInfo build() { com.google.cloud.speech.v1.WordInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }