1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/speech/v1/cloud_speech.proto 18 19 package com.google.cloud.speech.v1; 20 21 public interface WordInfoOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.speech.v1.WordInfo) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Time offset relative to the beginning of the audio, 31 * and corresponding to the start of the spoken word. 32 * This field is only set if `enable_word_time_offsets=true` and only 33 * in the top hypothesis. 34 * This is an experimental feature and the accuracy of the time offset can 35 * vary. 36 * </pre> 37 * 38 * <code>.google.protobuf.Duration start_time = 1;</code> 39 * 40 * @return Whether the startTime field is set. 41 */ hasStartTime()42 boolean hasStartTime(); 43 /** 44 * 45 * 46 * <pre> 47 * Time offset relative to the beginning of the audio, 48 * and corresponding to the start of the spoken word. 49 * This field is only set if `enable_word_time_offsets=true` and only 50 * in the top hypothesis. 51 * This is an experimental feature and the accuracy of the time offset can 52 * vary. 53 * </pre> 54 * 55 * <code>.google.protobuf.Duration start_time = 1;</code> 56 * 57 * @return The startTime. 58 */ getStartTime()59 com.google.protobuf.Duration getStartTime(); 60 /** 61 * 62 * 63 * <pre> 64 * Time offset relative to the beginning of the audio, 65 * and corresponding to the start of the spoken word. 66 * This field is only set if `enable_word_time_offsets=true` and only 67 * in the top hypothesis. 68 * This is an experimental feature and the accuracy of the time offset can 69 * vary. 70 * </pre> 71 * 72 * <code>.google.protobuf.Duration start_time = 1;</code> 73 */ getStartTimeOrBuilder()74 com.google.protobuf.DurationOrBuilder getStartTimeOrBuilder(); 75 76 /** 77 * 78 * 79 * <pre> 80 * Time offset relative to the beginning of the audio, 81 * and corresponding to the end of the spoken word. 82 * This field is only set if `enable_word_time_offsets=true` and only 83 * in the top hypothesis. 84 * This is an experimental feature and the accuracy of the time offset can 85 * vary. 86 * </pre> 87 * 88 * <code>.google.protobuf.Duration end_time = 2;</code> 89 * 90 * @return Whether the endTime field is set. 91 */ hasEndTime()92 boolean hasEndTime(); 93 /** 94 * 95 * 96 * <pre> 97 * Time offset relative to the beginning of the audio, 98 * and corresponding to the end of the spoken word. 99 * This field is only set if `enable_word_time_offsets=true` and only 100 * in the top hypothesis. 101 * This is an experimental feature and the accuracy of the time offset can 102 * vary. 103 * </pre> 104 * 105 * <code>.google.protobuf.Duration end_time = 2;</code> 106 * 107 * @return The endTime. 108 */ getEndTime()109 com.google.protobuf.Duration getEndTime(); 110 /** 111 * 112 * 113 * <pre> 114 * Time offset relative to the beginning of the audio, 115 * and corresponding to the end of the spoken word. 116 * This field is only set if `enable_word_time_offsets=true` and only 117 * in the top hypothesis. 118 * This is an experimental feature and the accuracy of the time offset can 119 * vary. 120 * </pre> 121 * 122 * <code>.google.protobuf.Duration end_time = 2;</code> 123 */ getEndTimeOrBuilder()124 com.google.protobuf.DurationOrBuilder getEndTimeOrBuilder(); 125 126 /** 127 * 128 * 129 * <pre> 130 * The word corresponding to this set of information. 131 * </pre> 132 * 133 * <code>string word = 3;</code> 134 * 135 * @return The word. 136 */ getWord()137 java.lang.String getWord(); 138 /** 139 * 140 * 141 * <pre> 142 * The word corresponding to this set of information. 143 * </pre> 144 * 145 * <code>string word = 3;</code> 146 * 147 * @return The bytes for word. 148 */ getWordBytes()149 com.google.protobuf.ByteString getWordBytes(); 150 151 /** 152 * 153 * 154 * <pre> 155 * The confidence estimate between 0.0 and 1.0. A higher number 156 * indicates an estimated greater likelihood that the recognized words are 157 * correct. This field is set only for the top alternative of a non-streaming 158 * result or, of a streaming result where `is_final=true`. 159 * This field is not guaranteed to be accurate and users should not rely on it 160 * to be always provided. 161 * The default of 0.0 is a sentinel value indicating `confidence` was not set. 162 * </pre> 163 * 164 * <code>float confidence = 4;</code> 165 * 166 * @return The confidence. 167 */ getConfidence()168 float getConfidence(); 169 170 /** 171 * 172 * 173 * <pre> 174 * Output only. A distinct integer value is assigned for every speaker within 175 * the audio. This field specifies which one of those speakers was detected to 176 * have spoken this word. Value ranges from '1' to diarization_speaker_count. 177 * speaker_tag is set if enable_speaker_diarization = 'true' and only in the 178 * top alternative. 179 * </pre> 180 * 181 * <code>int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 182 * 183 * @return The speakerTag. 184 */ getSpeakerTag()185 int getSpeakerTag(); 186 } 187