/** * * * <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 Builder setStartTime(com.google.protobuf.Duration value) { if (startTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } startTime_ = value; onChanged(); } else { startTimeBuilder_.setMessage(value); } 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> */ public Builder setEndTime(com.google.protobuf.Duration value) { if (endTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } endTime_ = value; onChanged(); } else { endTimeBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * Output only. The word corresponding to this set of information. * </pre> * * <code>string word = 3;</code> */ public Builder setWordBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); word_ = value; onChanged(); 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 Builder mergeStartTime(com.google.protobuf.Duration value) { if (startTimeBuilder_ == null) { if (startTime_ != null) { startTime_ = com.google.protobuf.Duration.newBuilder(startTime_).mergeFrom(value).buildPartial(); } else { startTime_ = value; } onChanged(); } else { startTimeBuilder_.mergeFrom(value); } 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> */ public Builder mergeEndTime(com.google.protobuf.Duration value) { if (endTimeBuilder_ == null) { if (endTime_ != null) { endTime_ = com.google.protobuf.Duration.newBuilder(endTime_).mergeFrom(value).buildPartial(); } else { endTime_ = value; } onChanged(); } else { endTimeBuilder_.mergeFrom(value); } 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 Builder clearStartTime() { if (startTimeBuilder_ == null) { startTime_ = null; onChanged(); } else { startTime_ = null; startTimeBuilder_ = null; } 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 Builder setStartTime(com.google.protobuf.Duration.Builder builderForValue) { if (startTimeBuilder_ == null) { startTime_ = builderForValue.build(); onChanged(); } else { startTimeBuilder_.setMessage(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> */ public Builder clearEndTime() { if (endTimeBuilder_ == null) { endTime_ = null; onChanged(); } else { endTime_ = null; endTimeBuilder_ = null; } 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> */ public Builder setEndTime(com.google.protobuf.Duration.Builder builderForValue) { if (endTimeBuilder_ == null) { endTime_ = builderForValue.build(); onChanged(); } else { endTimeBuilder_.setMessage(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(); } /**
/** * * * <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. The word corresponding to this set of information. * </pre> * * <code>string word = 3;</code> */ public Builder setWord(java.lang.String value) { if (value == null) { throw new NullPointerException(); } word_ = value; onChanged(); return this; } /**
/** * * * <pre> * Output only. The word corresponding to this set of information. * </pre> * * <code>string word = 3;</code> */ public Builder clearWord() { word_ = getDefaultInstance().getWord(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.cloud.speech.v1.WordInfo other) { if (other == com.google.cloud.speech.v1.WordInfo.getDefaultInstance()) return this; if (other.hasStartTime()) { mergeStartTime(other.getStartTime()); } if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } if (!other.getWord().isEmpty()) { word_ = other.word_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }