pub struct WordInfo {
pub start_offset: Option<Duration>,
pub end_offset: Option<Duration>,
pub word: String,
pub confidence: f32,
pub speaker_label: String,
}
Expand description
Word-specific information for recognized words.
Fields§
§start_offset: Option<Duration>
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][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
is true
and only in the top hypothesis. This is an experimental feature
and the accuracy of the time offset can vary.
end_offset: Option<Duration>
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][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
is true
and only in the top hypothesis. This is an experimental feature
and the accuracy of the time offset can vary.
word: String
The word corresponding to this set of information.
confidence: f32
The confidence estimate between 0.0 and 1.0. A higher number
indicates an estimated greater likelihood that the recognized words are
correct. This field is set only for the top alternative of a non-streaming
result or, of a streaming result where
[is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
set to true
. This field is not guaranteed to be accurate and users should
not rely on it to be always provided. The default of 0.0 is a sentinel
value indicating confidence
was not set.
speaker_label: String
A distinct label is assigned for every speaker within the audio. This field
specifies which one of those speakers was detected to have spoken this
word. speaker_label
is set if
[SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
is given and only in the top alternative.
Trait Implementations§
source§impl Message for WordInfo
impl Message for WordInfo
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for WordInfo
impl PartialEq for WordInfo
impl StructuralPartialEq for WordInfo
Auto Trait Implementations§
impl Freeze for WordInfo
impl RefUnwindSafe for WordInfo
impl Send for WordInfo
impl Sync for WordInfo
impl Unpin for WordInfo
impl UnwindSafe for WordInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request