/** * * * <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.DurationOrBuilder getStartTimeOrBuilder() { return getStartTime(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (startTime_ != null) { output.writeMessage(1, getStartTime()); } if (endTime_ != null) { output.writeMessage(2, getEndTime()); } if (!getWordBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, word_); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (startTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); } if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); } if (!getWordBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, word_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasStartTime()) { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); } if (hasEndTime()) { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } hash = (37 * hash) + WORD_FIELD_NUMBER; hash = (53 * hash) + getWord().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.speech.v1.WordInfo)) { return super.equals(obj); } com.google.cloud.speech.v1.WordInfo other = (com.google.cloud.speech.v1.WordInfo) obj; boolean result = true; result = result && (hasStartTime() == other.hasStartTime()); if (hasStartTime()) { result = result && getStartTime().equals(other.getStartTime()); } result = result && (hasEndTime() == other.hasEndTime()); if (hasEndTime()) { result = result && getEndTime().equals(other.getEndTime()); } result = result && getWord().equals(other.getWord()); result = result && unknownFields.equals(other.unknownFields); return result; }
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; }
System.out.printf( "\t%s.%s sec - %s.%s sec\n", wordInfo.getStartTime().getSeconds(), wordInfo.getStartTime().getNanos() / 100000000, wordInfo.getEndTime().getSeconds(), wordInfo.getEndTime().getNanos() / 100000000);
System.out.printf( "\t%s.%s sec - %s.%s sec\n", wordInfo.getStartTime().getSeconds(), wordInfo.getStartTime().getNanos() / 100000000, wordInfo.getEndTime().getSeconds(), wordInfo.getEndTime().getNanos() / 100000000);