pub struct TranscriptSegmentContract {
pub index: u64,
pub start_seconds: Option<f64>,
pub end_seconds: Option<f64>,
pub text: String,
pub language: Option<String>,
pub speaker: Option<String>,
pub confidence: Option<f32>,
pub is_final: bool,
pub words: Vec<TranscriptWordContract>,
pub chars: Vec<TranscriptCharContract>,
pub attributes: BTreeMap<String, String>,
}Fields§
§index: u64§start_seconds: Option<f64>§end_seconds: Option<f64>§text: String§language: Option<String>§speaker: Option<String>§confidence: Option<f32>§is_final: bool§words: Vec<TranscriptWordContract>§chars: Vec<TranscriptCharContract>§attributes: BTreeMap<String, String>Implementations§
Source§impl TranscriptSegmentContract
impl TranscriptSegmentContract
pub fn new(index: u64, text: impl Into<String>) -> TranscriptSegmentContract
pub fn validate(&self) -> Result<(), TranscriptionError>
pub fn validated(self) -> Result<TranscriptSegmentContract, TranscriptionError>
pub fn normalized(self) -> TranscriptSegmentContract
pub fn duration_seconds(&self) -> Option<f64>
pub fn midpoint_seconds(&self) -> Option<f64>
Trait Implementations§
Source§impl AsTextSegmentContract for TranscriptSegmentContract
impl AsTextSegmentContract for TranscriptSegmentContract
fn as_text_segment_contract(&self) -> TextSegmentContract
Source§impl Clone for TranscriptSegmentContract
impl Clone for TranscriptSegmentContract
Source§fn clone(&self) -> TranscriptSegmentContract
fn clone(&self) -> TranscriptSegmentContract
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TranscriptSegmentContract
impl Debug for TranscriptSegmentContract
Source§impl<'de> Deserialize<'de> for TranscriptSegmentContract
impl<'de> Deserialize<'de> for TranscriptSegmentContract
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TranscriptSegmentContract, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TranscriptSegmentContract, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&TranscriptSegment> for TranscriptSegmentContract
impl From<&TranscriptSegment> for TranscriptSegmentContract
Source§fn from(value: &TranscriptSegment) -> TranscriptSegmentContract
fn from(value: &TranscriptSegment) -> TranscriptSegmentContract
Converts to this type from the input type.
Source§impl From<TranscriptSegment> for TranscriptSegmentContract
impl From<TranscriptSegment> for TranscriptSegmentContract
Source§fn from(value: TranscriptSegment) -> TranscriptSegmentContract
fn from(value: TranscriptSegment) -> TranscriptSegmentContract
Converts to this type from the input type.
Source§impl Serialize for TranscriptSegmentContract
impl Serialize for TranscriptSegmentContract
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TranscriptSegmentContract
Auto Trait Implementations§
impl Freeze for TranscriptSegmentContract
impl RefUnwindSafe for TranscriptSegmentContract
impl Send for TranscriptSegmentContract
impl Sync for TranscriptSegmentContract
impl Unpin for TranscriptSegmentContract
impl UnsafeUnpin for TranscriptSegmentContract
impl UnwindSafe for TranscriptSegmentContract
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more